Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Databases / June 2004

Tip: Looking for answers? Try searching our database.

JDeveloper 10G: JNDI lookup problem

Thread view: 
Kevin Arouza - 06 Apr 2004 01:26 GMT
I just upgraded from 9.0.3 to 9.0.4 and I'm having problems with the
following code that performs the JNDI lookup to grab the Data source.
Any ideas what's wrong?  I am using the embedded OC4J instance and the
Database connections are setup.  Code works great in 9.0.3, the
problem is only when it is run on 9.0.4!  Thanks much!

-----------------------------------

try
{
Context ctxt = new InitialContext();            
DataSource ds = (DataSource
PortableRemoteObject.narrow(ctxt.lookup("jdbc/RVDS"),
DataSource.class);

con = ds.getConnection();

}
catch (Exception ex)
{
ex.printStackTrace();
}

----------------------------------

The stack trace is as follows:

04/04/05 12:46:36 javax.naming.NamingException:
com.evermind.server.ApplicationInitialContextFactory should only be
used inside Orion server environments. For client
com.evermind.server.ApplicationClientInitialContextFactory or
com.evermind.server.rmi.RMIInitialContextFactory should be used

04/04/05 12:46:36 at
com.evermind.server.PreemptiveApplicationContext.getContext(PreemptiveApplicationContext.java:31)

04/04/05 12:46:36 at
com.evermind.naming.FilterContext.lookup(FilterContext.java:138)

04/04/05 12:46:36 at
javax.naming.InitialContext.lookup(InitialContext.java:347)

04/04/05 12:46:36 at _MVRInit._jspService(MVRInit.jsp:35)

04/04/05 12:46:36 at
oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:139)

...MORE...

Kevin
blackettg - 06 Jun 2004 14:03 GMT
Did you ever get this resolved?
I am trying to do this as well and I am very, very new to this. I have
been using straight JDBC connections for a long time, but this JNDI lookup
is new to me. I am getting this error:
javax.naming.NoInitialContextException: Need to specify class name in
environment or system property

Any help would be great.

Jerry


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.