AW: [omniORB] Interoperability with Java 6 IDL

Vázquez Landa, David david.vazquez-landa at ndsatcom.com
Fri Oct 17 11:46:40 BST 2008


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-bounces at omniorb-support.com [mailto:omniorb-list-bounces at omniorb-support.com] Im Auftrag von Martin Trappel
Gesendet: Donnerstag, 16. Oktober 2008 20:15
An: omniorb-list at omniorb-support.com
Betreff: Re: [omniORB] Interoperability with Java 6 IDL

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

_______________________________________________
omniORB-list mailing list
omniORB-list at omniorb-support.com
http://www.omniorb-support.com/mailman/listinfo/omniorb-list



More information about the omniORB-list mailing list