Skip to Main Content

Java and JavaScript in the Database

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Loadjava and ClassNotFound

56944Jul 16 2002
Hi All

I am attempting to use classes bundled in the oc4jclient.jar file in a stored procedure. I have loaded the oc4jclient.jar file using:

loadjava -u sys/syspwd@localdb -schema SYS -recursivejars -jarasresource -resolver "((* PUBLIC))" oc4jclient.jar

The problem now manifests itself when I try to create an InitialContext using the following code:

============ SNIP =============

Properties props = new Properties();
props.setProperty("java.naming.factory.initial", "com.evermind.server.rmi.RMIInitialContextFactory");
props.setProperty("java.naming.provider.url", "ormi://myserver:15011/gateway");
props.setProperty("java.naming.security.principal", "admin");
props.setProperty("java.naming.security.credentials", "admin");

// Get initial context
try {
initialContext = new InitialContext(props);
} catch(NamingException e) {
e.printStackTrace();
}

============ SNIP =============

As soon as the InitialContext constructor is called the following exception is thrown.

javax.naming.NoInitialContextException: Cannot instantiate class: com.evermind.server.rmi.RMIInitialContextFactory. Root exception is java.lang.ClassNotFoundException: com/evermind/server/rmi/RMIInitialContextFactory
at java.lang.Class.forName0(Class.java)
at java.lang.Class.forName(Class.java)
at com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.java)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java)
at javax.naming.InitialContext.init(InitialContext.java)
at javax.naming.InitialContext.<init>(InitialContext.java)
at SequenceServer.getId(SequenceSever:35)

What am I doing wrong?

Regards

Francois Joubert

Comments

Processing
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Aug 16 2002
Added on Jul 16 2002
2 comments
303 views