Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Accessing CORBA Object from EJB

0 views
Skip to first unread message

Roger L. Cauvin

unread,
Aug 14, 2000, 3:00:00 AM8/14/00
to
I have been unable to access a (Orbix) CORBA object from my (JRun 3.0)
stateful session bean. If I do a string_to_object on a stringified IOR from
within a standalone test program, it works fine. If I execute the same code
within the EJB container, I get a null pointer exception within the
string_to_object method.

The following code works perfectly unless it is run within the EJB
container:

String[] customProperties = new String[0];
String ior =
"IOR:010001011a00000049444c3a436f7354726164696e672f4c6f6f6b75703a312e30002
f4c01000000000000005a0000000101000010000000636f6e74726f6c736f6c7574696f6e0
0230600003a0000003a5c636f6e74726f6c736f6c7574696f6e3a54726164696e675365727
66963653a303a3a4946523a436f7354726164696e675f4c6f6f6b7570 00";
ORB theOrb = ORB.init(customProperties, null);
org.omg.CORBA.Object theObject = theOrb.string_to_object(ior);

When I run it within the EJB container, I get the following exception
inside Sun's string_to_object() method:

java.lang.NullPointerException
at com.sun.corba.se.internal.core.IOR.getCodebase(Unknown Source)
at com.sun.corba.se.internal.core.IOR.read(Unknown Source)
at com.sun.corba.se.internal.iiop.CDRInputStream.read_Object(Unknown
Source)
at com.sun.corba.se.internal.iiop.CDRInputStream.read_Object(Unknown
Source)
at com.sun.corba.se.internal.corba.ORB.string_to_object(Unknown Source)
at catalyst.cem.CEM.<init>(CEM.java:45)
at catalyst.cem.ejbeans.CEMBean.ejbCreate(CEMBean.java:20)
at java.lang.reflect.Method.invoke(Native Method)
at allaire.ejipt._BeanMethod._invoke(_BeanMethod.java:128)
at allaire.ejipt._SessionHomeObject._create(_SessionHomeObject.java:107)
at allaire.ejipt._CallableObject.call(_CallableObject.java:83)
at java.lang.reflect.Method.invoke(Native Method)
at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
at sun.rmi.transport.Transport$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown
Source)
at java.lang.Thread.run(Unknown Source)

Any ideas of why this happens?

--
Roger L. Cauvin
rca...@homemail.com
http://www.thegym.net/rcauvin

0 new messages