File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes BEA/Weblogic and the fly likes problem in creating mysql datasource on weblogic 10.3.4 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "problem in creating mysql datasource on weblogic 10.3.4" Watch "problem in creating mysql datasource on weblogic 10.3.4" New topic
Author

problem in creating mysql datasource on weblogic 10.3.4

RajivAwadhesh kumar
Greenhorn

Joined: May 20, 2011
Posts: 24


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

Joined: Dec 20, 2006
Posts: 2476
    
    7

We moved your post to our WebLogic forum.


OCUP UML fundamental and ITIL foundation
youtube channel
Kuldip Shetty
Ranch Hand

Joined: Jan 07, 2010
Posts: 37

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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problem in creating mysql datasource on weblogic 10.3.4
 
Similar Threads
Data being retrieved even though MySQL driver is not loaded
sun.jdbc is not available
Problem in CallableStatement
Problem in getting the data from DB using servlets
Resource Injection on DataSource throws NullPointerException