Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

InitialContext.lookup(""java:comp/env") throws NameNotFoundException  RSS feed

 
peter tong
Ranch Hand
Posts: 250
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
in my application, I add ojdbc6.jar, wlfullclient-10-3.jar.
and in weblogic administration console > services > datasource, I define a Datasource with name
jdbc/abc

and then in the application, I access it using


this code run successfully without any error.

But if I try



Error:javax.naming.NameNotFoundException: remaining name: env

why would this happen (it can read the Datasource jndi but not java:comp/env)?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!