This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes cannot lookup jndi if using following method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "cannot lookup jndi if using following method" Watch "cannot lookup jndi if using following method" New topic
Author

cannot lookup jndi if using following method

peter tong
Ranch Hand

Joined: Mar 15, 2008
Posts: 240
I have set up the datasource in weblogic console with jndi name jdbc/als
in web.xml, I add the following section


then I created a weblogic.xml and write


but when I deploy the application, error

NamingException: Cannot bind null object to jndi with name jdbc/alsJNDI

is thrown, what is the reason?
peter tong
Ranch Hand

Joined: Mar 15, 2008
Posts: 240
But if I remove the section in web.xml and weblogic.xml, then in the DBConnection class, I write


everything is Ok!!

So what is wrong with the first method (setting in web.xml and weblogic.xml)? I see most online tutorial recommend the first method.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: cannot lookup jndi if using following method
 
Similar Threads
JBOSS connection pooling
Warning: Resource reference is not defined for JNDI name
JNDI on startup
Query in : JNDI look up of DataSource
Connection pooling in tomcat