I'm trying to host a CORBA object within a Weblogic (8.1) container
using the weblogic built-in ORB and only using CORBA-compliant APIs.
When I try to obtain the RootPOA using:
org.omg.CORBA.Object obj = orb.resolve_initial_references("RootPOA");
The container throws the exception:
Unexpected System Exception:org.omg.CORBA.ORBPackage.InvalidName
Usually this means that the POA was not registered as an initial
service, but that just can't be the case since I know the weblogic EJB
container uses the POA.
Btw- the handle to the orb was obtained using:
// Initialize the ORB.
String args[] = null;
Properties Prop;
Prop = new Properties();
Prop.put("org.omg.CORBA.ORBClass",
"weblogic.wtc.corba.ORB");
ORB orb = (ORB)new InitialContext().lookup("java:comp/ORB");
Any ideas are greatly appreciated.
Mike
> I'm trying to host a CORBA object within a Weblogic (8.1) container
> using the weblogic built-in ORB and only using CORBA-compliant APIs.
>
> When I try to obtain the RootPOA using:
>
> org.omg.CORBA.Object obj = orb.resolve_initial_references("RootPOA");
>
> The container throws the exception:
>
> Unexpected System Exception:org.omg.CORBA.ORBPackage.InvalidName
I'm sorry, we didn't have time to implement the POA in 8.1, I am
working on that now for 9.0. If you want to use the POA in 8.1 you
need to use the J2SE ORB.
andy
--
> Btw- I will use the J2SE ORB in the meantime. My understanding is that there can only be
> one ORB per weblogic server, or can the J2SE co-exist with the existing weblogic ORB? (I
> looked at the docs but it was still not clear to me)
They should be able to coexist if you pass the ORB class in as a
property to ORB.init() and are not using RMI-IIOP. The WLS
ORBSingletonClass should be compatible with the Sun one a vice versa.
> -Dorg.omg.CORBA.ORBClass=com.sun.corba.se.internal.Interceptors.PIORB
Try putting this in ORB.init() instead.
> But now anytime I invoke on an object reference, the call hangs.
Not sure. can you get threaddumps.
andy
Hmmn weird. It seems like it wants a URL or something to connect to which seems wrong.
The source for list_initial_services says:
/**
* Get a list of the initially available CORBA services.
* This does not work unless an ORBInitialHost is specified during initialization
* (or unless there is an ORB running on the AppletHost) since the localhostname
* is inaccessible to applets. If a service properties URL was specified,
* then it is used, otherwise the bootstrapping protocol is used.
* @return A list of the initial services available.
*/
So you need an initial host if you use this. However, the root poa is
already registered, so it looks like you can use that. You will need
an initial host if you want to bind things into the NS, in theory you
should be able to use WLS for that.
andy
> org.omg.CORBA.COMM_FAILURE: vmCORBAObjectImpl.javacid: SUN minor code: 201 completed: No
--
> Btw- orbd must be running for resolve_initial_references() to work. Seems weird to me.
> After which, I was able to host a callback servant in my weblogic container using the
> native JDK ORB/POA but now I've run into a deeper issue. When the client calls back on
> the hosted callback object, the JDK ORB processes the request but then raises an
> IT_GIOP:REPLY_MESSAGE_NOT_CONSUMED exception.
> It's since been brought to my attention that this indicates a marshalling error with
> regards to extra bytes being on the stream after the request has been unmarshaled.
> Either due to a spotty or older ORB implementation. The advise is that the JDK ORB is
> just such an ORB.
I'd be surprised if this was the case for the 1.4 ORB. I would surmise
that your client is at fault here rather than the server. Incidentally
many orbs allow you to turn off this correctness checking (including
Orbix). IT_GIOP looks like an Orbix message. Are you sure this is
coming from the JDK ORB?
> I'd like to try using the JacORB within my weblogic container.
> Has anyone done this that you know of?
Yes. I believe a partner does this successfully, and indeed our CORBA
connector uses JacORB.
andy
Did you finally resolve this issue? I'm having the same problem, and hope to get a quick hint. Thanks!!
Lily
Which problem, exactly, are you referring to? There were many in this thread.
andy