2011-12-06 60 views
1

我從WSDL(我使用JAVA 1.6)自動生成SOAP webservice客戶端,並且它在Tomcat 6上工作正常。但是,當我將客戶端置於戰爭中時嘗試將它在JBoss應用服務器部署6.1我收到以下錯誤:Web服務適用於Tomcat 6,但不適用於JBoss AS 6

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); 
    } 
+0

也許是不同版本的庫或缺少的庫?也許這就是爲什麼從arjuna的東西到javax的嘗試。 – Alfabravo

+0

這是一個可能的方向......但我不知道如何解決這個演員問題,我所知道的是arjunacore pacage是jboss 6的一部分 –

回答

1

看起來你就必須堅持使用JBoss的支持WS實現(母語,CXF或Metro)。

嘗試從classpath中刪除包含sun的實現(com.sun.xml.ws. *等)的所有jar。無論如何,它已經很老了,被地鐵所取代。

請參閱http://www.jboss.org/jbossws

相關問題