Access a Data Source from OC4J 10.1.3 Remotely Using JNDI from JDeveloper (Doc ID 374716.1)

Last updated on AUGUST 04, 2016

Applies to:

Oracle JDeveloper - Version: 10.1.3.0.4 and later   [Release: and later ]
Information in this document applies to any platform.
***Checked for relevance on 07-Apr-2011***

Symptoms

On JDeveloper 10.1.3 in production when attempting to access a data Source using JNDI from OC4J 10.1.3, the following error occurs:

Exception in thread main
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:247)
at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:284)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at pkg5541315992.TestFromJava.main(TestFromJava.java:28)

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms