You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by "Michael Glavassevich (JIRA)" <xe...@xml.apache.org> on 2012/07/06 14:27:35 UTC

[jira] [Updated] (XERCESJ-1566) java.lang.NullPointerException when validating against WSDL Schema

     [ https://issues.apache.org/jira/browse/XERCESJ-1566?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Glavassevich updated XERCESJ-1566:
------------------------------------------

    Component/s: XML Schema 1.1 Structures
                 XML Schema 1.0 Structures
    
> java.lang.NullPointerException when validating against WSDL Schema
> ------------------------------------------------------------------
>
>                 Key: XERCESJ-1566
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1566
>             Project: Xerces2-J
>          Issue Type: Bug
>          Components: XML Schema 1.0 Structures, XML Schema 1.1 Structures
>    Affects Versions: 2.11.0
>            Reporter: Radu Coravu
>   Original Estimate: 3h
>  Remaining Estimate: 3h
>
> I'm integrating "Xerces-J 2.11.0-xml-schema-1.1-beta" in Oxygen XML Editor.
> After the integration one of our automated tests caught this NPE:
> -------------------------------------
> java.lang.NullPointerException
> 	at java.util.StringTokenizer.<init>(StringTokenizer.java:182)
> 	at java.util.StringTokenizer.<init>(StringTokenizer.java:204)
> 	at org.apache.xerces.impl.dv.xs.XSSimpleTypeDecl.getActualValue(Unknown Source)
> 	at org.apache.xerces.impl.dv.xs.XSSimpleTypeDecl.validate(Unknown Source)
> 	at org.apache.xerces.impl.xs.util.XSTypeHelper.isValueValidForASimpleType(Unknown Source)
> 	at org.apache.xerces.impl.xs.util.XSTypeHelper.isAtomicValueValidForAnUnion(Unknown Source)
> 	at org.apache.xerces.impl.xs.XMLSchemaValidatorXerces.addDefaultAttributes(XMLSchemaValidatorXerces.java:3386)
> 	at org.apache.xerces.impl.xs.XMLSchemaValidatorXerces.handleStartElement(XMLSchemaValidatorXerces.java:2376)
> 	at org.apache.xerces.impl.xs.XMLSchemaValidatorXerces.startElement(XMLSchemaValidatorXerces.java:815)
> 	at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:87)
> 	at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:268)
> 	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1655)
> 	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:325)
> 	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> 	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> --------------------------------------
> Basically the XMLSchemaValidator has some code like:
> -----------------------
>                     if (attDV.getVariety() == XSSimpleTypeDefinition.VARIETY_UNION) {
>                         if (XSTypeHelper.isAtomicValueValidForAnUnion(attDV.getMemberTypes(),
>                                                                       null,
>                                                                       defaultValue)) {
>                             fisAtomicValueValid = false; 
>                         }
>                     }
> -------------------------
> which sends a "null" value to the content parameter of "isAtomicValueValidForAnUnion" which later generates the NPE.
> I will attach a WSDL file (the problem seems to happen when validating any WSDL file) and the "wsdl11soap11.xsd" schema.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org