Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript 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)?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!