Compilation of the following IDL results in the error message: [jacidl] processing idl file: D:\Uni\Diplomarbeit\Tests\Example\Client\idl\Example_0.idl [jacidl] [jacorb.idl] ERROR : Example_0.idl, line:222(31): Undefined name: Example._.Reflective.RefPackage [jacidl] Can't recover from previous error(s), giving up. [jacidl] : ::Reflective::RefPackage [jacidl] org.jacorb.idl.ParseException: Parse error More to that the line number seems to be incorrect because it changes when I run it again. It is sometimes even greater than the last line of the IDL file. I'm using JDK 1.4.2.07. on Windows XP (SP2). The compiler doesn't seem to understand an interface declaration of the form: "interface" <identifier> ":" "::" <identifier>"::"<identifier> such as inteface ExamplePackage: ::Reflective::RefPackage which is a legal IDL synthax. This is my Example_0.idl: #include <Reflective.idl> #include <CorbaIdlTypes.idl> #include <PrimitiveTypes.idl> #ifndef _Example_0_idl_ #define _Example_0_idl_ module Example { interface WriterClass; interface LibraryClass; interface BookClass; interface ExamplePackage : ::Reflective::RefPackage { readonly attribute Example::WriterClass writer_ref; readonly attribute Example::LibraryClass library_ref; readonly attribute Example::BookClass book_ref; }; interface Writer; typedef sequence < Writer > WriterSet; /* class proxy::Example::Writer */ interface WriterClass : ::Reflective::RefObject { readonly attribute Example::WriterSet all_of_type_writer; readonly attribute Example::WriterSet all_of_class_writer; Example::Writer create_writer ( in wstring name) raises ( Reflective::MofError); }; interface Book; typedef sequence < Book > BookSet; interface Library; /* ::Example::Writer */ interface Writer : WriterClass { wstring name ( ) raises ( Reflective::MofError); void set_name ( in wstring new_value) raises ( Reflective::MofError); Example::BookSet books ( ) raises ( Reflective::MofError); void set_books ( in Example::BookSet new_value) raises ( Reflective::MofError); void add_books ( in Example::Book new_element) raises ( Reflective::MofError); void modify_books ( in Example::Book old_element, in Example::Book new_element) raises ( Reflective::NotFound, Reflective::MofError); void remove_books ( in Example::Book old_element) raises ( Reflective::NotFound, Reflective::MofError); Example::Library library ( ) raises ( Reflective::MofError); void set_library ( in Example::Library new_value) raises ( Reflective::MofError); }; typedef sequence < Library > LibrarySet; /* class proxy::Example::Library */ interface LibraryClass : ::Reflective::RefObject { readonly attribute Example::LibrarySet all_of_type_library; readonly attribute Example::LibrarySet all_of_class_library; Example::Library create_library ( in wstring name) raises ( Reflective::MofError); }; /* ::Example::Library */ interface Library : LibraryClass { wstring name ( ) raises ( Reflective::MofError); void set_name ( in wstring new_value) raises ( Reflective::MofError); Example::WriterSet writers ( ) raises ( Reflective::MofError); void set_writers ( in Example::WriterSet new_value) raises ( Reflective::MofError); void add_writers ( in Example::Writer new_element) raises ( Reflective::MofError); void modify_writers ( in Example::Writer old_element, in Example::Writer new_element) raises ( Reflective::NotFound, Reflective::MofError); void remove_writers ( in Example::Writer old_element) raises ( Reflective::NotFound, Reflective::MofError); Example::BookSet books ( ) raises ( Reflective::MofError); void set_books ( in Example::BookSet new_value) raises ( Reflective::MofError); void add_books ( in Example::Book new_element) raises ( Reflective::MofError); void modify_books ( in Example::Book old_element, in Example::Book new_element) raises ( Reflective::NotFound, Reflective::MofError); void remove_books ( in Example::Book old_element) raises ( Reflective::NotFound, Reflective::MofError); }; /* ::Example::BookCategory */ enum BookCategory { Fantasy, Biography, ScienceFiction, NonFiction, Novel }; /* class proxy::Example::Book */ interface BookClass : ::Reflective::RefObject { readonly attribute Example::BookSet all_of_type_book; readonly attribute Example::BookSet all_of_class_book; Example::Book create_book ( in wstring title, in long pages, in Example::BookCategory category) raises ( Reflective::MofError); }; /* ::Example::Book */ interface Book : BookClass { Example::BookCategory category ( ) raises ( Reflective::MofError); void set_category ( in Example::BookCategory new_value) raises ( Reflective::MofError); long pages ( ) raises ( Reflective::MofError); void set_pages ( in long new_value) raises ( Reflective::MofError); wstring title ( ) raises ( Reflective::MofError); void set_title ( in wstring new_value) raises ( Reflective::MofError); Example::Library library ( ) raises ( Reflective::MofError); void set_library ( in Example::Library new_value) raises ( Reflective::MofError); Example::WriterSet author ( ) raises ( Reflective::MofError); void set_author ( in Example::WriterSet new_value) raises ( Reflective::MofError); void add_author ( in Example::Writer new_element) raises ( Reflective::MofError); void modify_author ( in Example::Writer old_element, in Example::Writer new_element) raises ( Reflective::NotFound, Reflective::MofError); void remove_author ( in Example::Writer old_element) raises ( Reflective::NotFound, Reflective::MofError); }; interface ExamplePackageFactory : ::Reflective::RefPackageFactory { Example::ExamplePackage create_example_package ( ) raises ( Reflective::MofError); }; }; // end module Example #endif
The problem was with the name resolution algorithm that escapes identifiers that end in "Package". (This suffix is reseved in the IDL Java mapping). The fix is committed, but to workaround without updating from CVS or waiting for a new release, you can simply rename your interfaces and avoid the "Package" suffix.
*** Bug 559 has been marked as a duplicate of this bug. ***
*** Bug 639 has been marked as a duplicate of this bug. ***
*** Bug 436 has been marked as a duplicate of this bug. ***