In WLS 7.02 the following piece of code works, but in WLS 8.1 I get an exception
on the last line (see the log below). Would someone have a clue why it’s not working
with WLS 8.1
PS: If you want to send me an email, remove the _NOSPAM_
TIA !
public OimSessionInstance openSession() throws EomSessionException {
Properties props = new Properties();
props.put("org.omg.CORBA.ORBInitialPort", (new Short(corbaPortNumber)).toString());
props.put("org.omg.CORBA.ORBInitialHost", serverHost);
try {
orb = ORB.init((String[]) null, props);
String[] services = orb.list_initial_services();
// setting up the CORBA stuff
org.omg.CORBA.Object objRef = orb.resolve_initial_references("NameService");
EomSessionException: class EomSession, method corbaConnection to OIM : exception
: org.omg.CORBA.MARSHAL: Exception waiting for response; nested exception is:
java.io.EOFException: GIOP protocol error vmcid: 0x0 minor code: 0
completed: No
at EomDefaultConnection.openSession(EomDefaultConnection.java:114)
at EomSession.<init>(EomSession.java:78)
Found a solution:
In WLS7.0 the code automatically returned the SUN ORB found in the rt.jar. But
in WLS8.1 you have to force it to the SUN ORB by specifying it in the properties
file used to instantiate the ORB.
Example:
public OimSessionInstance openSession() throws EomSessionException {
String ORBClassName = "com.sun.corba.se.internal.iiop.ORB";
String ORBSingletonClassName = "com.sun.corba.se.internal.corba.ORBSingleton";
Properties props = new Properties();
props.put("org.omg.CORBA.ORBClass" , ORBClassName);
props.put("org.omg.CORBA.ORBSingletonClass" , ORBSingletonClassName);
Pls let me know how to go about it.
Thanks!!