You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xmlbeans.apache.org by xm...@xml.apache.org on 2004/10/05 20:26:36 UTC
[jira] Created: (XMLBEANS-66) NullPointerException when restricting a union with one of the union members
Message:
A new issue has been created in JIRA.
---------------------------------------------------------------------
View the issue:
http://issues.apache.org/jira/browse/XMLBEANS-66
Here is an overview of the issue:
---------------------------------------------------------------------
Key: XMLBEANS-66
Summary: NullPointerException when restricting a union with one of the union members
Type: Bug
Status: Open
Priority: Major
Project: XMLBeans
Components:
Compiler
Versions:
Version 2
Assignee: Kevin Krouse
Reporter: Kevin Krouse
Created: Tue, 5 Oct 2004 11:25 AM
Updated: Tue, 5 Oct 2004 11:25 AM
Description:
Compile the following trimmed down schema from http://w3.org/TR/xqueryx/#Schema:
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema targetNamespace="http://www.w3.org/2003/12/XQueryX"
xmlns="http://www.w3.org/2003/12/XQueryX"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified"
attributeFormDefault="qualified">
<!-- Kludge for anySimpleType -->
<xsd:simpleType name="constantValueType">
<xsd:union memberTypes="xsd:integer xsd:decimal xsd:string xsd:double"/>
</xsd:simpleType>
<!-- constant expressions. We have 4 different subclasses for this -->
<xsd:complexType name="constantExpr">
<xsd:sequence>
<xsd:element name="value" type="constantValueType"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="integerConstantExpr">
<xsd:complexContent>
<xsd:restriction base="constantExpr">
<xsd:sequence>
<xsd:element name="value" type="xsd:integer"/>
</xsd:sequence>
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
</xsd:schema>
results in:
Exception in thread "main" java.lang.NullPointerException
at org.apache.xmlbeans.impl.schema.StscChecker.checkAllDerivationsForRestriction(StscChecker.java:1412)
at org.apache.xmlbeans.impl.schema.StscChecker.typeDerivationOK(StscChecker.java:1394)
at org.apache.xmlbeans.impl.schema.StscChecker.nameAndTypeOK(StscChecker.java:1337)
at org.apache.xmlbeans.impl.schema.StscChecker.isParticleValidRestriction(StscChecker.java:404)
at org.apache.xmlbeans.impl.schema.StscChecker.checkRestriction(StscChecker.java:364)
at org.apache.xmlbeans.impl.schema.StscChecker.checkAll(StscChecker.java:63)
at org.apache.xmlbeans.impl.schema.SchemaTypeSystemCompiler.compileImpl(SchemaTypeSystemCompiler.java:268)
at org.apache.xmlbeans.impl.schema.SchemaTypeSystemCompiler.compile(SchemaTypeSystemCompiler.java:195)
at org.apache.xmlbeans.impl.tool.SchemaCompiler.loadTypeSystem(SchemaCompiler.java:853)
at org.apache.xmlbeans.impl.tool.SchemaCompiler.compile(SchemaCompiler.java:911)
at org.apache.xmlbeans.impl.tool.SchemaCompiler.main(SchemaCompiler.java:330)
When checkAllDerivationsForRestriction() loops from the derived type down to the base, if the type is a union we continue following one of the types (that is assignable). What is happening now is the derived type is never reaching the base type since the base type is one of the union members.
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org
[jira] Resolved: (XMLBEANS-66) NullPointerException when restricting a union with one of the union members
Posted by xm...@xml.apache.org.
Message:
The following issue has been resolved as FIXED.
---------------------------------------------------------------------
View the issue:
http://issues.apache.org/jira/browse/XMLBEANS-66
Here is an overview of the issue:
---------------------------------------------------------------------
Key: XMLBEANS-66
Summary: NullPointerException when restricting a union with one of the union members
Type: Bug
Status: Resolved
Priority: Major
Resolution: FIXED
Project: XMLBeans
Components:
Compiler
Fix Fors:
Version 2 Beta 1
Versions:
Version 2
Assignee: Jacob Danner
Reporter: Kevin Krouse
Created: Tue, 5 Oct 2004 11:25 AM
Updated: Fri, 22 Oct 2004 7:42 PM
Description:
Compile the following trimmed down schema from http://w3.org/TR/xqueryx/#Schema:
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema targetNamespace="http://www.w3.org/2003/12/XQueryX"
xmlns="http://www.w3.org/2003/12/XQueryX"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified"
attributeFormDefault="qualified">
<!-- Kludge for anySimpleType -->
<xsd:simpleType name="constantValueType">
<xsd:union memberTypes="xsd:integer xsd:decimal xsd:string xsd:double"/>
</xsd:simpleType>
<!-- constant expressions. We have 4 different subclasses for this -->
<xsd:complexType name="constantExpr">
<xsd:sequence>
<xsd:element name="value" type="constantValueType"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="integerConstantExpr">
<xsd:complexContent>
<xsd:restriction base="constantExpr">
<xsd:sequence>
<xsd:element name="value" type="xsd:integer"/>
</xsd:sequence>
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
</xsd:schema>
results in:
Exception in thread "main" java.lang.NullPointerException
at org.apache.xmlbeans.impl.schema.StscChecker.checkAllDerivationsForRestriction(StscChecker.java:1412)
at org.apache.xmlbeans.impl.schema.StscChecker.typeDerivationOK(StscChecker.java:1394)
at org.apache.xmlbeans.impl.schema.StscChecker.nameAndTypeOK(StscChecker.java:1337)
at org.apache.xmlbeans.impl.schema.StscChecker.isParticleValidRestriction(StscChecker.java:404)
at org.apache.xmlbeans.impl.schema.StscChecker.checkRestriction(StscChecker.java:364)
at org.apache.xmlbeans.impl.schema.StscChecker.checkAll(StscChecker.java:63)
at org.apache.xmlbeans.impl.schema.SchemaTypeSystemCompiler.compileImpl(SchemaTypeSystemCompiler.java:268)
at org.apache.xmlbeans.impl.schema.SchemaTypeSystemCompiler.compile(SchemaTypeSystemCompiler.java:195)
at org.apache.xmlbeans.impl.tool.SchemaCompiler.loadTypeSystem(SchemaCompiler.java:853)
at org.apache.xmlbeans.impl.tool.SchemaCompiler.compile(SchemaCompiler.java:911)
at org.apache.xmlbeans.impl.tool.SchemaCompiler.main(SchemaCompiler.java:330)
When checkAllDerivationsForRestriction() loops from the derived type down to the base, if the type is a union we continue following one of the types (that is assignable). What is happening now is the derived type is never reaching the base type since the base type is one of the union members.
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org
[jira] Closed: (XMLBEANS-66) NullPointerException when restricting a union with one of the union members
Posted by "Jacob Danner (JIRA)" <xm...@xml.apache.org>.
[ http://nagoya.apache.org/jira/browse/XMLBEANS-66?page=history ]
Jacob Danner closed XMLBEANS-66:
--------------------------------
Fix Verified, Regression Case to be commited shortly.
> NullPointerException when restricting a union with one of the union members
> ---------------------------------------------------------------------------
>
> Key: XMLBEANS-66
> URL: http://nagoya.apache.org/jira/browse/XMLBEANS-66
> Project: XMLBeans
> Type: Bug
> Components: Compiler
> Versions: Version 2
> Reporter: Kevin Krouse
> Assignee: Jacob Danner
> Fix For: Version 2 Beta 1
>
> Compile the following trimmed down schema from http://w3.org/TR/xqueryx/#Schema:
> <?xml version="1.0" encoding="UTF-8"?>
> <xsd:schema targetNamespace="http://www.w3.org/2003/12/XQueryX"
> xmlns="http://www.w3.org/2003/12/XQueryX"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> elementFormDefault="qualified"
> attributeFormDefault="qualified">
> <!-- Kludge for anySimpleType -->
> <xsd:simpleType name="constantValueType">
> <xsd:union memberTypes="xsd:integer xsd:decimal xsd:string xsd:double"/>
> </xsd:simpleType>
> <!-- constant expressions. We have 4 different subclasses for this -->
> <xsd:complexType name="constantExpr">
> <xsd:sequence>
> <xsd:element name="value" type="constantValueType"/>
> </xsd:sequence>
> </xsd:complexType>
> <xsd:complexType name="integerConstantExpr">
> <xsd:complexContent>
> <xsd:restriction base="constantExpr">
> <xsd:sequence>
> <xsd:element name="value" type="xsd:integer"/>
> </xsd:sequence>
> </xsd:restriction>
> </xsd:complexContent>
> </xsd:complexType>
> </xsd:schema>
> results in:
> Exception in thread "main" java.lang.NullPointerException
> at org.apache.xmlbeans.impl.schema.StscChecker.checkAllDerivationsForRestriction(StscChecker.java:1412)
> at org.apache.xmlbeans.impl.schema.StscChecker.typeDerivationOK(StscChecker.java:1394)
> at org.apache.xmlbeans.impl.schema.StscChecker.nameAndTypeOK(StscChecker.java:1337)
> at org.apache.xmlbeans.impl.schema.StscChecker.isParticleValidRestriction(StscChecker.java:404)
> at org.apache.xmlbeans.impl.schema.StscChecker.checkRestriction(StscChecker.java:364)
> at org.apache.xmlbeans.impl.schema.StscChecker.checkAll(StscChecker.java:63)
> at org.apache.xmlbeans.impl.schema.SchemaTypeSystemCompiler.compileImpl(SchemaTypeSystemCompiler.java:268)
> at org.apache.xmlbeans.impl.schema.SchemaTypeSystemCompiler.compile(SchemaTypeSystemCompiler.java:195)
> at org.apache.xmlbeans.impl.tool.SchemaCompiler.loadTypeSystem(SchemaCompiler.java:853)
> at org.apache.xmlbeans.impl.tool.SchemaCompiler.compile(SchemaCompiler.java:911)
> at org.apache.xmlbeans.impl.tool.SchemaCompiler.main(SchemaCompiler.java:330)
> When checkAllDerivationsForRestriction() loops from the derived type down to the base, if the type is a union we continue following one of the types (that is assignable). What is happening now is the derived type is never reaching the base type since the base type is one of the union members.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org