Read only archive ; use https://github.com/JacORB/JacORB/issues for new issues

Bug 827

Summary: AMI code generation for exceptions is incorrect
Product: JacORB Reporter: Andrew Kulikovsky <andrew.kulikovsky>
Component: IDL compilerAssignee: Gerald Brose <gerald.brose>
Status: RESOLVED INVALID    
Severity: minor CC: jacorb
Priority: P2    
Version: 2.3.0   
Hardware: PC   
OS: All   

Description Andrew Kulikovsky 2008-05-02 05:01:34 UTC
When using idl tool with -ami_callback and -i2jpackage options generates an incorrect id for any user defined exceptions in the IDL file.

eg.

module XYZ {
   interface Abc {
      MyException {};
      :
   };
};

The idl tool will generate MyExceptionHelper code that returns the following id:
"IDL:XYZ/Abc/MyException:1.0"

There is no problem if the -i2jpackage option is NOT used, because the namespace of the code matches the generated id.

However, if you use the -i2jpackage option (eg. -i2jpackage XYZ:com.goob.blah.XYZ) then the generated id remains the same as above, and if MyException is raised by the server the corresponding ExceptionHolder generates org.omg.CORBA.UnknownUserException instead of MyException.

To fix this problem manually, modify the string returned in the id() function in MyExceptionHelper i.e. "IDL:com.goob/blah/XYZ/Abc/MyException:1.0"

The idl tool code generator should be modified to reflect the new namespace specified by the -i2jpackage option.
Comment 1 Nick Cross 2013-12-23 06:36:13 UTC
The repository ID is meant to equate to the IDL specification of a repository ID; the i2jpackage just allows customisation for the Java packaging.