[omniORB] Python exceptions and omniORBpy

Michael omniorb at bindone.de
Fri Sep 11 16:42:27 BST 2009


Can you post the IDL and a python code snippet?
It sounds like you're throwing a CORBA.UserException directly, but afaik
a concrete exception type defined in the IDL (exception { and raises on
the method) has to be thrown.


Cetateanu Marius-B01107 wrote:
> Hi,
> 
> I'm having some trouble using exceptions with omniORBpy. I have a server
> side written in Python and a client 
> that's written in Java. I described my exceptions properly in the IDL
> and I have generated both the Java and 
> Python stubs. I have some class methods in python that are raising
> exceptions (CORBA.UserException) but I cannot 
> seem to catch them in Java (I'm using try ... catch properly on Java
> side and my stubs were properly generated).
> What I get from omniORB is just:
> 
> omniORB: Caught an unexpected Python exception during up-call.
> Traceback (most recent call last):
>   File
> "D:\work\build_workon_stable\analysis\1.1.0\lib\host\engine\intf\DataFil
> e.py", line 449, in getDataObjectByGUID
>     raise ExceptionM.DataException(msg[2:] %(self.getName(), guid))
> intf.stubsCORBA.ExceptionM.DataException: 
> intf.stubsCORBA.ExceptionM.DataException(msg='analysis_simulator_setup_0
> 000.datafile: data object with GUID=e9216c8c-81df-4a78-a25f-bfd855b62881
> not found.')
> 
> and an org.omg.CORBA.UNKNOWN gets to the Java side with minor code 98
> (BTW does anyone know what that minor code means? 
> I couldn't find any reference on it). I searched the omniorb list and I
> found a message from February 2009 
> http://www.omniorb-support.com/pipermail/omniorb-list/2009-February/0299
> 44.html
> 
> I qoute: "The problem is that Fedora 10 has Python 2.5. In Python 2.5,
> exceptions
> were changed to be new-style classes. Older versions of omniORBpy
> assumed they were old-style classes.
> 
> You'll have to update to omniORB 4.1.3 and omniORBpy 3.3 to be able to
> work with Python 2.5."
> 
> I'm using omniORB 4.0.7, omniORBpy 2.7 and Python 2.5 on Windows XP, so
> does the above apply to my 
> situation also (I kind of think it does but I need a confirmation)?
> 
> Thank you!
> 
> Marius Cetateanu  
> DevTech  - Software Engineer
> Freescale Semiconductor Romania SRL 
> 45, Tudor Vladimirescu Street 
> Tati Business Center 
> Bucharest 050881, Romania 
> www.freescale.com 
> Phone:    +040 213052078 
> Mobile:    +040 742191809 
> Fax:        +040 213052000 
> email:  Marius.Cetateanu at freescale.com
> 
> 
> _______________________________________________
> 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