• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem in creating mysql datasource on weblogic 10.3.4

 
RajivAwadhesh kumar
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


When I execute the above code I get the following error

javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:645)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:325)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at com.rajiv.TestDB.readDataFromDataSource(TestDB.java:96)
at com.rajiv.TestDB.main(TestDB.java:18)


I am using MySQL 5.5 and Weblogic 10.3.4 .. Please suggest what is the problem?
 
Jan Cumps
Bartender
Posts: 2599
12
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We moved your post to our WebLogic forum.
 
Kuldip Shetty
Ranch Hand
Posts: 43
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to set few Context properties like Context.INITIAL_CONTEXT_FACTORY, Context.PROVIDER_URL before performing the JNDI Lookup.


Click here for more details
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic