thanks so much for the help, if you need more info I will be online over the
weekend. The jira issue is CASTOR-1197, I didn't assign a component.

Peggy Davidson
678-645-2587


-----Original Message-----
From: Andrew Fawcett [mailto:[EMAIL PROTECTED]
Sent: Friday, August 12, 2005 8:49 AM
To: [email protected]
Subject: RE: [castor-user] anonymous-simple-type NullPointerException 


This looks like a bug, can you raise a JIRA issue (attach your schemas)
and I'll take a look this weekend. Mail me back with the JIRA issue
number, ta.

http://jira.codehaus.org/browse/CASTOR

-----Original Message-----
From: Davidson, Peggy (MAN-Corporate) [mailto:[EMAIL PROTECTED] 
Sent: 12 August 2005 13:41
To: '[email protected]'
Subject: [castor-user] anonymous-simple-type NullPointerException 

Hi, Could someone please provide me with some help with a npe I am
receiving? When using SourceGenerator (castor-0.9.7.jar,
xerces-2.4.0, jdk1.4.2_06) I am getting a npe for anonymouse-simple-type
when the main xml includes another xml file. It runs fine if I remove
this
included file. I've included 1st the file that gets included, next is a
portion of the main xml file, and lastly is the exception dump. 

Any help would be appreciated

Thanks Peggy



<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema";
elementFormDefault="qualified">
        <xs:simpleType name="DateEmptyAllowed">
                <xs:union>
                        <xs:simpleType>
                                <xs:restriction base="xs:date">
                                </xs:restriction>
                        </xs:simpleType>
                        <xs:simpleType>
                                <xs:restriction base="xs:token">
                                        <xs:enumeration value=""/>
                                </xs:restriction>
                        </xs:simpleType>
                </xs:union>
        </xs:simpleType>
        <xs:simpleType name="PhoneEmptyAllowed">
                <xs:union>
                        <xs:simpleType>
                                <xs:restriction base="xs:string">
                                        <xs:pattern value="[0-9]{10}"/>
                                </xs:restriction>
                        </xs:simpleType>
                        <xs:simpleType>
                                <xs:restriction base="xs:token">
                                        <xs:enumeration value=""/>
                                </xs:restriction>
                        </xs:simpleType>
                </xs:union>
        </xs:simpleType>
        <xs:simpleType name="DecimalEmptyAllowed">
                <xs:union>
                        <xs:simpleType>
                                <xs:restriction base="xs:decimal">
                                </xs:restriction>
                        </xs:simpleType>
                        <xs:simpleType>
                                <xs:restriction base="xs:token">
                                        <xs:enumeration value=""/>
                                </xs:restriction>
                        </xs:simpleType>
                </xs:union>
        </xs:simpleType>
</xs:schema>

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema";
elementFormDefault="qualified">
<xs:include schemaLocation="EmptyAllowed.xsd"/>
<xs:include schemaLocation="BusinessTypes.xsd"/>
        <xs:element name="AddressLine">
                <xs:simpleType>
                        <xs:restriction base="xs:string">
                                <xs:maxLength value="80"/>
                        </xs:restriction>
                </xs:simpleType>
        </xs:element>
        <xs:element name="AddressLine1">
                <xs:simpleType>
                        <xs:restriction base="xs:string">
                                <xs:maxLength value="40"/>
                        </xs:restriction>
                </xs:simpleType>
        </xs:element>
        <xs:element name="AddressLine2">
                <xs:simpleType>
                        <xs:restriction base="xs:string">
                                <xs:maxLength value="40"/>
                        </xs:restriction>
                </xs:simpleType>
        </xs:element>
        <xs:element name="AddressType">
                <xs:simpleType>
                        <xs:restriction base="xs:string">
                                <xs:maxLength value="32"/>
                        </xs:restriction>
                </xs:simpleType>
        </xs:element>
        <xs:element name="Boat">
                <xs:simpleType>
                        <xs:restriction base="xs:string">
                                <xs:enumeration value="Y"/>
                                <xs:enumeration value="N"/>
                        </xs:restriction>
                </xs:simpleType>
        </xs:element>
        <xs:element name="BoatLicenseInfo" type="LicenseInformation">
        </xs:element>
        <xs:element name="BondExpirationDate">
                <xs:simpleType>
                        <xs:restriction base="DateEmptyAllowed">
                        </xs:restriction>
                </xs:simpleType>
        </xs:element>
</xs:schema>

Error: could not find the built in parent type for:
anonymous-simple-type
java.lang.NullPointerException
        at
org.exolab.castor.xml.schema.reader.SimpleTypeDefinition.createSimple
Type(SimpleTypeDefinition.java:141)
        at
org.exolab.castor.xml.schema.reader.SimpleTypeUnmarshaller.getSimpleT
ype(SimpleTypeUnmarshaller.java:162)
        at
org.exolab.castor.xml.schema.reader.ElementUnmarshaller.endElement(El
ementUnmarshaller.java:400)
        at
org.exolab.castor.xml.schema.reader.SchemaUnmarshaller.endElement(Sch
emaUnmarshaller.java:580)
        at
org.exolab.castor.xml.schema.reader.Sax2ComponentReader.endElement(Sa
x2ComponentReader.java:198)
        at
org.apache.xerces.parsers.SAXParser.endElement(SAXParser.java:1392)
        at
org.apache.xerces.validators.common.XMLValidator.callEndElement(XMLVa
lidator.java:1436)
        at
org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.disp
atch(XMLDocumentScanner.java:1205)
        at
org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentS
canner.java:381)
        at
org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1035)
        at
org.exolab.castor.builder.SourceGenerator.generateSource(SourceGenera
tor.java:430)
        at
org.exolab.castor.builder.SourceGenerator.generateSource(SourceGenera
tor.java:485)
        at
org.exolab.castor.builder.SourceGenerator.main(SourceGenerator.java:8
65)


-------------------------------------------------
If you wish to unsubscribe from this list, please 
send an empty message to the following address:

[EMAIL PROTECTED]
-------------------------------------------------



CODA has a new world-class consolidation package.
Find out more about www.coda.com/ocra <http://www.coda.com/ocra> 


The information in this message is confidential and may be legally
privileged. It may not be disclosed to, or used by, anyone other than the
addressee. If you receive this message in error, please advise us
immediately.  Internet emails are not necessarily secure. CODA does not
accept responsibility for changes to any email which occur after the email
has been sent. Attachments to this email may contain software viruses, which
could damage your systems. CODA has checked the attachments for viruses
before sending, but you should virus-check them before opening. 


-------------------------------------------------
If you wish to unsubscribe from this list, please 
send an empty message to the following address:

[EMAIL PROTECTED]
-------------------------------------------------

-------------------------------------------------
If you wish to unsubscribe from this list, please 
send an empty message to the following address:

[EMAIL PROTECTED]
-------------------------------------------------

Reply via email to