Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

cannot lookup jndi if using following method

 
peter tong
Ranch Hand
Posts: 250
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 250
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 like tacos! And this tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!