Unix Technical Forum

Oracle JDeveloper 10g Configuring MySQL DataSources with OC4J and JDeveloper

This is a discussion on Oracle JDeveloper 10g Configuring MySQL DataSources with OC4J and JDeveloper within the Oracle Miscellaneous forums, part of the Oracle Database category; --> I'm trying to run through http://www.oracle.com/technology/pro...and_oc4j3.html as a first time attempt at installing JDeveloper and working with JNDI and ...


Go Back   Unix Technical Forum > Database Server Software > Oracle Database > Oracle Miscellaneous

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-07-2008, 10:02 PM
Alan
 
Posts: n/a
Default Oracle JDeveloper 10g Configuring MySQL DataSources with OC4J and JDeveloper

I'm trying to run through
http://www.oracle.com/technology/pro...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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-07-2008, 10:02 PM
Alan
 
Posts: n/a
Default Re: Oracle JDeveloper 10g Configuring MySQL DataSources with OC4J and JDeveloper

nomorezpam3@hotmail.com (Alan) wrote in message news:<84f54f12.0408050502.7e8031c3@posting.google. com>...
> I'm trying to run through
> http://www.oracle.com/technology/pro...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


After about 4 hours I seem to have resolved this problem by adding a
jndi.properties file to my classpath with the entry
"java.naming.factory.initial=com.sun.jndi.fscontex t.RefFSContextFactory"
and downloading the File System Context jar (from
http://java.sun.com/products/jndi/downloads/index.html and then adding
the fscontext.jar and providerutil.jar files into the classpath).

But I still can't get the environment to work as I still don't quite
understand the first part of my problem - and hence I'm getting a
javax.naming.NameNotFoundException:
java:comp/env/resource-ref-name-entry
exception when I run now.

Anyone?

Thanks
Alan
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-07-2008, 10:02 PM
Alan
 
Posts: n/a
Default Re: Oracle JDeveloper 10g Configuring MySQL DataSources with OC4J and JDeveloper

Does this have anything to do with my jndi.properties choice of
Context?... does anyone have this working in their own environments -
which Context do you use?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-07-2008, 10:08 PM
Alan
 
Posts: n/a
Default Re: Oracle JDeveloper 10g Configuring MySQL DataSources with OC4J and JDeveloper

.... I've given up with JDeveloper; Eclipse looks far more progressive.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 09:04 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com