[jboss-user] [JNDI/Naming/Network] - Re: Data Source JNDI lookup fails in a WAR
jaikiran
do-not-reply at jboss.com
Fri Jul 11 09:25:26 EDT 2008
anonymous wrote : 14:18:53,593 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=Data
| SourceBinding,name=TestDB' to JNDI name 'java:TestDB'
| 14:18:57,109 INFO [TomcatDeployer] deploy, ctxPath=/test, warUrl=.../deploy/test.war/
This shows that the datasource is being deployed correctly at the right time (before the war deployment).
anonymous wrote :
| 14:25:14,296 ERROR [STDERR] at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:130)
| 14:25:14,296 ERROR [STDERR] at com.my.yoav.test.doGet(test.java:64)
This looks strange. I had not expected a spring framework related class in the JNDI lookup stacktrace. Can you post the code which does the lookup? Are there any spring classes involved in that?
The common way of looking up JNDI objects is:
Context ctx = new InitialContext();
| ctx.lookup("java:/TestDB");
This code would use the jndi.properties in the conf folder of JBoss and use the appropriate INITIAL_CONTEXT_FACTORY and other properties.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4163862#4163862
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4163862
More information about the jboss-user
mailing list