Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Oracle JDeveloper 10g Configuring MySQL DataSources with OC4J and JDeveloper

Oracle JDeveloper 10g Configuring MySQL DataSources with OC4J and JDeveloper

From: Alan <nomorezpam3_at_hotmail.com>
Date: 5 Aug 2004 06:02:44 -0700
Message-ID: <84f54f12.0408050502.7e8031c3@posting.google.com>


I'm trying to run through
http://www.oracle.com/technology/products/jdev/tips/duff/mysql_and_oc4j3.html as a first time attempt at installing JDeveloper and working with JNDI and MySQL, but I'm running into problems with this paper.

Firstly, the paper tells me to setup <data-source> entries in the data-sources.xml file (point 2 in the paper); then it tells me to edit the WEB-INF/web.xml to add <resource-ref> items (point 3). Now - I am probably missing something - but where is the link between these two entries... my Java is told to lookup "java:comp/env/jdbc/OraBlogsDS" which it probably finds in the <resource-ref> (web.xml) file but then how does it jump to the <data-source> entries that tell the code how and where to connect to my MySQL database?

Secondly, when I run my (slightly modified) code - I get the following error message when the code attempts the lookup...

code-line : DataSource ds = (DataSource) ctx.lookup("java:comp/env/resource-ref-name-entry");

code-line-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

The Oracle paper fails to tell me about any other requirements such as an application resource file, etc.

Can anyone assist in either of these two points. Many Thanks,

Alan Received on Thu Aug 05 2004 - 08:02:44 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US