This very much looks like a bug in XMLBeans. If you have a consistent
repro (which you seem to have) it would be great to open a JIRA issue
(http://issues.apache.org/jira/secure/BrowseProject.jspa?id=10436) and
put the repro there, so we can track this. If you do not have a JIRA
account, you can post the Schemas (or ideally a subset of the Schemas
enough to reproduce the problem) to the list, and we will transfer them
to JIRA.
 
In the meantime, I would say that compiling both Schemas at the same
time is the workaround. Also, splitting Schemas in two jars when there
are dependencies between Schemas does work, but apparently only in 99.9%
of the cases.
 
Thanks,
Radu


________________________________

        From: Mikael Lindkvist [mailto:[EMAIL PROTECTED] 
        Sent: Wednesday, October 31, 2007 6:21 AM
        To: [email protected]
        Subject: Problem with multiple Jars with schema classes
        
        
        Hi,
        
        Im  using datatypes defined in HL7 (Health Level 7) schemas.
These schemas contains a large number of datatypes that I have compiled
(with "scomp" into a jar e.g "hl7.jar". 
        
        Im  also using datatypes from other schemas that have been
compiled into other jars (with "scomp")  e.g "appX.jar". Many of these
datatypes are extensions of the hl7 datatypes so when I compile appX.jar
I add  hl7.jar to my classpath so that they are not included int
appX.jar.
        
        When I run my application (which has both hl7.jar and appX.jar
in the classpath) I get the error:
        
------------------------------------------------------------------------
----------------------------
        Exception in thread "main" java.lang.NullPointerException 
            at
org.apache.xmlbeans.impl.schema.SchemaPropertyImpl.getType(SchemaPropert
yImpl.java:92)
            at
org.apache.xmlbeans.impl.schema.SchemaTypeImpl.createAttributeType(Schem
aTypeImpl.java:1042)
            at
org.apache.xmlbeans.impl.values.XmlObjectBase.create_attribute_user
(XmlObjectBase.java:915)
            at
org.apache.xmlbeans.impl.store.Xobj.getUser(Xobj.java:1657)
            at
org.apache.xmlbeans.impl.store.Xobj.add_attribute_user(Xobj.java:2254)
            at
se.sll.gvd.common.hl7.datatypes.impl.IIImpl.setAssigningAuthorityName
(Unknown Source)
        
------------------------------------------------------------------------
-------------------------
        
        This only occurs when I am using datatypes defined in appX.jar
that are extensions of datatypes in hl7.jar.
        If I compile all the schemas into one single jar-file everything
works fine. 
        
        Is this a bug in XMLBeans ??? Can I only split schemas between
jars when there are no dependencies between the schemas ??
        
        Im using XMLBeans ver 2.3.0
        
        regards,
        
        Mikael Lindkvist
        


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.

Reply via email to