Read only archive ; use https://github.com/JacORB/JacORB/issues for new issues
Bug 827 - AMI code generation for exceptions is incorrect
Summary: AMI code generation for exceptions is incorrect
Status: RESOLVED INVALID
Alias: None
Product: JacORB
Classification: Unclassified
Component: IDL compiler (show other bugs)
Version: 2.3.0
Hardware: PC All
: P2 minor
Assignee: Gerald Brose
URL:
Depends on:
Blocks:
 
Reported: 2008-05-02 05:01 UTC by Andrew Kulikovsky
Modified: 2013-12-23 06:36 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.