适用于WAS 8.0的TransformerFactory

时间:2015-01-27 17:21:26

标签: xslt websphere websphere-8

我正在尝试解析WAS 8.0中的一个xsl文件。使用WAS 8.0 xml.jar JRE中包含的解析器。

该课程为:(TransformerFactory)

TransformerFactory tFactory = TransformerFactory.newInstance ();
Transformer transformer = tFactory.newTransformer (xslSource);

在WAS 6.0中工作!

[27/01/15 16:08:28:633 CET] 00000049 SystemErr     R ERROR MUY GRAVE:  ''
[27/01/15 16:08:28:633 CET] 00000049 SystemErr     R javax.xml.transform.TransformerConfigurationException: com.ibm.xtq.xslt.jaxp.HandledRuntimeException
[27/01/15 16:08:28:633 CET] 00000049 SystemErr     R    at com.ibm.xtq.xslt.jaxp.AbstractTransformerFactory.newTransformer(Unknown Source)
[27/01/15 16:08:28:633 CET] 00000049 SystemErr     R    at com.ibm._jsp._P0201_5F_consultar_5F_detalle_5F_acumulado_5F_nominas_5F_usuario._jspService(_P0201_5F_consultar_5F_detalle_5F_acumulado_5F_nominas_5F_usuario.java:272)
[27/01/15 16:08:28:633 CET] 00000049 SystemErr     R    at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:99)
[27/01/15 16:08:28:633 CET] 00000049 SystemErr     R    at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
[27/01/15 16:08:28:633 CET] 00000049 SystemErr     R    at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1230)
[27/01/15 16:08:28:633 CET] 00000049 SystemErr     R    at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:779)
[27/01/15 16:08:28:633 CET] 00000049 SystemErr     R    at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)
[27/01/15 16:08:28:633 CET] 00000049 SystemErr     R    at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
[27/01/15 16:08:28:633 CET] 00000049 SystemErr     R    at com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(GenericServletWrapper.java:122)
[27/01/15 16:08:28:633 CET] 00000049 SystemErr     R    at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.handleRequest(AbstractJSPExtensionServletWrapper.java:205)
[27/01/15 16:08:28:633 CET] 00000049 SystemErr     R    at com.ibm.ws.webcontainer.filter.WebAppFilterChain.invokeTarget(WebAppFilterChain.java:136)
[27/01/15 16:08:28:633 CET] 00000049 SystemErr     R    at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:79)
[27/01/15 16:08:28:633 CET] 00000049 SystemErr     R    at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:960)
[27/01/15 16:08:28:633 CET] 00000049 SystemErr     R    at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1064)
[27/01/15 16:08:28:633 CET] 00000049 SystemErr     R    at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:87)
[27/01/15 16:08:28:633 CET] 00000049 SystemErr     R    at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:914)
[27/01/15 16:08:28:633 CET] 00000049 SystemErr     R    at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1662)
[27/01/15 16:08:28:633 CET] 00000049 SystemErr     R    at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:200)
[27/01/15 16:08:28:633 CET] 00000049 SystemErr     R    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:453)
[27/01/15 16:08:28:633 CET] 00000049 SystemErr     R    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:515)
[27/01/15 16:08:28:633 CET] 00000049 SystemErr     R    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:306)
[27/01/15 16:08:28:633 CET] 00000049 SystemErr     R    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:277)
[27/01/15 16:08:28:633 CET] 00000049 SystemErr     R    at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
[27/01/15 16:08:28:633 CET] 00000049 SystemErr     R    at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
[27/01/15 16:08:28:633 CET] 00000049 SystemErr     R    at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:175)
[27/01/15 16:08:28:633 CET] 00000049 SystemErr     R    at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
[27/01/15 16:08:28:633 CET] 00000049 SystemErr     R    at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
[27/01/15 16:08:28:633 CET] 00000049 SystemErr     R    at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
[27/01/15 16:08:28:633 CET] 00000049 SystemErr     R    at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
[27/01/15 16:08:28:633 CET] 00000049 SystemErr     R    at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
[27/01/15 16:08:28:633 CET] 00000049 SystemErr     R    at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
[27/01/15 16:08:28:633 CET] 00000049 SystemErr     R    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1702)
[27/01/15 16:08:28:633 CET] 00000049 SystemErr     R Caused by: com.ibm.xtq.xslt.jaxp.HandledRuntimeException
[27/01/15 16:08:28:633 CET] 00000049 SystemErr     R    at com.ibm.xtq.xslt.jaxp.ConfigurationErrorHandler.report(Unknown Source)
[27/01/15 16:08:28:633 CET] 00000049 SystemErr     R    at com.ibm.xtq.utils.Reporter.report(Unknown Source)
[27/01/15 16:08:28:633 CET] 00000049 SystemErr     R    at com.ibm.xtq.ast.parsers.xslt.XSLTParser.reportError(Unknown Source)
[27/01/15 16:08:28:633 CET] 00000049 SystemErr     R    at com.ibm.xtq.xslt.drivers.XSLTCompiler.compile(Unknown Source)
[27/01/15 16:08:28:633 CET] 00000049 SystemErr     R    at com.ibm.xtq.xslt.jaxp.compiler.TransformerFactoryImpl.createTemplates(Unknown Source)
[27/01/15 16:08:28:633 CET] 00000049 SystemErr     R    ... 32 more

1 个答案:

答案 0 :(得分:0)

前几天我接受了确切的例外挑战。在WAS 8.0 SystemOut.log中找到以下错误消息:

XSL Transformer failed: The message - com.ibm.xtq.xslt.jaxp.HandledRuntimeException: Connection reset 
com.xx.package.ii.servlet.TXXXServlet: null 
com.xx.package.ii.servlet.TXXXServlet: Servlet Output Error

但是当我调试我的代码时,我发现了上面的确切异常,因为我们没有为许多父xsl中的xsl导入提供正确的上下文路径 $ {LOCAL_SERVER_URL} 。 / p>

<xsl:import href="${LOCAL_SERVER_URL}/{contextroot}/xslfolder/mywork.xsl"/>

我们将正确的 $ {LOCAL_SERVER_URL} 放置为 http://localhost:58014 ,这对我们有用。总而言之,问题不在于我们的案例中的WAS 8.0。