[omniORB] Interoperability with Java 6 IDL
Martin Trappel
0xCDCDCDCD at gmx.at
Thu Oct 16 21:14:42 BST 2008
Vázquez Landa wrote:
> Hi list,
>
> I'm having a tiny problem. I implemented a java server (very simple) in JacORB and in Java 6 IDL... Both programs do basically the same (they come from the same idl) and well, in short, this is the problem:
> On the client side (C++ & OmniORB) I retrieve a Proxy from the Nameserver (JacORB's or Sun's), this proxy is a factory (SessionFactory), which has only one method (createSession). The method "createSession" returns a "Session" Proxy (Session_var) and so far so good. With both servers I get to use this factory and get a "Session_var". Then comes the problem. I assign the newly created "Session_var" to a variable named session and try to use one of its methods (open()). When using the JacORB Server I have no problems. But when using Sun's I can't get past this method (that's session->open();). Once I do that, I get a "CORBA::BAD_OPERATION @ 0x0012f708" exception.
> Now, I'm starting the Sun based nameserver with the next command: start orbd -ORBInitialPort 2809 -ORBInitialHost localhost
> And on omniORB.reg I defined the nameservice as: "0"="NameService=corbaloc::localhost/NameService
> Am I missing something??
> Did I mention that both servers are almost identical? (They actually only differ in two things: 1. The generated stubs and skeletons (obviously) and 2. When using JacORB I use JacORB's nameservice, when using Sun's approach I use Sun's nameservice...)
>
If you get an exception on the call to your open() method, then the
Nameserver can't have anything to do with it since that is only involved
in getting the inital factory object.
Try setting omniORB's traceLevel=10 and traceExceptions=1 to get further
details on omniORBs side.
BAD_OPERATION hints that maybe the method/class signature is different
on the Java side and on your C++ side. (Though as to why that may be if
you feed the same IDL to Java and JacORB I can't imagine.)
br,
Martin
More information about the omniORB-list
mailing list