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