Discussion:
[omniORB] Interoperability with Java 6 IDL
Vázquez Landa, David
2008-10-16 19:37:17 UTC
Permalink
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...)

Thanks
Martin Trappel
2008-10-17 00:15:19 UTC
Permalink
Post by Vázquez Landa, David
Hi list,
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
Vázquez Landa, David
2008-10-17 13:47:17 UTC
Permalink
Oh, I just noticed something else!!!

Before I get the BAD_OPERATION exception, I'm getting something else: "omniORB::LOCATION_FORWARD" which isn't the case with the Jacorb server... :S

-----Urspr?ngliche Nachricht-----
Von: omniorb-list-***@omniorb-support.com [mailto:omniorb-list-***@omniorb-support.com] Im Auftrag von Martin Trappel
Gesendet: Donnerstag, 16. Oktober 2008 20:15
An: omniorb-***@omniorb-support.com
Betreff: Re: [omniORB] Interoperability with Java 6 IDL
Post by Vázquez Landa, David
Hi list,
start orbd -ORBInitialPort 2809 -ORBInitialHost localhost And on
"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
Vázquez Landa, David
2008-10-17 14:47:11 UTC
Permalink
Ok... After a lot of debugging I reached to the conclusion that the problem is on the Java side... Somehow, after creating a new Session with the SessionFactory, I've still got a reference to the SessionFactory!!! So, when calling "session->open();", I get a "BAD_OPERATION" exception because the Java side tries to call "sessionFactory->open();"... Strange is that this doesn't happen with the Jacorb implementation... :S

Anyway, thanks.. I shall keep on looking :P

-----Urspr?ngliche Nachricht-----
Von: omniorb-list-***@omniorb-support.com [mailto:omniorb-list-***@omniorb-support.com] Im Auftrag von Martin Trappel
Gesendet: Donnerstag, 16. Oktober 2008 20:15
An: omniorb-***@omniorb-support.com
Betreff: Re: [omniORB] Interoperability with Java 6 IDL
Post by Vázquez Landa, David
Hi list,
start orbd -ORBInitialPort 2809 -ORBInitialHost localhost And on
"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

Loading...