gpt4 book ai didi

java - Web 服务可以在 Tomcat 6 上运行,但不能在 JBoss AS 6 上运行

转载 作者:太空宇宙 更新时间:2023-11-04 08:26:30 24 4
gpt4 key购买 nike

我从 WSDL 自动生成了一个 SOAP Web 服务客户端(我使用 JAVA 1.6),它在 Tomcat 6 上运行良好。但是,当我将客户端置于 war 状态并尝试将其部署到 JBoss Application Server 6.1 中时,出现以下错误:

Caused by: java.lang.ExceptionInInitializerError
at com.sun.xml.ws.tx.common.Util.isJTAAvailable(Util.java:71) [:1.0]
at com.sun.xml.ws.assembler.PipelineAssemblerFactoryImpl$WsitPipelineAssembler.isTransactionsEnabled(PipelineAssemblerFactoryImpl.java:468) [:1.0]
at com.sun.xml.ws.assembler.PipelineAssemblerFactoryImpl$WsitPipelineAssembler.createClient(PipelineAssemblerFactoryImpl.java:271) [:1.0]
at com.sun.xml.ws.api.pipe.TubelineAssemblerFactory$TubelineAssemblerAdapter.createClient(TubelineAssemblerFactory.java:136) [:1.0]
at com.sun.xml.ws.client.WSServiceDelegate.createPipeline(WSServiceDelegate.java:423) [:1.0]
at com.sun.xml.ws.client.WSServiceDelegate.createEndpointIFBaseProxy(WSServiceDelegate.java:589) [:1.0]
at com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:329) [:1.0]
at com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:311) [:1.0]
at com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:304) [:1.0]
**at javax.xml.ws.Service.getPort(Service.java:92) [:1.0.0.Final]**
at com.ewave.meuhedet.ws.iclient.city.EWCITYServicesService.getEWCITYServices(EWCITYServicesService.java:74) [:]
at com.ewave.meuhedet.ws.iclient.impl.PharmacyServiceIClientImpl.<init>(PharmacyServiceIClientImpl.java:58) [:]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [:1.6.0_26]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) [:1.6.0_26]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) [:1.6.0_26]
at java.lang.reflect.Constructor.newInstance(Constructor.java:513) [:1.6.0_26]
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:126) [:3.0.1.RELEASE-A]
... 105 more
**Caused by: java.lang.ClassCastException: com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionSynchronizationRegistryImple cannot be cast to javax.transaction.TransactionSynchronizationRegistry**
at com.sun.xml.ws.tx.common.TransactionManagerImpl.<init>(TransactionManagerImpl.java:106) [:1.0]
at com.sun.xml.ws.tx.common.TransactionManagerImpl.<clinit>(TransactionManagerImpl.java:62) [:1.0]
... 122 more

这是自动生成的 getEWCITYServices 函数

@WebEndpoint(name = "EW_CITYServices")
public EWCITYServices getEWCITYServices() {
return super.**getPort**(new QName("http://ew_city.wsbeans.iseries",
"EW_CITYServices"), EWCITYServices.class);
}

最佳答案

看来您必须坚持使用 JBoss 支持的 WS 实现(Native、CXF 或 Metro)。

尝试从类路径中删除所有包含 sun 实现的 jar 文件(com.sun.xml.ws.* 等)。无论如何,它已经很旧了,已经被 Metro 取代了。

参见http://www.jboss.org/jbossws .

关于java - Web 服务可以在 Tomcat 6 上运行,但不能在 JBoss AS 6 上运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8404628/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com