You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xmlbeans.apache.org by "Jenny Qin (JIRA)" <xm...@xml.apache.org> on 2008/01/22 15:02:34 UTC

[jira] Created: (XMLBEANS-360) NPE issue in Main during compile time

NPE issue in Main during compile time 
--------------------------------------

                 Key: XMLBEANS-360
                 URL: https://issues.apache.org/jira/browse/XMLBEANS-360
             Project: XMLBeans
          Issue Type: Bug
          Components: Compiler
    Affects Versions:  Version 2.3
            Reporter: Jenny Qin


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

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org


[jira] Commented: (XMLBEANS-360) NPE issue in Main during compile time

Posted by "Jenny Qin (JIRA)" <xm...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XMLBEANS-360?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12562618#action_12562618 ] 

Jenny Qin commented on XMLBEANS-360:
------------------------------------

I was able to pin point the issue to the syntax below ... which seems to cause a null SchemaStringEnumEntry[] while trying to writeTypeData inside SchemaTypeSystemImpl.

But the syntax is valid, according to validator and some other compiler. Any ideas out there?

<xs:element name="XYZType">
    <xs:complexType>
      <xs:simpleContent>
        <xs:restriction base="xs:anyType">
          <xs:simpleType>
            <xs:retriction base="xs:token">
              <xs:enumeration value="abc"/>
              <xs:enumeration value="def"/>
              <xs:enumeration value="unknown"/>
            </xs:restriction>
          </xs:simpleType>
          </xs:restriction>
      </xs:simpleContent>
    </xs:complexType>
  </xs:element>


> NPE issue in Main during compile time 
> --------------------------------------
>
>                 Key: XMLBEANS-360
>                 URL: https://issues.apache.org/jira/browse/XMLBEANS-360
>             Project: XMLBeans
>          Issue Type: Bug
>          Components: Compiler
>    Affects Versions:  Version 2.3
>            Reporter: Jenny Qin
>
> 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

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org


[jira] Resolved: (XMLBEANS-360) NPE issue in Main during compile time

Posted by "Radu Preotiuc-Pietro (JIRA)" <xm...@xml.apache.org>.
     [ https://issues.apache.org/jira/browse/XMLBEANS-360?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Radu Preotiuc-Pietro resolved XMLBEANS-360.
-------------------------------------------

       Resolution: Fixed
    Fix Version/s: TBD

Revision 646955 fixes this.

> NPE issue in Main during compile time 
> --------------------------------------
>
>                 Key: XMLBEANS-360
>                 URL: https://issues.apache.org/jira/browse/XMLBEANS-360
>             Project: XMLBeans
>          Issue Type: Bug
>          Components: Compiler
>    Affects Versions:  Version 2.3
>            Reporter: Jenny Qin
>             Fix For: TBD
>
>
> 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

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org