[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xmlbeans-dev
Subject:    [jira] Commented: (XMLBEANS-360) NPE issue in Main during compile
From:       "Jenny Qin (JIRA)" <xmlbeans-dev () xml ! apache ! org>
Date:       2008-01-25 18:47:34
Message-ID: 11328393.1201286854724.JavaMail.jira () brutus
[Download RAW message or body]


    [ https://issues.apache.org/jira/browse/XMLBEANS-360?page=com.atlassian.jira.plugi \
n.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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic