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

NPE issue in Main during compile time

    XMLWordPrintableJSON

    Details

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

      Description

      Hi,

      I have encountered the NPE issue during compile time with the following error:

      >scomp -d class_xsb -src src -srconly -mx 500m datamodel.xsd
      Time to build schema type system: 2.657 seconds Exception in thread "main" java.lang.NullPointerException
      at
      org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl$XsbReader.writeTypeData(SchemaTypeSystemImpl.java:2872)
      at
      org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl.saveType(SchemaTypeSystemImpl.java:1454)
      at
      org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl.saveTypesRecursively(SchemaTypeSystemImpl.java:1331)
      at
      org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl.saveTypesRecursively(SchemaTypeSystemImpl.java:1332)
      at
      org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl.save(SchemaTypeSystemImpl.java:1307)
      at
      org.apache.xmlbeans.impl.tool.SchemaCompiler.compile(SchemaCompiler.java:1126)
      at
      org.apache.xmlbeans.impl.tool.SchemaCompiler.main(SchemaCompiler.java:373)

      The problem happens during a .xsd compile using scomp: after it generated all the .xsb files and the schema type system generation is said to have completed, then It failed I think while attempting to create a "TypeSystemHolder.class".

      The same .xsd compiles and can generate codes from it using "jaxb".

      I noticed the path lead to the NPE is very similar to a problem reported in the=3D20
      http://issues.apache.org/jira/browse/XMLBEANS-236
      I am running the latest 2.3.0 release which has the patch described in the problem report.
      Not sure if the problem is related.

      Any suggestion/input would be greatly appreciated.

      Thanks,
      Jenny

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              jqin Becket Qin
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: