Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-7918

Getting namespace error in camel-spring-ws from time to time

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.12.4
    • 2.12.5
    • camel-spring-ws
    • None
    • Unknown

    Description

      From time to time, we have the following test failed in camel-spring-ws:

      christians-mbp:camel-spring-ws cmueller$ mvn test -Dtest=ConsumerMarshallingRouteTest
      [INFO] Scanning for projects...
      [INFO]
      [INFO] ------------------------------------------------------------------------
      [INFO] Building Camel :: Spring Web Services 2.12.5-SNAPSHOT
      [INFO] ------------------------------------------------------------------------
      [INFO]
      [INFO] --- maven-bundle-plugin:2.3.7:cleanVersions (versions) @ camel-spring-ws ---
      [INFO]
      [INFO] --- maven-remote-resources-plugin:1.4:process (default) @ camel-spring-ws ---
      [INFO]
      [INFO] >>> camel-package-maven-plugin:2.12.5-SNAPSHOT:generate-components-list (default) @ camel-spring-ws >>>
      [INFO]
      [INFO] --- maven-bundle-plugin:2.3.7:cleanVersions (versions) @ camel-spring-ws ---
      [INFO]
      [INFO] --- maven-remote-resources-plugin:1.4:process (default) @ camel-spring-ws ---
      [INFO]
      [INFO] <<< camel-package-maven-plugin:2.12.5-SNAPSHOT:generate-components-list (default) @ camel-spring-ws <<<
      [INFO]
      [INFO] --- camel-package-maven-plugin:2.12.5-SNAPSHOT:generate-components-list (default) @ camel-spring-ws ---
      [INFO] Generated /Users/cmueller/workspaceCamel/camel/components/camel-spring-ws/target/generated/camel/components/META-INF/services/org/apache/camel/component.properties containing the Camel component spring-ws
      [INFO]
      [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ camel-spring-ws ---
      [INFO] Using 'UTF-8' encoding to copy filtered resources.
      [INFO] Copying 4 resources
      [INFO] Copying 3 resources
      [INFO] Copying 1 resource
      [INFO]
      [INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) @ camel-spring-ws ---
      [INFO] Nothing to compile - all classes are up to date
      [INFO]
      [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ camel-spring-ws ---
      [INFO] Using 'UTF-8' encoding to copy filtered resources.
      [INFO] Copying 24 resources
      [INFO] Copying 3 resources
      [INFO]
      [INFO] --- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) @ camel-spring-ws ---
      [INFO] Nothing to compile - all classes are up to date
      [INFO]
      [INFO] --- maven-surefire-plugin:2.15:test (default-test) @ camel-spring-ws ---
      [INFO] Surefire report directory: /Users/cmueller/workspaceCamel/camel/components/camel-spring-ws/target/surefire-reports
      
      -------------------------------------------------------
       T E S T S
      -------------------------------------------------------
      Running org.apache.camel.component.spring.ws.ConsumerMarshallingRouteTest
      ERROR:  'NAMESPACE_ERR: An attempt is made to create or change an object in a way which is incorrect with regard to namespaces.'
      ERROR:  'NAMESPACE_ERR: An attempt is made to create or change an object in a way which is incorrect with regard to namespaces.'
      Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 1.11 sec <<< FAILURE! - in org.apache.camel.component.spring.ws.ConsumerMarshallingRouteTest
      consumeWebserviceWithPojoRequest(org.apache.camel.component.spring.ws.ConsumerMarshallingRouteTest)  Time elapsed: 0.892 sec  <<< ERROR!
      org.apache.camel.CamelExecutionException: Exception occurred during execution on the exchange: Exchange[Message: <?xml version="1.0" encoding="UTF-8" standalone="yes"?><GetQuote xmlns="http://www.stockquotes.edu/"><symbol>GOOG</symbol></GetQuote>]
      	at com.sun.org.apache.xerces.internal.dom.AttrNSImpl.setName(AttrNSImpl.java:105)
      	at com.sun.org.apache.xerces.internal.dom.AttrNSImpl.<init>(AttrNSImpl.java:74)
      	at com.sun.org.apache.xerces.internal.dom.CoreDocumentImpl.createAttributeNS(CoreDocumentImpl.java:2138)
      	at com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl.createAttributeNS(SOAPDocumentImpl.java:172)
      	at com.sun.org.apache.xerces.internal.dom.ElementImpl.setAttributeNS(ElementImpl.java:656)
      	at com.sun.xml.internal.messaging.saaj.soap.impl.ElementImpl.setAttributeNS(ElementImpl.java:1250)
      	at com.sun.org.apache.xalan.internal.xsltc.trax.SAX2DOM.startElement(SAX2DOM.java:199)
      	at com.sun.org.apache.xml.internal.serializer.ToXMLSAXHandler.closeStartTag(ToXMLSAXHandler.java:204)
      	at com.sun.org.apache.xml.internal.serializer.ToSAXHandler.flushPending(ToSAXHandler.java:277)
      	at com.sun.org.apache.xml.internal.serializer.ToXMLSAXHandler.startElement(ToXMLSAXHandler.java:646)
      	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:504)
      	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:1370)
      	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2763)
      	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:647)
      	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:513)
      	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:815)
      	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:744)
      	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:128)
      	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1208)
      	at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:543)
      	at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transformIdentity(TransformerImpl.java:663)
      	at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:732)
      	at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:345)
      	at org.springframework.ws.client.core.WebServiceTemplate$5.doWithMessage(WebServiceTemplate.java:494)
      	at org.springframework.ws.client.core.WebServiceTemplate.doSendAndReceive(WebServiceTemplate.java:571)
      	at org.springframework.ws.client.core.WebServiceTemplate.sendAndReceive(WebServiceTemplate.java:537)
      	at org.springframework.ws.client.core.WebServiceTemplate.doSendAndReceive(WebServiceTemplate.java:492)
      	at org.springframework.ws.client.core.WebServiceTemplate.sendSourceAndReceive(WebServiceTemplate.java:479)
      	at org.springframework.ws.client.core.WebServiceTemplate.sendSourceAndReceive(WebServiceTemplate.java:470)
      	at org.apache.camel.component.spring.ws.SpringWebserviceProducer.process(SpringWebserviceProducer.java:89)
      	at org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
      	at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:113)
      	at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:398)
      	at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
      	at org.apache.camel.processor.Pipeline.process(Pipeline.java:118)
      	at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)
      	at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
      	at org.apache.camel.component.direct.DirectProducer.process(DirectProducer.java:51)
      	at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
      	at org.apache.camel.processor.UnitOfWorkProducer.process(UnitOfWorkProducer.java:73)
      	at org.apache.camel.impl.ProducerCache$2.doInProducer(ProducerCache.java:375)
      	at org.apache.camel.impl.ProducerCache$2.doInProducer(ProducerCache.java:343)
      	at org.apache.camel.impl.ProducerCache.doInProducer(ProducerCache.java:233)
      	at org.apache.camel.impl.ProducerCache.sendExchange(ProducerCache.java:343)
      	at org.apache.camel.impl.ProducerCache.send(ProducerCache.java:201)
      	at org.apache.camel.impl.DefaultProducerTemplate.send(DefaultProducerTemplate.java:128)
      	at org.apache.camel.impl.DefaultProducerTemplate.sendBody(DefaultProducerTemplate.java:132)
      	at org.apache.camel.impl.DefaultProducerTemplate.sendBody(DefaultProducerTemplate.java:149)
      	at org.apache.camel.impl.DefaultProducerTemplate.requestBody(DefaultProducerTemplate.java:297)
      	at org.apache.camel.component.spring.ws.ConsumerMarshallingRouteTest.consumeWebserviceWithPojoRequest(ConsumerMarshallingRouteTest.java:62)
      
      consumeWebserviceWithPojoRequestAndPojoResponse(org.apache.camel.component.spring.ws.ConsumerMarshallingRouteTest)  Time elapsed: 0.057 sec  <<< ERROR!
      org.apache.camel.CamelExecutionException: Exception occurred during execution on the exchange: Exchange[Message: <?xml version="1.0" encoding="UTF-8" standalone="yes"?><GetQuote xmlns="http://www.stockquotes.edu/"><symbol>GOOG</symbol></GetQuote>]
      	at com.sun.org.apache.xerces.internal.dom.AttrNSImpl.setName(AttrNSImpl.java:105)
      	at com.sun.org.apache.xerces.internal.dom.AttrNSImpl.<init>(AttrNSImpl.java:74)
      	at com.sun.org.apache.xerces.internal.dom.CoreDocumentImpl.createAttributeNS(CoreDocumentImpl.java:2138)
      	at com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl.createAttributeNS(SOAPDocumentImpl.java:172)
      	at com.sun.org.apache.xerces.internal.dom.ElementImpl.setAttributeNS(ElementImpl.java:656)
      	at com.sun.xml.internal.messaging.saaj.soap.impl.ElementImpl.setAttributeNS(ElementImpl.java:1250)
      	at com.sun.org.apache.xalan.internal.xsltc.trax.SAX2DOM.startElement(SAX2DOM.java:199)
      	at com.sun.org.apache.xml.internal.serializer.ToXMLSAXHandler.closeStartTag(ToXMLSAXHandler.java:204)
      	at com.sun.org.apache.xml.internal.serializer.ToSAXHandler.flushPending(ToSAXHandler.java:277)
      	at com.sun.org.apache.xml.internal.serializer.ToXMLSAXHandler.startElement(ToXMLSAXHandler.java:646)
      	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:504)
      	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:1370)
      	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2763)
      	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:647)
      	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:513)
      	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:815)
      	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:744)
      	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:128)
      	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1208)
      	at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:543)
      	at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transformIdentity(TransformerImpl.java:663)
      	at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:732)
      	at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:345)
      	at org.springframework.ws.client.core.WebServiceTemplate$5.doWithMessage(WebServiceTemplate.java:494)
      	at org.springframework.ws.client.core.WebServiceTemplate.doSendAndReceive(WebServiceTemplate.java:571)
      	at org.springframework.ws.client.core.WebServiceTemplate.sendAndReceive(WebServiceTemplate.java:537)
      	at org.springframework.ws.client.core.WebServiceTemplate.doSendAndReceive(WebServiceTemplate.java:492)
      	at org.springframework.ws.client.core.WebServiceTemplate.sendSourceAndReceive(WebServiceTemplate.java:479)
      	at org.springframework.ws.client.core.WebServiceTemplate.sendSourceAndReceive(WebServiceTemplate.java:470)
      	at org.apache.camel.component.spring.ws.SpringWebserviceProducer.process(SpringWebserviceProducer.java:89)
      	at org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
      	at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:113)
      	at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:398)
      	at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
      	at org.apache.camel.processor.Pipeline.process(Pipeline.java:118)
      	at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)
      	at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
      	at org.apache.camel.component.direct.DirectProducer.process(DirectProducer.java:51)
      	at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
      	at org.apache.camel.processor.UnitOfWorkProducer.process(UnitOfWorkProducer.java:73)
      	at org.apache.camel.impl.ProducerCache$2.doInProducer(ProducerCache.java:375)
      	at org.apache.camel.impl.ProducerCache$2.doInProducer(ProducerCache.java:343)
      	at org.apache.camel.impl.ProducerCache.doInProducer(ProducerCache.java:233)
      	at org.apache.camel.impl.ProducerCache.sendExchange(ProducerCache.java:343)
      	at org.apache.camel.impl.ProducerCache.send(ProducerCache.java:201)
      	at org.apache.camel.impl.DefaultProducerTemplate.send(DefaultProducerTemplate.java:128)
      	at org.apache.camel.impl.DefaultProducerTemplate.sendBody(DefaultProducerTemplate.java:132)
      	at org.apache.camel.impl.DefaultProducerTemplate.sendBody(DefaultProducerTemplate.java:149)
      	at org.apache.camel.impl.DefaultProducerTemplate.requestBody(DefaultProducerTemplate.java:297)
      	at org.apache.camel.component.spring.ws.ConsumerMarshallingRouteTest.consumeWebserviceWithPojoRequestAndPojoResponse(ConsumerMarshallingRouteTest.java:75)
      
      
      Results :
      
      Tests in error:
        ConsumerMarshallingRouteTest.consumeWebserviceWithPojoRequest:62 � CamelExecution
        ConsumerMarshallingRouteTest.consumeWebserviceWithPojoRequestAndPojoResponse:75 � CamelExecution
      
      Tests run: 2, Failures: 0, Errors: 2, Skipped: 0
      
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 4.887s
      [INFO] Finished at: Thu Oct 16 08:44:32 CEST 2014
      [INFO] Final Memory: 14M/81M
      [INFO] ------------------------------------------------------------------------
      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.15:test (default-test) on project camel-spring-ws: There are test failures.
      [ERROR]
      [ERROR] Please refer to /Users/cmueller/workspaceCamel/camel/components/camel-spring-ws/target/surefire-reports for the individual test results.
      [ERROR] -> [Help 1]
      [ERROR]
      [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
      [ERROR] Re-run Maven using the -X switch to enable full debug logging.
      [ERROR]
      [ERROR] For more information about the errors and possible solutions, please read the following articles:
      [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
      

      It's a known issue and can be solved by using Xalan 2.7.0+:
      http://docs.spring.io/spring-ws/site/faq.html#namespace_err

      Attachments

        Activity

          People

            muellerc Christian Müller
            muellerc Christian Müller
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: