I do the above code, and i getting a MARSHAL exception.
I read that this is incompatible jvm version or my remote class is not serializable. But it is not my case. I am using the same IBM jvm version and my remote classes are serializable (tested against jboss).
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY, "com.ibm.websphere.naming.WsnInitialContextFactory");
env.put(Context.PROVIDER_URL, "iiop://localhost:9810");
Context initialContext = new InitialContext(env);
Object obj = initialContext.lookup("ejb/com/cpqd/business/company/CompanyServiceRemote");
EJBHome home = (EJBHome) PortableRemoteObject.narrow(obj, EJBHome.class);
home.getEJBMetaData().getRemoteInterfaceClass();
Exception:
Exception in thread "P=507678:O=0:CT" java.rmi.MarshalException: CORBA MARSHAL 0x4942f89a No; nested exception is:
org.omg.CORBA.MARSHAL: Unable to read value from underlying bridge : com.cpqd.business.company.controller.impl.CompanyServiceSession vmcid: IBM minor code: 89A completed: No
at com.ibm.CORBA.iiop.UtilDelegateImpl.mapSystemException(UtilDelegateImpl.java:204)
at javax.rmi.CORBA.Util.mapSystemException(Util.java:84)
at org.omg.stub.javax.ejb._EJBHome_Stub.getEJBMetaData(_EJBHome_Stub.java:144)
at com.cpqd.Main.main(Main.java:25)
Caused by: org.omg.CORBA.MARSHAL: Unable to read value from underlying bridge : com.cpqd.business.company.controller.impl.CompanyServiceSession vmcid: IBM minor code: 89A completed: No
at com.ibm.rmi.iiop.CDRInputStream.read_value(CDRInputStream.java:1855)
at org.omg.stub.javax.ejb._EJBHome_Stub.getEJBMetaData(_EJBHome_Stub.java:133)
... 1 more
Thanks
Breno Leitão
> Hello,
>
> I do the above code, and i getting a MARSHAL exception. I read that
> this is incompatible jvm version or my remote class is not
> serializable. But it is not my case. I am using the same IBM jvm
> version and my remote classes are serializable (tested against
> jboss).
It's not a matter of which JVM you are using, it's what Orb are you
using. You need to have the right IBM Orb classes in your client
classpath, which you will have if you are running in the client
container, or if you installed the support for thin clients. This is all
in the WAS infocenter.
I am using the same jar which WebSphere uses. My classpath is pointing to the WebSphere lib directory.
What do you mean "installed the support for thin clients"?
thanks
If you want to run a standalone Java client without using the client
container. The thin client install gives you all the needed jars so you
don't have to figure it out the hard way. See the WAS infocenter for
details.
> Sure,
>
> But using the same lib the AS uses is not the cause of my problem, correct?
>
It might be, that's not what you are supposed to do. You obviously have
a problem and what you are doing is not supported. Why not try doing it
the right way, see if it works ?
[]'s
Breno