Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-5498

W3CDOMStreamReader does not check the DOM-Level in all Cases

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.6.11
    • Fix Version/s: 2.6.12, 2.7.9, 3.0.0-milestone2
    • Component/s: Core
    • Labels:
      None
    • Environment:

      Weblogic on Windows

    • Estimated Complexity:
      Unknown

      Description

      In some Methods of org.apache.cxf.staxutils.W3CDOMStreamReader the DOM Level of the underlying DOM-implementation is checked (e.g. 'getLocation()'), but this is not true for all methods.

      The method 'getSystemId' calls 'org.w3c.dom.Document.getDocumentURI()' without handling exceptions/errors from implementations which are not DOM Level 3. When running under Weblogic this results in the following error, which occours when validating the schema for a not schema valid XML structure:

      java.lang.AssertionError: UNIMPLEMENTED
      	at weblogic.xml.domimpl.DocumentImpl.getDocumentURI(DocumentImpl.java:466)
      	at org.apache.cxf.staxutils.W3CDOMStreamReader.getSystemId(W3CDOMStreamReader.java:90)
      	at org.apache.cxf.staxutils.AbstractDOMStreamReader$1.getSystemId(AbstractDOMStreamReader.java:343)
      	at com.sun.xml.bind.v2.runtime.unmarshaller.StAXConnector$1.getSystemId(StAXConnector.java:100)
      	at com.sun.org.apache.xerces.internal.util.SAXLocatorWrapper.getLiteralSystemId(SAXLocatorWrapper.java:63)
      	at com.sun.org.apache.xerces.internal.xni.parser.XMLParseException.<init>(XMLParseException.java:71)
      	at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:365)
      	at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:318)
      	at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(XMLSchemaValidator.java:417)
      	at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.reportSchemaError(XMLSchemaValidator.java:3182)
      	at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:1806)
      	at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:705)
      	at com.sun.org.apache.xerces.internal.jaxp.validation.ValidatorHandlerImpl.startElement(ValidatorHandlerImpl.java:550)
      	at com.sun.xml.bind.v2.runtime.unmarshaller.ValidatingUnmarshaller.startElement(ValidatingUnmarshaller.java:89)
      	at com.sun.xml.bind.v2.runtime.unmarshaller.InterningXmlVisitor.startElement(InterningXmlVisitor.java:71)
      	at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.handleStartElement(StAXStreamConnector.java:275)
      	at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(StAXStreamConnector.java:209)
      	at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:358)
      	at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:337)
      	at org.apache.cxf.jaxb.JAXBEncoderDecoder.doUnmarshal(JAXBEncoderDecoder.java:769)
      	at org.apache.cxf.jaxb.JAXBEncoderDecoder.access$100(JAXBEncoderDecoder.java:94)
      	at org.apache.cxf.jaxb.JAXBEncoderDecoder$1.run(JAXBEncoderDecoder.java:797)
      	at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:795)
      	at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:629)
      	at org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:157)
      	at org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:194)
      	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:262)
      	at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
      	at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:237)
      	at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:214)
      	at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:194)
      	at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:130)
      	at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:226)
      	at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:146)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
      	at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:201)
      	at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
      

        Attachments

          Activity

            People

            • Assignee:
              dkulp Daniel Kulp
              Reporter:
              mail@johannesrost.de Johannes Rost
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: