Hello everybody,
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
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.
*Do you have any idea?
*
Thank you in advance,
Vadim Sacharow*
*
*
*
*
*
GlassFish Server Open Source Edition 4.0 - Error report
HTTP Status 500 - Internal Server Error
------------------------------------------------------------------------
*type* Exception report
*message*Internal Server Error
*description*The 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/datasource_at_javax.sql.DataSource@ resolved as: jndi: jdbc/vadsacRootSource_at_res principal: null_at_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