英文:
Bean creation issues with XsltPayloadTransformer due to [ERR 0512] Cannot continue because of stylesheet errors in Websphere 9
问题
我们在项目中使用了Spring Integration(spring-integration-core:jar:5.0.14.RELEASE)。我们的应用程序在JBOSS 7 EAP中运行良好。现在我们希望使其与Websphere 9应用服务器兼容。当我们在Websphere 9中部署应用程序并尝试访问时,出现了以下错误。看起来**<int-xml:xslt-transformer>**存在一些问题。是否有不兼容的XSLT处理器引起了此问题?对于如何进一步解决此问题,我们将不胜感激。提前感谢您的帮助。
<pre> [10/14/20 4:00:35:585 CDT] 000000e8 webapp E com.ibm.ws.webcontainer.webapp.WebApp logServletError SRVE0293E: [Servlet Error]-[SpringDispatcherServlet]: org.springframework.beans.factory.BeanCreationException: 创建bean时出错,名称为'org.springframework.integration.xml.transformer.XsltPayloadTransformer#540': 调用初始化方法失败; 嵌套异常是java.lang.IllegalStateException: javax.xml.transform.TransformerConfigurationException: com.ibm.xtq.xslt.jaxp.HandledRuntimeException: [ERR 0512] 由于样式表错误,无法继续。
...
嵌套异常跟踪 ...
</pre>
英文:
We are using spring integration(spring-integration-core:jar:5.0.14.RELEASE) in our project. Our application is working fine in JBOSS 7 EAP. Now we want to make it compatible with Websphere 9 Application sever. We are getting the following error when we deploy the application in Websphere 9 and try to access it. It appears that there is some problem with <int-xml:xslt-transformer> . Any incompatible XSLT processors causing this issue? Any help on how to proceed further to fix this problem would be appreciated. Thanks in advance.
<pre> [10/14/20 4:00:35:585 CDT] 000000e8 webapp E com.ibm.ws.webcontainer.webapp.WebApp logServletError SRVE0293E: [Servlet Error]-[SpringDispatcherServlet]: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.integration.xml.transformer.XsltPayloadTransformer#540': Invocation of init method failed; nested exception is java.lang.IllegalStateException: javax.xml.transform.TransformerConfigurationException: com.ibm.xtq.xslt.jaxp.HandledRuntimeException: [ERR 0512] Cannot continue because of stylesheet errors.
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1687)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:573)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:495)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317)
at org.springframework.beans.factory.support.AbstractBeanFactory$$Lambda$148.000000003A5547E0.getObject(Unknown Source)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315)
at <unknown class>.<unknown method>(Unknown Source)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:755)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:881)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:551)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:409)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:291)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:103)
at com.ibm.ws.webcontainer.webapp.WebApp.notifyServletContextCreated(WebApp.java:1836)
at com.ibm.ws.webcontainer.webapp.WebAppImpl.initialize(WebAppImpl.java:442)
at com.ibm.ws.webcontainer.webapp.WebGroupImpl.addWebApplication(WebGroupImpl.java:88)
at com.ibm.ws.webcontainer.VirtualHostImpl.addWebApplication(VirtualHostImpl.java:171)
at com.ibm.ws.webcontainer.WSWebContainer.addWebApp(WSWebContainer.java:904)
at com.ibm.ws.webcontainer.WSWebContainer.addWebApplication(WSWebContainer.java:789)
at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:427)
at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:719)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1248)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1578)
at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:707)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:1153)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:800)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplicationDynamically(ApplicationMgrImpl.java:1450)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:2311)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:436)
at com.ibm.ws.runtime.component.CompositionUnitImpl.start(CompositionUnitImpl.java:123)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:379)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.access$500(CompositionUnitMgrImpl.java:127)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl$1.run(CompositionUnitMgrImpl.java:654)
at com.ibm.ws.security.auth.ContextManagerImpl.runAs(ContextManagerImpl.java:5574)
at com.ibm.ws.security.auth.ContextManagerImpl.runAsSystem(ContextManagerImpl.java:5700)
at com.ibm.ws.security.core.SecurityContext.runAsSystem(SecurityContext.java:255)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.startCompositionUnit(CompositionUnitMgrImpl.java:668)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.startCompositionUnit(CompositionUnitMgrImpl.java:612)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:1340)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:90)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
at java.lang.reflect.Method.invoke(Method.java:508)
at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:83)
at sun.reflect.GeneratedMethodAccessor94.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
at java.lang.reflect.Method.invoke(Method.java:508)
at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:287)
at javax.management.modelmbean.RequiredModelMBean$4.run(RequiredModelMBean.java:1263)
at java.security.AccessController.doPrivileged(AccessController.java:673)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java:1257)
at javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:1096)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:831)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:813)
at com.ibm.ws.management.AdminServiceImpl$1.run(AdminServiceImpl.java:1350)
at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
at com.ibm.ws.management.AdminServiceImpl.invoke(AdminServiceImpl.java:1243)
at com.ibm.ws.management.connector.AdminServiceDelegator.invoke(AdminServiceDelegator.java:181)
at com.ibm.ws.management.connector.ipc.CallRouter.route(CallRouter.java:247)
at com.ibm.ws.management.connector.ipc.IPCConnectorInboundLink.doWork(IPCConnectorInboundLink.java:360)
at com.ibm.ws.management.connector.ipc.IPCConnectorInboundLink$IPCConnectorReadCallback.complete(IPCConnectorInboundLink.java:602)
at com.ibm.ws.ssl.channel.impl.SSLReadServiceContext$SSLReadCompletedCallback.complete(SSLReadServiceContext.java:1833)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:175)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1909)
Caused by: java.lang.IllegalStateException: javax.xml.transform.TransformerConfigurationException: com.ibm.xtq.xslt.jaxp.HandledRuntimeException: [ERR 0512] Cannot continue because of stylesheet errors.
at org.springframework.integration.xml.transformer.XsltPayloadTransformer.onInit(XsltPayloadTransformer.java:248)
at org.springframework.integration.context.IntegrationObjectSupport.afterPropertiesSet(IntegrationObjectSupport.java:176)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1746)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1683)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:573)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:495)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317)
at org.springframework.beans.factory.support.AbstractBeanFactory$$Lambda$148.000000003A5547E0.getObject(Unknown Source)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315)
at <unknown class>.<unknown method>(Unknown Source)
... 64 more
Caused by: javax.xml.transform.TransformerConfigurationException: com.ibm.xtq.xslt.jaxp.HandledRuntimeException: [ERR 0512] Cannot continue because of stylesheet errors.
at com.ibm.xtq.xslt.jaxp.AbstractTransformerFactory.newTemplates(Unknown Source)
at org.springframework.integration.xml.transformer.XsltPayloadTransformer.onInit(XsltPayloadTransformer.java:245)
at org.springframework.integration.context.IntegrationObjectSupport.afterPropertiesSet(IntegrationObjectSupport.java:176)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1746)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1683)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:573)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:495)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317)
at org.springframework.beans.factory.support.AbstractBeanFactory$$Lambda$148.000000003A5547E0.getObject(Unknown Source)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315)
at <unknown class>.<unknown method>(Unknown Source)
... 64 more
Caused by: com.ibm.xtq.xslt.jaxp.HandledRuntimeException: [ERR 0512] Cannot continue because of stylesheet errors.
at com.ibm.xtq.xslt.jaxp.ConfigurationErrorHandler.report(Unknown Source)
at com.ibm.xtq.utils.Reporter.report(Unknown Source)
at com.ibm.xtq.ast.parsers.xslt.XSLTParser.reportError(Unknown Source)
at com.ibm.xtq.xslt.drivers.XSLTCompiler.compile(Unknown Source)
at com.ibm.xtq.xslt.jaxp.compiler.TransformerFactoryImpl.createTemplates(Unknown Source)
at com.ibm.xtq.xslt.jaxp.AbstractTransformerFactory.newTemplates(Unknown Source)
at org.springframework.integration.xml.transformer.XsltPayloadTransformer.onInit(XsltPayloadTransformer.java:245)
at org.springframework.integration.context.IntegrationObjectSupport.afterPropertiesSet(IntegrationObjectSupport.java:176)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1746)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1683)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:573)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:495)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317)
at org.springframework.beans.factory.support.AbstractBeanFactory$$Lambda$148.000000003A5547E0.getObject(Unknown Source)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315)
at <unknown class>.<unknown method>(Unknown Source)
... 64 more </pre>
答案1
得分: 0
经过一些研究,找到了以下解决方法:
通过将默认的 XSLT 处理器更改为 XSLT 解释器来解决该问题。
步骤如下:
-
转到服务器 -> 应用服务器 -> [服务器名称] -> 进程定义 -> Java 和进程管理 -> Java 虚拟机。
-
在此部分中,将以下参数添加到输入标记为“通用 JVM 参数”的位置:
"-Djavax.xml.transform.TransformerFactory=org.apache.xalan.processor.TransformerFactoryImpl" -
通过点击“OK”按钮提交表单,然后通过点击“保存”链接提交更改。这个更改需要重新启动 IBM WebSphere Application Server 才能生效。
英文:
After some research, found the following:
The issue is resolved by changing the default XSLT processor to XSLT interpreter.
For this:
-
Go to Servers -> Application servers -> [Server_Name] -> Proces
Definition -> Java and Process Management -> Java Virtual Machine -
In this section add the following argument:
"-Djavax.xml.transform.TransformerFactory=org.apache.xalan.processor.TransformerFactoryImpl"
to the input labelled "Generic JVM arguments" -
Submit the form by clicking the "OK" button, then commit changes by
clicking the "Save" link. This change needs a restart of IBM
WebSphere Application Server to take effect.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论