You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@xmlbeans.apache.org by Kevin Krouse <kk...@bea.com> on 2004/11/02 00:17:44 UTC

RE: scomp NullPointerException in getIndexForLocalElement

I think this is the fix -- revision 1.4 of
v1/src/typeimpl/org/apache/xmlbeans/impl/schema/StscComplexTypeResolver.
java.  Here is the diff:

http://cvs.apache.org/viewcvs.cgi/xml-xmlbeans/v1/src/typeimpl/org/apach
e/xmlbeans/impl/schema/StscComplexTypeResolver.java?r1=1.3&r2=1.4&diff_f
ormat=h

I'll try to get the jdk1.3 v1 source line up to date with the main v1
source line sometime soon.

--k

-----Original Message-----
From: Chad Small [mailto:Chad.Small@definityhealth.com] 
Sent: Friday, October 29, 2004 12:01 PM
To: user@xmlbeans.apache.org
Subject: RE: scomp NullPointerException in getIndexForLocalElement

That fixed that problem - thanks Kevin!  I did have are minOccurs and
maxOccurs in the schema.  

Now new problem related to this.

We are still on jdk1.3 (will not upgrade until spring '05) and I would
like to use the ported V1 XMLBeans jdk1.3 version.  But you guessed it,
I grabbed that source branch, compiled, and then received the same
NullPointerException problem.  I guess the V1 jdk1.3 branch was not
updated with Kevin's fix.

So I guess my question is how might I find the code fix that I can
compile into the V1 jdk1.3 version? 

thanks,
chad.

-----Original Message-----
From: Kevin Krouse [mailto:kkrouse@bea.com] 
Sent: Wednesday, October 27, 2004 3:29 PM
To: user@xmlbeans.apache.org
Subject: RE: scomp NullPointerException in getIndexForLocalElement

Hi Chad,
 
I fixed a bug in v1 after the 1.0.3 release.  Can you try getting the
latest version of v1 from cvs and recompiling?

The problem, if I remember correctly, is you have an anonymous type that
has minOccurs=maxOccurs=0.  It should look something like this:

<xs:element name="root">
  <xs:complexType>
    <xs:sequence>
      <xs:element name="a" minOccurs="0" maxOccurs="0">
        <!-- this is the anonymous type -->
        <xs:simpleType>
          <xs:restriction base="xs:string"/>
        </xs:simpleType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
</xs:element>

--k

________________________________

From: Chad Small [mailto:Chad.Small@definityhealth.com] 
Sent: Wednesday, October 27, 2004 6:28 AM
To: user@xmlbeans.apache.org
Subject: scomp NullPointerException in getIndexForLocalElement



I'm getting this exception when running scomp.  I don't see anything in
the archive mails related to this exception.  And I'm sorry that I can't
provide the xsd publicly.  The schema being scomp'ed passes all validity
and well-formedness in XML Spy.  

 

Any ideas on the problem?

 

D:\DefinityWork\XMLBeans>d:\applications\xmlbeans-1.0.3\bin\scomp -out
270.jar 270.xsd

Time to build schema type system: 1.469 seconds

Exception in thread "main" java.lang.NullPointerException

        at
org.apache.xmlbeans.impl.schema.SchemaTypeImpl.getIndexForLocalElement(S
chemaTypeImpl.java:613)

        at
org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl$XsbReader.writeType
Data(SchemaTypeSystemImpl.java:2041)

        at
org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl.saveType(SchemaType
SystemImpl.java:1004)

        at
org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl.saveTypesRecursivel
y(SchemaTypeSystemImpl.java:901)

        at
org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl.saveTypesRecursivel
y(SchemaTypeSystemImpl.java:902)

        at
org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl.saveTypesRecursivel
y(SchemaTypeSystemImpl.java:902)

        at
org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl.saveTypesRecursivel
y(SchemaTypeSystemImpl.java:902)

        at
org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl.saveTypesRecursivel
y(SchemaTypeSystemImpl.java:902)

        at
org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl.saveTypesRecursivel
y(SchemaTypeSystemImpl.java:902)

        at
org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl.saveToDirectory(Sch
emaTypeSystemImpl.java:879)

        at
org.apache.xmlbeans.impl.tool.SchemaCodeGenerator.compileTypeSystem(Sche
maCodeGenerator.java:45)

        at
org.apache.xmlbeans.impl.tool.SchemaCompiler.compile(SchemaCompiler.java
:798)

        at
org.apache.xmlbeans.impl.tool.SchemaCompiler.main(SchemaCompiler.java:26
4)

 

thanks,

chad.


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


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


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