NullPointerException in SchemaDOM.processAttValue
-------------------------------------------------

         Key: XERCESJ-1088
         URL: http://issues.apache.org/jira/browse/XERCESJ-1088
     Project: Xerces2-J
        Type: Bug
  Components: XML Schema Structures  
    Versions: 2.7.0    
 Environment: All
    Reporter: George Cristian Bina
    Priority: Critical


Parsing the following schema that contains xmlns="" in and an annotation:

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema";>
    <xs:element name="issues" xmlns="">
        <xs:annotation/>
        <xs:complexType/>       
    </xs:element>
</xs:schema>

Xerces gives a NPE with the following trace:

java.lang.NullPointerException
        at org.apache.xerces.impl.xs.opti.SchemaDOM.processAttValue(Unknown 
Source)
        at org.apache.xerces.impl.xs.opti.SchemaDOM.startAnnotation(Unknown 
Source)
        at org.apache.xerces.impl.xs.opti.SchemaDOMParser.emptyElement(Unknown 
Source)
        at 
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
        at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
 Source)
        at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown 
Source)
        at org.apache.xerces.impl.xs.opti.SchemaParsingConfig.parse(Unknown 
Source)
        at org.apache.xerces.impl.xs.opti.SchemaParsingConfig.parse(Unknown 
Source)
        at org.apache.xerces.impl.xs.opti.SchemaDOMParser.parse(Unknown Source)
        at 
org.apache.xerces.impl.xs.traversers.XSDHandler.getSchemaDocument(Unknown 
Source)
        at org.apache.xerces.impl.xs.traversers.XSDHandler.parseSchema(Unknown 
Source)
        at org.apache.xerces.impl.xs.XMLSchemaLoader.loadSchema(Unknown Source)
        at org.apache.xerces.impl.xs.XMLSchemaLoader.loadGrammar(Unknown Source)
        at 
org.apache.xerces.parsers.XMLGrammarPreparser.preparseGrammar(Unknown Source)

The problem seems to be that in the processAttValue the parameter "original" is 
null.

It will be great is this can be fixed for the 2.7.1 release.

Thanks,
George



-- 
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
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to