I am trying to create a JNDI context from a unix application to a glassfish V2 instance running on a linux box. I get the below unexpected exception. I suspect the two warnings given may be erroneous, but they are still confusing, because the jars containing these classes are on my classpath. Any help would be greatly apprecitead:
My code looks something like:
Properties props = new Properties();
props.setProperty("java.naming.factory.initial", "com.sun.enterprise.naming.SerialInitContextFactory");
props.setProperty("java.naming.factory.url.pkgs", "com.sun.enterprise.naming");
props.setProperty("java.naming.factory.state", "com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl");
props.put("org.omg.CORBA.ORBSingletonClass","com.sun.corba.se.impl.orb.ORBSingleton");
props.put("org.omg.CORBA.ORBClass","com.sun.corba.se.impl.orb.ORBImpl");
props.setProperty("org.omg.CORBA.ORBInitialHost", server);
props.setProperty("org.omg.CORBA.ORBInitialPort", serverPort);
try {
InitialContext ctx = new InitialContext();
} catch(NamingException e){
e.printStackTrace();
}
my classpath includes the following jars from the glassfish lib directory:
appserv-rt.jar
appserv-deployment-client.jar
appserv-launch.jar
appserv-admin.jar
appservext.jar
j2ee.jar
javaee.jar:
jmxremote_optional.jar
appserv-rt_ja.jar
appserv-rt_zh.jar
appserv-rt_fr.jar
appserv-rt_de.jar
appserv-rt_es.jar
appserv-rt_it.jar
appserv-rt_sw.jar
appserv-rt_ko.jar
appserv-rt_zh_TW.jar
appserv-rt_zh_CN.jar:
stacktrace looks something like:
warning: ORB.init: initializer class com.sun.enterprise.iiop.J2EEInitializer not found
warning: ORB.init: initializer class com.sun.enterprise.iiop.FailoverIORInterceptor not found
Dec 30, 2008 3:12:38 PM com.sun.enterprise.util.ORBManager initORB
SEVERE: UTIL6009:Unexcpected Exception in createORB.
org.omg.CORBA.ORBPackage.InvalidName: IDL:omg.org/CORBA/ORB/InvalidName:1.0
at com.ooc.OB.InitialServiceManager.resolveInitialReferences(Unknown Source)
at com.ooc.OBCORBA.ORB_impl.resolve_initial_references(Unknown Source)
at com.sun.enterprise.util.ORBManager.initORB(ORBManager.java:548)
at com.sun.enterprise.util.ORBManager.getORB(ORBManager.java:278)
at com.sun.enterprise.naming.SerialInitContextFactory.getInitialContext(SerialInitContextFactory.java:178)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
at javax.naming.InitialContext.init(InitialContext.java:223)
at javax.naming.InitialContext.<init>(InitialContext.java:175)
[Message sent by forum member 'ab11' (ab11)]
http://forums.java.net/jive/thread.jspa?messageID=323650