2013-03-12 154 views
1

我们试图在Fuse ESB 7.1.0中使用osgi安装捆绑软件。 这里面束,在骆驼方面,我们使用的是像下面:Fuse ESB - 骆驼问题

<camelContext xmlns="http://camel.apache.org/schema/spring"> 
    <endpoint uri="http://IPADDRESS:8080/LOB_Webservice/LOBSampleWebService?throwExceptionOnFailure=false" id="callLOBServer"/> 
    <route> 
     <from uri="cxf:bean:lobclient?dataFormat=MESSAGE"/> 
     <to uri="log:output"/> 
     <bean ref="enrichBean"/> 
     <to uri="xslt:etc/8.xsl"/> 
     <bean ref="enrichBean"/> 
     <to ref="callLOBServer"/> 
     <bean ref="enrichBean"/> 
     ***<to uri="xslt:etc/3.xsl"/>*** 
     <bean ref="enrichBean"/> 
     <to uri="xslt:etc/7.xsl"/> 
     <bean ref="enrichBean"/> 
     <to uri="log:output"/> 
    </route> 
</camelContext> 

上面3.xsl使用XSLT 2.0

当我们尝试安装此,它是越来越失败,下面的信息:

15:11:23,047 | ERROR | ExtenderThread-4 | XsltErrorListener    | 147 - org.apache.camel.camel-core - 2.10.0.fuse-71-047 | A location step was expected following the '/' or '//' token.; Line#: 8; Column#: 77 
15:11:23,047 | ERROR | ExtenderThread-4 | ContextLoaderListener   | 113 - org.springframework.osgi.extender - 1.2.1 | Application context refresh failed (OsgiBundleXmlApplicationContext(bundle=org.apache.camel.camel-example-cxf-proxy, config=osgibundle:/META-INF/spring/*.xml)) 
java.lang.StackOverflowError 
    at java.security.AccessController.doPrivileged(Native Method)[:1.7.0_07] 
    at org.osgi.framework.FrameworkUtil.getBundle(FrameworkUtil.java:208)[karaf.jar:2.3.0.fuse-71-047] 
    at org.ops4j.pax.logging.util.OsgiUtil.getBundleOrNull(OsgiUtil.java:114)[3:org.ops4j.pax.logging.pax-logging-service:1.7.0] 
    at org.apache.log4j.OsgiThrowableRenderer.getClassDetail(OsgiThrowableRenderer.java:148)[3:org.ops4j.pax.logging.pax-logging-service:1.7.0] 
    at org.apache.log4j.OsgiThrowableRenderer.formatElement(OsgiThrowableRenderer.java:135)[3:org.ops4j.pax.logging.pax-logging-service:1.7.0] 
    at org.apache.log4j.OsgiThrowableRenderer.doRender(OsgiThrowableRenderer.java:105)[3:org.ops4j.pax.logging.pax-logging-service:1.7.0] 
    at org.apache.log4j.OsgiThrowableRenderer.doRender(OsgiThrowableRenderer.java:52)[3:org.ops4j.pax.logging.pax-logging-service:1.7.0] 
    at org.apache.log4j.spi.ThrowableInformation.getThrowableStrRep(ThrowableInformation.java:89)[3:org.ops4j.pax.logging.pax-logging-service:1.7.0] 
    at org.apache.log4j.spi.LoggingEvent.getThrowableStrRep(LoggingEvent.java:413)[3:org.ops4j.pax.logging.pax-logging-service:1.7.0] 
    at org.apache.log4j.WriterAppender.subAppend(WriterAppender.java:313)[3:org.ops4j.pax.logging.pax-logging-service:1.7.0] 
    at org.apache.log4j.RollingFileAppender.subAppend(RollingFileAppender.java:276)[3:org.ops4j.pax.logging.pax-logging-service:1.7.0] 
    at org.apache.log4j.WriterAppender.append(WriterAppender.java:162)[3:org.ops4j.pax.logging.pax-logging-service:1.7.0] 
    at org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:251)[3:org.ops4j.pax.logging.pax-logging-service:1.7.0] 
    at org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:66)[3:org.ops4j.pax.logging.pax-logging-service:1.7.0] 
    at org.apache.log4j.Category.callAppenders(Category.java:193)[4:org.ops4j.pax.logging.pax-logging-api:1.7.0] 
    at org.apache.log4j.Category.forcedLog(Category.java:365)[4:org.ops4j.pax.logging.pax-logging-api:1.7.0] 
    at org.apache.log4j.Category.log(Category.java:772)[4:org.ops4j.pax.logging.pax-logging-api:1.7.0] 
    at org.ops4j.pax.logging.service.internal.PaxLoggerImpl.error(PaxLoggerImpl.java:159)[3:org.ops4j.pax.logging.pax-logging-service:1.7.0] 
    at org.ops4j.pax.logging.internal.TrackingLogger.error(TrackingLogger.java:96)[3:org.ops4j.pax.logging.pax-logging-service:1.7.0] 
    at org.ops4j.pax.logging.slf4j.Slf4jLogger.error(Slf4jLogger.java:911)[4:org.ops4j.pax.logging.pax-logging-api:1.7.0] 
    at org.apache.camel.builder.xml.XsltErrorListener.fatalError(XsltErrorListener.java:44)[147:org.apache.camel.camel-core:2.10.0.fuse-71-047] 
    at org.apache.xpath.compiler.XPathParser.error(XPathParser.java:614)[:] 
    at org.apache.xpath.compiler.XPathParser.RelativeLocationPath(XPathParser.java:1639)[:] 

这里是3.xsl也是内容。

<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> 
    <xsl:output method="xml" indent="yes"/> 

    <xsl:template match="return"> 
     <xsl:copy> 
     <xsl:apply-templates select="@*|node()"/> 
     <ordertotal> 
      <xsl:value-of select="sum(orderDetails/(itemPrice * itemQty))"/> 
     </ordertotal> 
     </xsl:copy> 
    </xsl:template> 

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

但是,当我们尝试用等效的XSLT 1.0功能替换3.xsl时,它的工作正常。作为需求的一部分,我们只需要使用XSLT 2.0。

有人可以帮忙吗?谢谢。

最新的堆栈跟踪..

16:06:46,210 | ERROR | ExtenderThread-2 | XsltErrorListener    | 147 - org.apache.camel.camel-core - 2.10.0.fuse-71-047 | A location step was expected following the '/' or '//' token.; Line#: 8; Column#: 78 
16:06:46,210 | ERROR | ExtenderThread-2 | ContextLoaderListener   | 113 - org.springframework.osgi.extender - 1.2.1 | Application context refresh failed (OsgiBundleXmlApplicationContext(bundle=org.apache.camel.camel-example-cxf-proxy, config=osgibundle:/META-INF/spring/*.xml)) 
java.lang.StackOverflowError 
    at java.util.concurrent.ConcurrentHashMap.hash(ConcurrentHashMap.java:332)[:1.7.0_07] 
    at java.util.concurrent.ConcurrentHashMap.putIfAbsent(ConcurrentHashMap.java:1144)[:1.7.0_07] 
    at java.lang.ClassLoader.getClassLoadingLock(ClassLoader.java:462)[:1.7.0_07] 
    at java.lang.ClassLoader.loadClass(ClassLoader.java:403)[:1.7.0_07] 
    at java.lang.ClassLoader.loadClass(ClassLoader.java:410)[:1.7.0_07] 
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)[:1.7.0_07] 
    at java.lang.ClassLoader.loadClass(ClassLoader.java:410)[:1.7.0_07] 
    at java.lang.ClassLoader.loadClass(ClassLoader.java:356)[:1.7.0_07] 
    at org.apache.felix.framework.ExtensionManager$ExtensionManagerWiring.getClassByDelegation(ExtensionManager.java:873) 
    at org.apache.felix.framework.BundleWiringImpl.searchImports(BundleWiringImpl.java:1520) 
    at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1466) 
    at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:75) 
    at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1882) 
    at java.lang.ClassLoader.loadClass(ClassLoader.java:356)[:1.7.0_07] 
    at org.apache.felix.framework.Felix.loadBundleClass(Felix.java:1814) 
    at org.apache.felix.framework.BundleImpl.loadClass(BundleImpl.java:929) 
    at org.springframework.osgi.util.BundleDelegatingClassLoader.findClass(BundleDelegatingClassLoader.java:99)[114:org.springframework.osgi.core:1.2.1] 
    at org.springframework.osgi.util.BundleDelegatingClassLoader.loadClass(BundleDelegatingClassLoader.java:156)[114:org.springframework.osgi.core:1.2.1] 
    at java.lang.ClassLoader.loadClass(ClassLoader.java:356)[:1.7.0_07] 
    at org.ops4j.pax.logging.util.OsgiUtil.loadClass(OsgiUtil.java:99)[3:org.ops4j.pax.logging.pax-logging-service:1.7.0] 
    at org.apache.log4j.OsgiThrowableRenderer.findClass(OsgiThrowableRenderer.java:221)[3:org.ops4j.pax.logging.pax-logging-service:1.7.0] 
    at org.apache.log4j.OsgiThrowableRenderer.formatElement(OsgiThrowableRenderer.java:134)[3:org.ops4j.pax.logging.pax-logging-service:1.7.0] 
    at org.apache.log4j.OsgiThrowableRenderer.doRender(OsgiThrowableRenderer.java:105)[3:org.ops4j.pax.logging.pax-logging-service:1.7.0] 
    at org.apache.log4j.OsgiThrowableRenderer.doRender(OsgiThrowableRenderer.java:52)[3:org.ops4j.pax.logging.pax-logging-service:1.7.0] 
    at org.apache.log4j.spi.ThrowableInformation.getThrowableStrRep(ThrowableInformation.java:89)[3:org.ops4j.pax.logging.pax-logging-service:1.7.0] 
    at org.apache.log4j.spi.LoggingEvent.getThrowableStrRep(LoggingEvent.java:413)[3:org.ops4j.pax.logging.pax-logging-service:1.7.0] 
    at org.apache.log4j.WriterAppender.subAppend(WriterAppender.java:313)[3:org.ops4j.pax.logging.pax-logging-service:1.7.0] 
    at org.apache.log4j.RollingFileAppender.subAppend(RollingFileAppender.java:276)[3:org.ops4j.pax.logging.pax-logging-service:1.7.0] 
    at org.apache.log4j.WriterAppender.append(WriterAppender.java:162)[3:org.ops4j.pax.logging.pax-logging-service:1.7.0] 
    at org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:251)[3:org.ops4j.pax.logging.pax-logging-service:1.7.0] 
    at org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:66)[3:org.ops4j.pax.logging.pax-logging-service:1.7.0] 
    at org.apache.log4j.Category.callAppenders(Category.java:193)[4:org.ops4j.pax.logging.pax-logging-api:1.7.0] 
    at org.apache.log4j.Category.forcedLog(Category.java:365)[4:org.ops4j.pax.logging.pax-logging-api:1.7.0] 
    at org.apache.log4j.Category.log(Category.java:772)[4:org.ops4j.pax.logging.pax-logging-api:1.7.0] 
    at org.ops4j.pax.logging.service.internal.PaxLoggerImpl.error(PaxLoggerImpl.java:159)[3:org.ops4j.pax.logging.pax-logging-service:1.7.0] 
    at org.ops4j.pax.logging.internal.TrackingLogger.error(TrackingLogger.java:96)[3:org.ops4j.pax.logging.pax-logging-service:1.7.0] 
    at org.ops4j.pax.logging.slf4j.Slf4jLogger.error(Slf4jLogger.java:911)[4:org.ops4j.pax.logging.pax-logging-api:1.7.0] 
    at org.apache.camel.builder.xml.XsltErrorListener.fatalError(XsltErrorListener.java:44)[147:org.apache.camel.camel-core:2.10.0.fuse-71-047] 
    at org.apache.xpath.compiler.XPathParser.error(XPathParser.java:614)[:] 
    at org.apache.xpath.compiler.XPathParser.RelativeLocationPath(XPathParser.java:1639)[:] 
    at org.apache.xpath.compiler.XPathParser.LocationPath(XPathParser.java:1597)[:] 
    at org.apache.xpath.compiler.XPathParser.PathExpr(XPathParser.java:1317)[:] 
    at org.apache.xpath.compiler.XPathParser.UnionExpr(XPathParser.java:1236)[:] 
    at org.apache.xpath.compiler.XPathParser.UnaryExpr(XPathParser.java:1142)[:] 
    at org.apache.xpath.compiler.XPathParser.MultiplicativeExpr(XPathParser.java:1063)[:] 

输入XML文件

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> 
    <soap:Body> 
     <ns2:fetchOrderListResponse xmlns:ns2="http://impl.lob.wipro.com/"> 
     <return> 
      <customerOrderNumber>1</customerOrderNumber> 
      <orderDetails> 
       <itemPrice>50.0</itemPrice> 
       <itemQty>2</itemQty> 
       <itemUnit>0</itemUnit> 
       <orderDetailsId>37516016-D71B-4790-951F-55D00B0CC159</orderDetailsId> 
       <camelAddedDtlField>0.1</camelAddedDtlField> 
      </orderDetails> 
      <orderDetails> 
       <itemPrice>39.0</itemPrice> 
       <itemQty>3</itemQty> 
       <itemUnit>0</itemUnit> 
       <orderDetailsId>6095ABC7-0D0D-4B2E-92E5-80F24E9092B8</orderDetailsId> 
       <camelAddedDtlField>0.1</camelAddedDtlField> 
      </orderDetails> 
      <orderId>84EC371D-40CA-455E-A0FA-7EA733E9BFD3</orderId> 
      <ordertotal>0.0</ordertotal> 
      <camelAddedHdrField>0.0</camelAddedHdrField> 
     </return> 
     <return> 
      <customerOrderNumber>1</customerOrderNumber> 
      <orderId>54712493-2172-4ADB-814B-BC7AA0BB72C3</orderId> 
      <ordertotal>0.0</ordertotal> 
      <camelAddedHdrField>0.0</camelAddedHdrField> 
     </return> 
     <return> 
      <customerOrderNumber>1</customerOrderNumber> 
      <deliverydate>2013-02-06T00:00:00+05:30</deliverydate> 
      <orderDetails> 
       <itemPrice>565.0</itemPrice> 
       <itemQty>1</itemQty> 
       <itemUnit>0</itemUnit> 
       <orderDetailsId>9A5030BE-F95F-4C62-B5A2-41FF85423218</orderDetailsId> 
       <camelAddedDtlField>0.1</camelAddedDtlField> 
      </orderDetails> 
      <orderDetails> 
       <itemPrice>4.0</itemPrice> 
       <itemQty>90</itemQty> 
       <itemUnit>0</itemUnit> 
       <orderDetailsId>65A8B3BE-D407-43D8-8754-EA1E26AA56E4</orderDetailsId> 
       <camelAddedDtlField>0.1</camelAddedDtlField> 
      </orderDetails> 
      <orderId>0BDCB222-0117-47A9-8813-DF03A1D19E5E</orderId> 
      <ordertotal>0.0</ordertotal> 
      <camelAddedHdrField>0.0</camelAddedHdrField> 
     </return> 
     <return> 
      <customerOrderNumber>1</customerOrderNumber> 
      <orderId>8E4220DC-884B-47BC-A565-E26B80BA5249</orderId> 
      <ordertotal>0.0</ordertotal> 
      <camelAddedHdrField>0.0</camelAddedHdrField> 
     </return> 
     <return> 
      <customerOrderNumber>1</customerOrderNumber> 
      <deliverydate>2013-02-06T00:00:00+05:30</deliverydate> 
      <orderDetails> 
       <itemPrice>10.0</itemPrice> 
       <itemQty>4</itemQty> 
       <itemUnit>0</itemUnit> 
       <orderDetailsId>5A2DF895-BB0F-4039-80DB-F44CED31697B</orderDetailsId> 
       <camelAddedDtlField>0.1</camelAddedDtlField> 
      </orderDetails> 
      <orderDetails> 
       <itemPrice>20.0</itemPrice> 
       <itemQty>3</itemQty> 
       <itemUnit>0</itemUnit> 
       <orderDetailsId>8034FBF4-B573-4B19-BDF5-FAF6C4247A55</orderDetailsId> 
       <camelAddedDtlField>0.1</camelAddedDtlField> 
      </orderDetails> 
      <orderId>60161E3E-3C4A-4CE6-AAC3-E4D2BC240046</orderId> 
      <ordertotal>0.0</ordertotal> 
      <camelAddedHdrField>0.0</camelAddedHdrField> 
     </return> 
     </ns2:fetchOrderListResponse> 
    </soap:Body> 
</soap:Envelope> 

而XSLT如下:

<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> 

    <xsl:output method="xml" indent="yes"/> 

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

    <xsl:template match="ordertotal"> 
     <xsl:copy> 
      <xsl:value-of select="sum(../orderDetails/(itemPrice*itemQty))" /> 
     </xsl:copy> 
    </xsl:template> 

</xsl:stylesheet> 

总产值有望..

<?xml version="1.0" encoding="UTF-8"?> 
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> 
    <soap:Body> 
     <ns2:fetchOrderListResponse xmlns:ns2="http://impl.lob.wipro.com/"> 
     <return> 
      <customerOrderNumber>1</customerOrderNumber> 
      <orderDetails> 
       <itemPrice>50.0</itemPrice> 
       <itemQty>2</itemQty> 
       <itemUnit>0</itemUnit> 
       <orderDetailsId>37516016-D71B-4790-951F-55D00B0CC159</orderDetailsId> 
       <camelAddedDtlField>0.1</camelAddedDtlField> 
      </orderDetails> 
      <orderDetails> 
       <itemPrice>39.0</itemPrice> 
       <itemQty>3</itemQty> 
       <itemUnit>0</itemUnit> 
       <orderDetailsId>6095ABC7-0D0D-4B2E-92E5-80F24E9092B8</orderDetailsId> 
       <camelAddedDtlField>0.1</camelAddedDtlField> 
      </orderDetails> 
      <orderId>84EC371D-40CA-455E-A0FA-7EA733E9BFD3</orderId> 
      <ordertotal>217</ordertotal> 
      <camelAddedHdrField>0.0</camelAddedHdrField> 
     </return> 
     <return> 
      <customerOrderNumber>1</customerOrderNumber> 
      <orderId>54712493-2172-4ADB-814B-BC7AA0BB72C3</orderId> 
      <ordertotal>0</ordertotal> 
      <camelAddedHdrField>0.0</camelAddedHdrField> 
     </return> 
     <return> 
      <customerOrderNumber>1</customerOrderNumber> 
      <deliverydate>2013-02-06T00:00:00+05:30</deliverydate> 
      <orderDetails> 
       <itemPrice>565.0</itemPrice> 
       <itemQty>1</itemQty> 
       <itemUnit>0</itemUnit> 
       <orderDetailsId>9A5030BE-F95F-4C62-B5A2-41FF85423218</orderDetailsId> 
       <camelAddedDtlField>0.1</camelAddedDtlField> 
      </orderDetails> 
      <orderDetails> 
       <itemPrice>4.0</itemPrice> 
       <itemQty>90</itemQty> 
       <itemUnit>0</itemUnit> 
       <orderDetailsId>65A8B3BE-D407-43D8-8754-EA1E26AA56E4</orderDetailsId> 
       <camelAddedDtlField>0.1</camelAddedDtlField> 
      </orderDetails> 
      <orderId>0BDCB222-0117-47A9-8813-DF03A1D19E5E</orderId> 
      <ordertotal>925</ordertotal> 
      <camelAddedHdrField>0.0</camelAddedHdrField> 
     </return> 
     <return> 
      <customerOrderNumber>1</customerOrderNumber> 
      <orderId>8E4220DC-884B-47BC-A565-E26B80BA5249</orderId> 
      <ordertotal>0</ordertotal> 
      <camelAddedHdrField>0.0</camelAddedHdrField> 
     </return> 
     <return> 
      <customerOrderNumber>1</customerOrderNumber> 
      <deliverydate>2013-02-06T00:00:00+05:30</deliverydate> 
      <orderDetails> 
       <itemPrice>10.0</itemPrice> 
       <itemQty>4</itemQty> 
       <itemUnit>0</itemUnit> 
       <orderDetailsId>5A2DF895-BB0F-4039-80DB-F44CED31697B</orderDetailsId> 
       <camelAddedDtlField>0.1</camelAddedDtlField> 
      </orderDetails> 
      <orderDetails> 
       <itemPrice>20.0</itemPrice> 
       <itemQty>3</itemQty> 
       <itemUnit>0</itemUnit> 
       <orderDetailsId>8034FBF4-B573-4B19-BDF5-FAF6C4247A55</orderDetailsId> 
       <camelAddedDtlField>0.1</camelAddedDtlField> 
      </orderDetails> 
      <orderId>60161E3E-3C4A-4CE6-AAC3-E4D2BC240046</orderId> 
      <ordertotal>100</ordertotal> 
      <camelAddedHdrField>0.0</camelAddedHdrField> 
     </return> 
     </ns2:fetchOrderListResponse> 
    </soap:Body> 
</soap:Envelope> 

从日志..(得到重复打印..)

16:06:45,883 | ERROR | ExtenderThread-2 | XsltErrorListener    | 147 - org.apache.camel.camel-core - 2.10.0.fuse-71-047 | A location step was expected following the '/' or '//' token.; Line#: 8; Column#: 78 
javax.xml.transform.TransformerException: A location step was expected following the '/' or '//' token. 
    at org.apache.xpath.compiler.XPathParser.error(XPathParser.java:610)[:] 
    at org.apache.xpath.compiler.XPathParser.RelativeLocationPath(XPathParser.java:1639)[:] 
    at org.apache.xpath.compiler.XPathParser.LocationPath(XPathParser.java:1597)[:] 
    at org.apache.xpath.compiler.XPathParser.PathExpr(XPathParser.java:1317)[:] 
    at org.apache.xpath.compiler.XPathParser.UnionExpr(XPathParser.java:1236)[:] 
    at org.apache.xpath.compiler.XPathParser.UnaryExpr(XPathParser.java:1142)[:] 
    at org.apache.xpath.compiler.XPathParser.MultiplicativeExpr(XPathParser.java:1063)[:] 
    at org.apache.xpath.compiler.XPathParser.AdditiveExpr(XPathParser.java:1005)[:] 
    at org.apache.xpath.compiler.XPathParser.RelationalExpr(XPathParser.java:930)[:] 
    at org.apache.xpath.compiler.XPathParser.EqualityExpr(XPathParser.java:870)[:] 
    at org.apache.xpath.compiler.XPathParser.AndExpr(XPathParser.java:834)[:] 
    at org.apache.xpath.compiler.XPathParser.OrExpr(XPathParser.java:807)[:] 
    at org.apache.xpath.compiler.XPathParser.Expr(XPathParser.java:790)[:] 
    at org.apache.xpath.compiler.XPathParser.Argument(XPathParser.java:1469)[:] 
    at org.apache.xpath.compiler.XPathParser.FunctionCall(XPathParser.java:1537)[:] 
    at org.apache.xpath.compiler.XPathParser.PrimaryExpr(XPathParser.java:1446)[:] 
    at org.apache.xpath.compiler.XPathParser.FilterExpr(XPathParser.java:1345)[:] 
    at org.apache.xpath.compiler.XPathParser.PathExpr(XPathParser.java:1278)[:] 
    at org.apache.xpath.compiler.XPathParser.UnionExpr(XPathParser.java:1236)[:] 
    at org.apache.xpath.compiler.XPathParser.UnaryExpr(XPathParser.java:1142)[:] 
    at org.apache.xpath.compiler.XPathParser.MultiplicativeExpr(XPathParser.java:1063)[:] 
    at org.apache.xpath.compiler.XPathParser.AdditiveExpr(XPathParser.java:1005)[:] 
    at org.apache.xpath.compiler.XPathParser.RelationalExpr(XPathParser.java:930)[:] 
    at org.apache.xpath.compiler.XPathParser.EqualityExpr(XPathParser.java:870)[:] 
    at org.apache.xpath.compiler.XPathParser.AndExpr(XPathParser.java:834)[:] 
    at org.apache.xpath.compiler.XPathParser.OrExpr(XPathParser.java:807)[:] 
    at org.apache.xpath.compiler.XPathParser.Expr(XPathParser.java:790)[:] 
at org.apache.xpath.compiler.XPathParser.initXPath(XPathParser.java:129)[:] 
    at org.apache.xpath.compiler.XPathParser.initXPath(XPathParser.java:157)[:] 
    at org.apache.xpath.compiler.XPathParser.initXPath(XPathParser.java:157)[:] 
    at org.apache.xpath.compiler.XPathParser.initXPath(XPathParser.java:157)[:] 
    at org.apache.xpath.compiler.XPathParser.initXPath(XPathParser.java:157)[:] 
    at org.apache.xpath.compiler.XPathParser.initXPath(XPathParser.java:157)[:] 
    at org.apache.xpath.compiler.XPathParser.initXPath(XPathParser.java:157)[:] 
    at org.apache.xpath.compiler.XPathParser.initXPath(XPathParser.java:157)[:] 
    at org.apache.xpath.compiler.XPathParser.initXPath(XPathParser.java:157)[:] 
    at org.apache.xpath.compiler.XPathParser.initXPath(XPathParser.java:157)[:] 
    at org.apache.xpath.compiler.XPathParser.initXPath(XPathParser.java:157)[:] 
+0

我不熟悉你的环境,但太阳/ Oracle的JRE仅支持XSLT 1.0。如果你想在Java中使用XSLT 2.0,你需要使用像Saxon 9这样的XSLT 2.0处理器。但我不知道你的环境是否允许你整合Saxon 9。 – 2013-03-12 10:23:22

+0

您好,Martin Honnen,是的,我也在我的“路径”变量中添加了saxon9 jar。 – Rangaprasad 2013-03-12 10:28:03

+0

在一个IDE保险丝座上,我能够运行一个使用XSLT 2.0和camel-saxon实现的示例项目。但是当涉及融合esb时,im **不能**能够成功安装捆绑包。 – Rangaprasad 2013-03-12 11:42:14

回答

0

以防万一,如果与Karaf + Apache的骆驼你正在错误XSLT 2.0诸如一个如下所述,简单地迫使camel xslt组件使用saxon(camel-saxon)而不是JDK默认的。

如果创建新节点karaf 4.x版+与根节点相同的XSLT组件可以工作,但新的节点会尽量挑选XSLT处理器从JDK这也可能发生。

问题(错误检):

javax.xml.transform.TransformerConfigurationException: Error checking type of the expression 'funcall(current-dateTime, [])'. 

解决方案(例):

<to uri="xslt:transformers/XSLT-Mappers/CustomerService-Response.xsl?saxon=true" />