Read only archive ; use https://github.com/JacORB/JacORB/issues for new issues
Bug 470 - RuntimeException from IDL compiler
Summary: RuntimeException from IDL compiler
Status: RESOLVED FIXED
Alias: None
Product: JacORB
Classification: Unclassified
Component: IDL compiler (show other bugs)
Version: 2.1
Hardware: All All
: P2 normal
Assignee: Gerald Brose
URL:
Depends on:
Blocks:
 
Reported: 2004-03-25 05:26 UTC by Brian Wallis
Modified: 2005-10-03 22:48 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brian Wallis 2004-03-25 05:26:16 UTC
For the following IDL which I believe is valid (I have two contants declared 
fred::x and charlie::x): 
 
interface fred { 
  const unsigned long x = 0xffffffff; 
}; 
 
interface charlie : fred { 
  const unsigned long x = 0xffffffff; 
}; 
 
I get the following error when compiling with the idl compiler: 
 
% idl -noskel -d output -I. test.idl 
java.lang.RuntimeException: Could not find definition of : charlie.x 
        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.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 : /work/wallis/TrainingExamples/CXX/ciidl/test.idl, line: 
 8(1): Exception: java.lang.RuntimeException: Could not find definition of : 
 charlie.x 
 
-noskel -d output -I. test.idl  : Could not find definition of : charlie.x 
Usage: idl [-h|-help][-v|-version][-Dsymbol[=value]][-Idir][-U<symbol>][-W 
 debug_level ][-all][-forceOverwrite][-ami_callback][-ami_polling][-backend 
 classname][-d <Output Dir>][-unchecked_narrow][-i2jpackage 
 x:y][-i2jpackagefile 
 <filename>][-cldc10][-ir][-nofinal][-noskel][-nostub][-sloppy_forward][-slop 
py_names][-permissive_rmic][-syntax] <filelist> 
 
Even if the IDL is invalid, the runtime exception is an inappropriate way to 
report it.
Comment 1 Gerald Brose 2004-03-25 08:48:35 UTC
Sure, the stack trace is not definitely not intended to surface
at all, that's a plain bug.

Thanks, Gerald.
Comment 2 Iliyan Jeliazkov 2005-09-09 23:54:59 UTC
Is org.jacorb.idl.TypeMap.removeDefinition() supposed to throw a runtime
exception when the type definition of a symbol (constant, in this particular
case) is not found?
Comment 3 André Spiegel 2005-10-03 22:48:58 UTC
This should be fixed now by the patch for bug 616, which I just installed.