1 Reply Latest reply on Oct 19, 2016 8:22 PM by Tomohisa igarashi

    TransformerException camel xslt error-Jboss fuse service works

    ravi narayanan Expert

      Hi All,

      iam getting below error when deploying switchyard component in Jboss EAP.

       

      14:14:25,683 ERROR [org.apache.camel.builder.xml.XsltErrorListener] (MSC service thread 1-14) "xml:lang" attribute is not allowed on the soap:Text element!; Line#: 16; Column#: 32: javax.xml.transform.TransformerException: "xml:lang" attribute is not allowed on the soap:Text element!

              at org.apache.xalan.processor.StylesheetHandler.error(StylesheetHandler.java:907)

              at org.apache.xalan.processor.StylesheetHandler.error(StylesheetHandler.java:950)

              at org.apache.xalan.processor.XSLTElementProcessor.setPropertiesFromAttributes(XSLTElementProcessor.java:348)

              at org.apache.xalan.processor.XSLTElementProcessor.setPropertiesFromAttributes(XSLTElementProcessor.java:268)

              at org.apache.xalan.processor.ProcessorLRE.startElement(ProcessorLRE.java:283)

              at org.apache.xalan.processor.StylesheetHandler.startElement(StylesheetHandler.java:626)

              at org.apache.xerces.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:496) [xercesImpl-2.9.1.redhat-6.jar:2.9.1.redhat-6]

              at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:283) [xercesImpl-2.9.1.redhat-6.jar:2.9.1.redhat-6]

              at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1653) [xercesImpl-2.9.1.redhat-6.jar:2.9.1.redhat-6]

              at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:324) [xercesImpl-2.9.1.redhat-6.jar:2.9.1.redhat-6]

              at org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:845) [xercesImpl-2.9.1.redhat-6.jar:2.9.1.redhat-6]

              at org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:768) [xercesImpl-2.9.1.redhat-6.jar:2.9.1.redhat-6]

              at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:108) [xercesImpl-2.9.1.redhat-6.jar:2.9.1.redhat-6]

              at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1196) [xercesImpl-2.9.1.redhat-6.jar:2.9.1.redhat-6]

              at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:555) [xercesImpl-2.9.1.redhat-6.jar:2.9.1.redhat-6]

              at org.apache.xalan.processor.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:926)

              at __redirected.__TransformerFactory.newTemplates(__TransformerFactory.java:140) [jboss-modules.jar:1.3.3.Final-redhat-1]

              at org.apache.camel.builder.xml.XsltBuilder.setTransformerSource(XsltBuilder.java:329) [camel-core-2.10.0.redhat-60083.jar:2.10.0.redhat-60083]

              at org.apache.camel.component.xslt.XsltEndpoint.loadResource(XsltEndpoint.java:90) [camel-core-2.10.0.redhat-60083.jar:2.10.0.redhat-60083]

              at org.apache.camel.component.xslt.XsltEndpoint.doStart(XsltEndpoint.java:99) [camel-core-2.10.0.redhat-60083.jar:2.10.0.redhat-60083]

              at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:60) [camel-core-2.10.0.redhat-60083.jar:2.10.0.redhat-60083]

              at org.apache.camel.impl.DefaultCamelContext.startService(DefaultCamelContext.java:1777) [camel-core-2.10.0.redhat-60083.jar:2.10.0.redhat-60083]

              at org.apache.camel.impl.DefaultCamelContext.doAddService(DefaultCamelContext.java:940) [camel-core-2.10.0.redhat-60083.jar:2.10.0.redhat-60083]

              at org.apache.camel.impl.DefaultCamelContext.addService(DefaultCamelContext.java:901) [camel-core-2.10.0.redhat-60083.jar:2.10.0.redhat-60083]

              at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:484) [camel-core-2.10.0.redhat-60083.jar:2.10.0.redhat-60083]

              at org.apache.camel.util.CamelContextHelper.getMandatoryEndpoint(CamelContextHelper.java:61) [camel-core-2.10.0.redhat-60083.jar:2.10.0.redhat-60083]

              at org.apache.camel.model.RouteDefinition.resolveEndpoint(RouteDefinition.java:187) [camel-core-2.10.0.redhat-60083.jar:2.10.0.redhat-60083]

              at org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:108) [camel-core-2.10.0.redhat-60083.jar:2.10.0.redhat-60083]

              at org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:114) [camel-core-2.10.0.redhat-60083.jar:2.10.0.redhat-60083]

              at org.apache.camel.model.SendDefinition.resolveEndpoint(SendDefinition.java:61) [camel-core-2.10.0.redhat-60083.jar:2.10.0.redhat-60083]

              at org.apache.camel.model.SendDefinition.createProcessor(SendDefinition.java:55) [camel-core-2.10.0.redhat-60083.jar:2.10.0.redhat-60083]

              at org.apache.camel.model.ProcessorDefinition.createProcessor(ProcessorDefinition.java:426) [camel-core-2.10.0.redhat-60083.jar:2.10.0.redhat-60083]

              at org.apache.camel.model.ProcessorDefinition.createOutputsProcessor(ProcessorDefinition.java:395) [camel-core-2.10.0.redhat-60083.jar:2.10.0.redhat-60083]

              at org.apache.camel.model.ProcessorDefinition.createOutputsProcessor(ProcessorDefinition.java:130) [camel-core-2.10.0.redhat-60083.jar:2.10.0.redhat-60083]

              at org.apache.camel.model.ProcessorDefinition.createChildProcessor(ProcessorDefinition.java:149) [camel-core-2.10.0.redhat-60083.jar:2.10.0.redhat-60083]

              at org.apache.camel.model.ExpressionNode.createFilterProcessor(ExpressionNode.java:109) [camel-core-2.10.0.redhat-60083.jar:2.10.0.redhat-60083]

              at org.apache.camel.model.WhenDefinition.createProcessor(WhenDefinition.java:77) [camel-core-2.10.0.redhat-60083.jar:2.10.0.redhat-60083]

              at org.apache.camel.model.WhenDefinition.createProcessor(WhenDefinition.java:31) [camel-core-2.10.0.redhat-60083.jar:2.10.0.redhat-60083]

              at org.apache.camel.model.ProcessorDefinition.createProcessor(ProcessorDefinition.java:426) [camel-core-2.10.0.redhat-60083.jar:2.10.0.redhat-60083]

              at org.apache.camel.model.ChoiceDefinition.createProcessor(ChoiceDefinition.java:135) [camel-core-2.10.0.redhat-60083.jar:2.10.0.redhat-60083]

              at org.apache.camel.model.ProcessorDefinition.createProcessor(ProcessorDefinition.java:426) [camel-core-2.10.0.redhat-60083.jar:2.10.0.redhat-60083]

              at org.apache.camel.model.ProcessorDefinition.createOutputsProcessor(ProcessorDefinition.java:395) [camel-core-2.10.0.redhat-60083.jar:2.10.0.redhat-60083]

              at org.apache.camel.model.TryDefinition.createProcessor(TryDefinition.java:75) [camel-core-2.10.0.redhat-60083.jar:2.10.0.redhat-60083]

              at org.apache.camel.model.ProcessorDefinition.makeProcessor(ProcessorDefinition.java:466) [camel-core-2.10.0.redhat-60083.jar:2.10.0.redhat-60083]

              at org.apache.camel.model.ProcessorDefinition.addRoutes(ProcessorDefinition.java:179) [camel-core-2.10.0.redhat-60083.jar:2.10.0.redhat-60083]

              at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:876) [camel-core-2.10.0.redhat-60083.jar:2.10.0.redhat-60083]

              at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:172) [camel-core-2.10.0.redhat-60083.jar:2.10.0.redhat-60083]

              at org.apache.camel.impl.DefaultCamelContext.startRoute(DefaultCamelContext.java:731) [camel-core-2.10.0.redhat-60083.jar:2.10.0.redhat-60083]

              at org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:1803) [camel-core-2.10.0.redhat-60083.jar:2.10.0.redhat-60083]

              at org.apache.camel.impl.DefaultCamelContext.addRouteDefinitions(DefaultCamelContext.java:675) [camel-core-2.10.0.redhat-60083.jar:2.10.0.redhat-60083]

              at org.switchyard.component.camel.deploy.CamelActivator.handleImplementation(CamelActivator.java:95) [switchyard-component-camel-1.1.1-p11-redhat-1.jar:1.1.1-p11-redhat-1]

              at org.switchyard.component.camel.deploy.CamelActivator.activateService(CamelActivator.java:75) [switchyard-component-camel-1.1.1-p11-redhat-1.jar:1.1.1-p11-redhat-1]

              at org.switchyard.deploy.internal.Deployment.deployImplementations(Deployment.java:546)

              at org.switchyard.deploy.internal.Deployment.start(Deployment.java:144)

              at org.switchyard.as7.extension.deployment.SwitchYardDeployment.start(SwitchYardDeployment.java:127) [switchyard-deploy-jboss-as7-1.1.1-p11-redhat-1.jar:1.1.1-p11-redhat-1]

              at org.switchyard.as7.extension.services.SwitchYardService.start(SwitchYardService.java:77) [switchyard-deploy-jboss-as7-1.1.1-p11-redhat-1.jar:1.1.1-p11-redhat-1]

              at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)

              at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)

              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_80]

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_80]

              at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_80]

       

       

      MY Xslt is as follows:

       

      <?xml version="1.0" encoding="UTF-8"?>

      <xsl:stylesheet version="2.0"

              xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

              <xsl:output method="xml" version="1.0" encoding="UTF-8"

                      indent="yes" />

              <xsl:param name="error-message" />

              <xsl:template match="/">

                      <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">

                              <soap:Header />

                              <soap:Body>

                                      <soap:Fault>

                                              <soap:Code>

                                                      <soap:Value>soap:Sender</soap:Value>

                                              </soap:Code>

                                              <soap:Reason>

                                                      <soap:Text xml:lang="en-US">

                                                              <xsl:value-of select="$error-message" />

                                                      </soap:Text>

                                              </soap:Reason>

                                              <xsl:for-each select="//message-body">

                                                      <soap:Detail>

                                                              <xsl:apply-templates select="@* | node()" />

                                                      </soap:Detail>

                                              </xsl:for-each>

                                      </soap:Fault>

                              </soap:Body>

                      </soap:Envelope>

              </xsl:template>

             

             

              <xsl:template match="*">

                      <xsl:element name="{local-name()}">

                              <xsl:apply-templates select="@* | node()" />

                      </xsl:element>

              </xsl:template>

             

              <xsl:template match="@*">

                      <xsl:attribute name="{local-name()}"><xsl:value-of select="." /></xsl:attribute>

              </xsl:template>

             

              <xsl:template match="comment() | text() | processing-instruction()">

                      <xsl:copy />

              </xsl:template>

      </xsl:stylesheet>