I have a web application deployed on the Sun Java System Application Server 8. This application will also act as a CORBA client by invoking remote methods on another CORBA server.
Our first approach was to use the ORB provided by the Sun App Server. But whenever the code reaches the point to initialize the ORB:
orb = ORB.init(as, null);
we encountered such exceptions:
[#|2005-02-03T00:38:43.912-0600|WARNING|sun-appserver-pe8.0.0_01|javax.enterpris
e.resource.corba._DEFAULT_.rpc.transport|_ThreadID=14;|"IOP00710209: (INTERNAL)
Unable to create listener thread on the specific port"
org.omg.CORBA.INTERNAL: vmcid: SUN minor code: 209 completed: No
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.createListenerFa
iled(ORBUtilSystemException.java:3142)
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.createListenerFa
iled(ORBUtilSystemException.java:3160)
When we deployed the same app on Tomcat, it worked fine. We later reasoned the exception was happening on the Sun App Server because perhaps it was trying to initialize another ORB with the same properties as the one initialized by the Sun App Server, and thus was trying to create another listener on a port already in use.
On tomcat, the ORB used was the default ORB provided by Java. Thus, we thought we would try 'overriding' the ORB properties for the Sun App Server by specifiying this in the ORB.init() method:
String as[] = null;
Properties orbProperties = new Properties();
orbProperties.put("org.omg.CORBA.ORBClass","com.sun.corba.se.internal.iiop.ORB");
orbProperties.put("org.omg.CORBA.ORBSingletonClass","com.sun.corba.se.internal.iiop.ORB");
orb = ORB.init(as, orbProperties);
But when executing this, we get the exception as follows:
Caused by: org.omg.CORBA.INITIALIZE: can't instantiate custom socket factory: co
m.sun.enterprise.iiop.IIOPSSLSocketFactory vmcid: 0x0 minor code: 0 completed
: No
at com.sun.corba.se.internal.corba.ORB.parseProperties(ORB.java:1250)
at com.sun.corba.se.internal.POA.POAORB.parseProperties(POAORB.java:267)
at com.sun.corba.se.internal.Interceptors.PIORB.parseProperties(PIORB.ja
va:341)
at com.sun.corba.se.internal.corba.ORB.set_parameters(ORB.java:460)
at com.sun.corba.se.internal.POA.POAORB.set_parameters(POAORB.java:153)
at com.sun.corba.se.internal.Interceptors.PIORB.set_parameters(PIORB.jav
a:333)
at org.omg.CORBA.ORB.init(ORB.java:337)
at com.covansys.ipceuc.corbalogic.SessionManager.<clinit>(SessionManager
.java:159)
Some Sun sites mentioned that
com.sun.CORBA.iiop.ORB
is the Java ORB implementation. When trying to use this, we got a ClassNotFoundException.
Also tried the following classes:
com.sun.corba.se.internal.corba.ORB
com.sun.corba.se.internal.core.ORB
com.sun.corba.se.internal.org.omg.ORB
All of them reported exceptions as follows:
Caused by: org.omg.CORBA.INITIALIZE: can't instantiate default ORB implementati
n org.omg.CORBA.ORB vmcid: 0x0 minor code: 0 completed: No
at org.omg.CORBA.ORB.create_impl(ORB.java:297)
at org.omg.CORBA.ORB.init(ORB.java:336)
at com.covansys.ipceuc.corbalogic.SessionManager.<clinit>(SessionManage
.java:158)
... 55 more
Caused by: java.lang.InstantiationException
at sun.reflect.InstantiationExceptionConstructorAccessorImpl.newInstanc
(InstantiationExceptionConstructorAccessorImpl.java:30)
at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
at java.lang.Class.newInstance0(Class.java:308)
at java.lang.Class.newInstance(Class.java:261)
at org.omg.CORBA.ORB.create_impl(ORB.java:295)
... 57 more
|#]
Anyone know what the Java ORB implementation class is, or whether this is possible at all?
Thanks in advance.