Uploaded image for project: 'XMLBeans'
  1. XMLBeans
  2. XMLBEANS-236

NPE when running scomp on this schema

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: Version 2.1
    • Fix Version/s: TBD
    • Component/s: Compiler
    • Labels:
      None
    • Environment:
      Windows

      Description

      Please see the attached schema. If you run the following scomp on it you get the NPE below:

      scomp -d classes -src src -javasource 1.5 -mx 500m schema

      NPE:

      Exception in thread "main" java.lang.NullPointerException
      at org.apache.xmlbeans.impl.schema.SchemaTypeImpl.getIndexForLocalAttribute(SchemaTypeImpl.java:690)
      at org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl$XsbReader.writeTypeData(SchemaTypeSystemImpl.java:2698)
      at org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl.saveType(SchemaTypeSystemImpl.java:1439)
      at org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl.saveTypesRecursively(SchemaTypeSystemImpl.java:1316)
      at org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl.saveTypesRecursively(SchemaTypeSystemImpl.java:1317)
      at org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl.saveTypesRecursively(SchemaTypeSystemImpl.java:1317)
      at org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl.saveTypesRecursively(SchemaTypeSystemImpl.java:1317)
      at org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl.save(SchemaTypeSystemImpl.java:1291)
      at org.apache.xmlbeans.impl.tool.SchemaCompiler.compile(SchemaCompiler.java:1098)
      at org.apache.xmlbeans.impl.tool.SchemaCompiler.main(SchemaCompiler.java:368)

        Attachments

        1. data-model.xsd
          26 kB
          Lawrence Aston Jones
        2. Untitled5.xsd
          0.9 kB
          Michael Skells
        3. xmlBeans236.patch
          2 kB
          Lawrence Aston Jones
        4. xmlbeans_236.patch2
          1 kB
          Lawrence Aston Jones

          Activity

            People

            • Assignee:
              ljones Lawrence Aston Jones
              Reporter:
              ljones Lawrence Aston Jones
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: