We use interitance quite heavily in our app and inevitably we will reuse the same class variable names. But redefinition is allowed with inheritance in IDL. Under jacorb 1.4 this worked fine. Under 2.2 it is failing to compile. Sample code: interface A { const string NAME = "interface_A"; }; interface B : A { const string NAME = "interface_B"; }; This code above compiles under 1.4 and TAO but fails under 2.2 with message: java.lang.RuntimeException: Could not find definition of : B.NAME at org.jacorb.idl.TypeMap.removeDefinition(Unknown Source) at org.jacorb.idl.NameTable.define(Unknown Source) at org.jacorb.idl.ConstDecl.parse(Unknown Source) at org.jacorb.idl.InterfaceBody.internal_parse(Unknown Source) at org.jacorb.idl.InterfaceBody.parse(Unknown Source) at org.jacorb.idl.Interface.parse(Unknown Source) at org.jacorb.idl.Definition.parse(Unknown Source) at org.jacorb.idl.Spec.parse(Unknown Source) at org.jacorb.idl.CUP$actions.CUP$do_action(Unknown Source) at org.jacorb.idl.parser.do_action(Unknown Source) at org.jacorb.idl.runtime.lr_parser.parse(Unknown Source) at org.jacorb.idl.parser.prepareAndParse(Unknown Source) at org.jacorb.idl.parser.compile(Unknown Source) at org.jacorb.idl.parser.compile(Unknown Source) at org.jacorb.idl.parser.compileAndHandle(Unknown Source) at org.jacorb.idl.parser.main(Unknown Source) [jacorb.idl] ERROR : C:\Projects\test_jacorb.idl, line: 9(1): Exception: java.la ng.RuntimeException: Could not find definition of : B.NAME
This is quite correct as per the CORBA spec. Redefinition is *not* allowed. You need to change your IDL so it conforms. See bug 479 for more.
*** This bug has been marked as a duplicate of 479 ***
Sorry - my mistake. I didn't read that properly. I thought they were attributes rather than consts. Not a duplicate at all.
*** Bug 613 has been marked as a duplicate of this bug. ***
*** Bug 624 has been marked as a duplicate of this bug. ***
Created attachment 180 [details] proposed patch. Gives correct result for given testcase
this bug seems to be the same as bug #616. The patch given there resolves the problem in this bug, too.
Should be solved now by the patch for bug 616, which I just installed.