Uploaded image for project: 'Tuscany'
  1. Tuscany
  2. TUSCANY-1853

XSD2JavaGenerator generates Java identifier with dots

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Java-SDO-1.0
    • Java-SDO-1.1
    • Java SDO Tools
    • None
    • Windows XP, jre 1.5

    Description

      Hello,

      While I'm trying to compile generated by XSD2JavaGenerator Java classes, I've got such an error:

      [javac] C:\projekty\eclipse-workspace-rbpl-sdo-1.0\REB-Catalog-SDO-Java\src-autogen\pl\esb\impl\EsbFactoryImpl.java:169: ';' expected
      [javac] pl.esb.blm.adapter.AdapterFactory pl.esb.blm.adapter.AdapterFactoryInstance = pl.esb.blm.adapter.AdapterFactory.INSTANCE;
      [javac] ^

      The problem is: variable identifier cannot contain dots.
      The place, where this error appears looks like this:

      public static EsbFactoryImpl init()

      { if (instance != null ) return instance; instance = new EsbFactoryImpl(); // Initialize dependent packages AdapterFactory AdapterFactoryInstance = AdapterFactory.INSTANCE; RebFactory RebFactoryInstance = RebFactory.INSTANCE; pl.raiffeisen.esb.blm.adapter.AdapterFactory pl.raiffeisen.esb.blm.adapter.AdapterFactoryInstance = pl.raiffeisen.esb.blm.adapter.AdapterFactory.INSTANCE; // Create package meta-data objects instance.createMetaData(); // Initialize created meta-data instance.initializeMetaData(); // Mark meta-data to indicate it can't be changed //theEsbFactoryImpl.freeze(); //FB do we need to freeze / should we freeze ???? return instance; }

      I think the problem is that I have two namespaces of the same suffix:
      http://www.esb.pl/blm/adapter
      http://www.esb.pl/ods1/adapter
      So, generator is trying to avoid the problem creating unique variable name: pl.esb.blm.adapter.AdapterFactoryInstance
      Unfortunately, this is not valid identifier.

      Kind Regards,
      Czarek

      Attachments

        Activity

          People

            Unassigned Unassigned
            ctkaczyk Cezary Tkaczyk
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: