Many thanks. Cheers, Jenny ________________________________
From: Radu Preotiuc-Pietro [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 23, 2008 4:00 PM To: [email protected] Subject: RE: NPE issue during compile time The issue that you filed for this problem (XMLBEANS-360) has been resolved. Thanks, Radu ________________________________ From: Jenny Qin [mailto:[EMAIL PROTECTED] Sent: Monday, April 21, 2008 8:47 AM To: [email protected] Subject: NPE issue during compile time Hi, I have encountered a 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.writeType Data(SchemaTypeSystemImpl.java:2872) at org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl.saveType(SchemaType SystemImpl.java:1454) at org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl.saveTypesRecursivel y(SchemaTypeSystemImpl.java:1331) at org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl.saveTypesRecursivel y(SchemaTypeSystemImpl.java:1332) at org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl.save(SchemaTypeSyst emImpl.java:1307) at org.apache.xmlbeans.impl.tool.SchemaCompiler.compile(SchemaCompiler.java :1126) at org.apache.xmlbeans.impl.tool.SchemaCompiler.main(SchemaCompiler.java:37 3) 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". I was able to pin point the issue to the syntax below ... which seems to have caused a null SchemaStringEnumEntry[] while trying to writeTypeData inside SchemaTypeSystemImpl. As far as I can tell the syntax seems to be valid, I was able to run it through a validator and was able to compile it in jaxb. <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> I have also noticed that if I change the above syntax to the following then it would compile in XMLBeans <xs:simpleType name = "XYZEnum"> <xs:retriction base="xs:token"> <xs:enumeration value="abc"/> <xs:enumeration value="def"/> <xs:enumeration value="unknown"/> </xs:restriction> </xs:simpleType> <xs:element name="XYZType"> <xs:complexType> <xs:extension base="event: XYZEnum"> </xs:extension> </xs:complexType> </xs:element> I believe the two are semantically the same. I don't understand why one would compile while the other won't. Any suggestion/input would be greatly appreciated. Thanks, Jenny p.s. I am running the latest 2.3.0 release. Notice: This email message, together with any attachments, may contain information of BEA Systems, Inc., its subsidiaries and affiliated entities, that may be confidential, proprietary, copyrighted and/or legally privileged, and is intended solely for the use of the individual or entity named in this message. If you are not the intended recipient, and have received this message in error, please immediately return this by email and then delete it.

