3
votes

I have a glassfish 4 installation (DAS). One remote (SSH) node and one cluster with one instance on that node. Also i have defined a connection pool and the datasource for it.

My test application is very simple - it is a web application with one servlet, in that i load the datasource in the following way:

@Resource(lookup = "jdbc/vadsacRootSource")
private Datasource datasource;

What does not work - the datasource on the cluster instance (remote) cannot be instantiated, because the underlying pool cannot be found - stacktrace see at the end of the message.

What does work:

  • The same application on the local DAS node (defaul node)
  • The Loading of a string saved as custom JNDI resource on both - remote and local
  • The whole application (the datasource, too) on the glassfish 3.1 - remote and local

So, there is something wrong with the current glassfish 4 version - Datasources (or its pool) does not get instantiated (or found per JNDI?) on some remote SSH instance. I have tested the official release 4.0 and the nightly build version 4.1-bl3 - the same problem

Do you have any idea?

GlassFish Server Open Source Edition 4.0 - Error report

HTTP Status 500 - Internal Server Error


type Exception report

messageInternal Server Error

descriptionThe server encountered an internal error that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: Error instantiating servlet class
com.sedo.webtesty.HelloWorld

root cause

com.sun.enterprise.container.common.spi.util.InjectionException:
Error creating managed object for class: class
com.sedo.webtesty.HelloWorld

root cause

com.sun.enterprise.container.common.spi.util.InjectionException:
Exception attempting to inject Res-Ref-Env-Property:
com.sedo.webtesty.HelloWorld/[email protected]@ resolved
as: jndi: jdbc/vadsacRootSource@res principal: null@mail: null No
Runtime properties Database Vendor : null Create Tables at Deploy :
false Delete Tables at Undeploy : false into class
com.sedo.webtesty.HelloWorld: Lookup failed for
'java:comp/env/com.sedo.webtesty.HelloWorld/datasource' in
SerialContext[myEnv={java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory,
java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl,
java.naming.factory.url.pkgs=com.sun.enterprise.naming}

root cause

javax.naming.NamingException: Lookup failed for
'java:comp/env/com.sedo.webtesty.HelloWorld/datasource' in
SerialContext[myEnv={java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory,
java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl,
java.naming.factory.url.pkgs=com.sun.enterprise.naming} [Root
exception is javax.naming.NamingException: Lookup failed for
'jdbc/vadsacRootSource' in
SerialContext[myEnv={java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory,
java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl,
java.naming.factory.url.pkgs=com.sun.enterprise.naming,
com.sun.enterprise.naming.logicalName=java:comp/env/com.sedo.webtesty.HelloWorld/datasource}
[Root exception is javax.naming.NamingException: Unable to lookup
resource : jdbc/vadsacRootSource [Root exception is
com.sun.appserv.connectors.internal.api.ConnectorRuntimeException:
Lookup failed for '__SYSTEM/pools/mysqlRootVadsacPool' in
SerialContext[myEnv={java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory,
java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl,
java.naming.factory.url.pkgs=com.sun.enterprise.naming,
com.sun.enterprise.naming.logicalName=java:comp/env/com.sedo.webtesty.HelloWorld/datasource}]]]

root cause

javax.naming.NamingException: Lookup failed for
'jdbc/vadsacRootSource' in
SerialContext[myEnv={java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory,
java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl,
java.naming.factory.url.pkgs=com.sun.enterprise.naming,
com.sun.enterprise.naming.logicalName=java:comp/env/com.sedo.webtesty.HelloWorld/datasource}
[Root exception is javax.naming.NamingException: Unable to lookup
resource : jdbc/vadsacRootSource [Root exception is
com.sun.appserv.connectors.internal.api.ConnectorRuntimeException:
Lookup failed for '__SYSTEM/pools/mysqlRootVadsacPool' in
SerialContext[myEnv={java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory,
java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl,
java.naming.factory.url.pkgs=com.sun.enterprise.naming,
com.sun.enterprise.naming.logicalName=java:comp/env/com.sedo.webtesty.HelloWorld/datasource}]]

root cause

javax.naming.NamingException: Unable to lookup resource
: jdbc/vadsacRootSource [Root exception is
com.sun.appserv.connectors.internal.api.ConnectorRuntimeException:
Lookup failed for '__SYSTEM/pools/mysqlRootVadsacPool' in
SerialContext[myEnv={java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory,
java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl,
java.naming.factory.url.pkgs=com.sun.enterprise.naming,
com.sun.enterprise.naming.logicalName=java:comp/env/com.sedo.webtesty.HelloWorld/datasource}]

root cause

com.sun.appserv.connectors.internal.api.ConnectorRuntimeException:
Lookup failed for '__SYSTEM/pools/mysqlRootVadsacPool' in
SerialContext[myEnv={java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory,
java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl,
java.naming.factory.url.pkgs=com.sun.enterprise.naming,
com.sun.enterprise.naming.logicalName=java:comp/env/com.sedo.webtesty.HelloWorld/datasource}

root cause

javax.naming.NamingException: Lookup failed for
'__SYSTEM/pools/mysqlRootVadsacPool' in
SerialContext[myEnv={java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory,
java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl,
java.naming.factory.url.pkgs=com.sun.enterprise.naming,
com.sun.enterprise.naming.logicalName=java:comp/env/com.sedo.webtesty.HelloWorld/datasource}
[Root exception is javax.naming.NameNotFoundException:
pools]

root cause

javax.naming.NameNotFoundException: pools

note The full stack traces of the exception and its root causes are available in the GlassFish Server Open Source Edition 4.0 logs.


GlassFish Server Open Source Edition 4.0

1
The same problem with the current development version Glassfish 4.1-bl3vadimiron

1 Answers

0
votes

The problem is fixed in the current 4.1 version - everything is working now