-
Bug
-
Resolution: Done
-
Blocker
-
8.0.0.Final
-
None
Hi,
I'm having a problem to obtain DataSource using JNDI Name lookup.
Please see my code and error below:
Connection connection = null;
DataSource dataSource = null;
try
catch (Exception e)
{ LOGGER.error(e); }Caused by: javax.naming.NamingException: JBAS011832: Could not dereference object [Root exception is java.lang.NullPointerException]
at org.jboss.as.naming.NamingContext.getObjectInstance(NamingContext.java:526)
at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:236)
at org.jboss.as.naming.InitialContext$DefaultInitialContext.lookup(InitialContext.java:233)
at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:188)
at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:184)
at javax.naming.InitialContext.lookup(InitialContext.java:411) [rt.jar:1.7.0_45]
at javax.naming.InitialContext.lookup(InitialContext.java:411) [rt.jar:1.7.0_45]
... 10 more
Caused by: java.lang.NullPointerException
at org.jboss.as.naming.NamingContext.getObjectInstance(NamingContext.java:522)
... 17 more