[jboss-jira] [JBoss JIRA] Resolved: (JBAS-8496) NameNotFoundException during JNDI resource lookup
jaikiran pai (JIRA)
jira-events at lists.jboss.org
Thu Nov 25 02:44:59 EST 2010
[ https://jira.jboss.org/browse/JBAS-8496?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
jaikiran pai resolved JBAS-8496.
--------------------------------
Resolution: Cannot Reproduce Bug
I'm going to mark this as "Cannot Reproduce Bug" instead of marking it as "Done", because I don't really know what fixed this issue.
> NameNotFoundException during JNDI resource lookup
> -------------------------------------------------
>
> Key: JBAS-8496
> URL: https://jira.jboss.org/browse/JBAS-8496
> Project: JBoss Application Server
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 6.0.0.M5
> Environment: Windows XP SP3, jdk1.6.0_21
> Reporter: K C
> Labels: NameNotFoundException, datasource, jndi
> Attachments: jndi-src.zip
>
>
> Our servlet 2.5 app uses jndi lookup for the database (using Spring). The name in oracle-ds.xml is jndi/database and in the logs upon startup we get the following line:
>
> [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=jdbc/database' to JNDI name 'java:jdbc/database'
>
> In our web.xml, we have the following:
>
> <resource-ref>
> <res-ref-name>jdbc/database</res-ref-name>
> <res-type>javax.sql.DataSource</res-type>
> <res-auth>Container</res-auth>
> <mapped-name>java:jdbc/database</mapped-name>
> </resource-ref>
>
> When the app starts and tries to lookup jdbc/database in the Spring bean, it throws an exception:
>
> Caused by: javax.naming.NameNotFoundException: jdbc not bound
> at org.jnp.server.NamingServer.getBinding(NamingServer.java:771) [:5.0.5.Final]
> at org.jnp.server.NamingServer.getBinding(NamingServer.java:779) [:5.0.5.Final]
> at org.jnp.server.NamingServer.getObject(NamingServer.java:785) [:5.0.5.Final]
> at org.jnp.server.NamingServer.lookup(NamingServer.java:396) [:5.0.5.Final]
> at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:728) [:5.0.5.Final]
> at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:688) [:5.0.5.Final]
> at javax.naming.InitialContext.lookup(InitialContext.java:392) [:1.6.0_21]
>
> When I do the lookup after the app is initialized, in a JSP, the same lookup returns the correct object.
>
> So it seems like during initialization, the ENC-JNDI-style lookup (java:comp/env/...) doesn't work anymore, when they used to work in M4...
> It only does this on M5 - M4 works fine. Both untouched extracted downloads, with the oracle-jdbc driver in server/default/lib and oracle-ds.xml in server/default/deploy.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list