<?xml version="1.0" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.jacorb.org/bugzilla/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.2"
          urlbase="https://www.jacorb.org/bugzilla/"
          
          maintainer="jacorb@goots.org"
>

    <bug>
          <bug_id>610</bug_id>
          
          <creation_ts>2005-07-06 13:55:19 +0000</creation_ts>
          <short_desc>IDL Compiler interpretes interface declarartion wrongly and breaks down as a result</short_desc>
          <delta_ts>2005-11-19 22:13:54 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>JacORB</product>
          <component>IDL compiler</component>
          <version>2.2.2</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows 2000</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P1</priority>
          <bug_severity>blocker</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Omar Ekine">ekimagic</reporter>
          <assigned_to name="Gerald Brose">gerald.brose</assigned_to>
          <cc>athakur</cc>
    
    <cc>jcala</cc>
    
    <cc>john.seltzer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1471</commentid>
    <comment_count>0</comment_count>
    <who name="Omar Ekine">ekimagic</who>
    <bug_when>2005-07-06 13:55:19 +0000</bug_when>
    <thetext>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&apos;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&apos;m using JDK 1.4.2.07. on Windows XP (SP2). The compiler doesn&apos;t seem to 
understand an interface declaration of the form:

&quot;interface&quot; &lt;identifier&gt; &quot;:&quot; &quot;::&quot; &lt;identifier&gt;&quot;::&quot;&lt;identifier&gt;

such as

inteface ExamplePackage: ::Reflective::RefPackage

which is a legal IDL synthax.

This is my Example_0.idl:

#include &lt;Reflective.idl&gt;
#include &lt;CorbaIdlTypes.idl&gt;
#include &lt;PrimitiveTypes.idl&gt;

#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 &lt; Writer &gt;  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 &lt; Book &gt;  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 &lt; Library &gt;  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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1628</commentid>
    <comment_count>1</comment_count>
    <who name="Gerald Brose">gerald.brose</who>
    <bug_when>2005-11-19 20:13:42 +0000</bug_when>
    <thetext>The problem was with the name resolution algorithm that escapes identifiers
that end in &quot;Package&quot;. (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 
&quot;Package&quot; suffix.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1631</commentid>
    <comment_count>2</comment_count>
    <who name="Gerald Brose">gerald.brose</who>
    <bug_when>2005-11-19 21:37:17 +0000</bug_when>
    <thetext>*** Bug 559 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1634</commentid>
    <comment_count>3</comment_count>
    <who name="Gerald Brose">gerald.brose</who>
    <bug_when>2005-11-19 21:40:12 +0000</bug_when>
    <thetext>*** Bug 639 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1640</commentid>
    <comment_count>4</comment_count>
    <who name="Gerald Brose">gerald.brose</who>
    <bug_when>2005-11-19 22:13:54 +0000</bug_when>
    <thetext>*** Bug 436 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>