I have a GF Cluster with 2 instances. The jms hosts are inst1:37676 and inst2:37676. I deleted the default_JMS_host.
I am running a standalone java client (no ACC) on the same host using this:
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.enterprise.naming.SerialInitContextFactory");
env.put(Context.PROVIDER_URL, "corbaloc::host1:33700,host2:33700");
env.put(ORBManager.OMG_ORB_INIT_HOST_PROPERTY, "localhost");
env.put(ORBManager.OMG_ORB_INIT_PORT_PROPERTY, "33700");
InitialContext ctx = new InitialContext(env);
It works fine. Requests are distributed and all is well.
///////// Next
When I add a third instance, and use:
env.put(Context.PROVIDER_URL, "corbaloc::host1:33700,host2:33700,host3:33700");
I get this error:
Nov 17, 2009 7:40:05 PM com.sun.enterprise.naming.SerialContext lookup
SEVERE: NAM0004: Exception during name lookup : {0}
java.rmi.RemoteException: CORBA DATA_CONVERSION 1398079694 No; nested exception is ??????????????? (bunch of these)
vmcid: SUN minor code: 206 completed: No
at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.mapSystemException(Util.java:364)
.....
Caused by: 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)
What am I doing wrong? Is this a GlassFish bug?
I am running this on a T5440.
GF Version: v2.1 Patch04 (9.1_02 Patch10) (build b03-p04)
Java: java version "1.6.0_13"
[Message sent by forum member 'chilak' ]
http://forums.java.net/jive/thread.jspa?messageID=372279