当我致电我的服务时,我有一个错误的错误:
2015-07-06 14:53:09,885 ERROR [org.jboss.ws.core.jaxws.spi.ServiceDelegateImpl] (pool-39-thread-1) Cannot create proxy for SEI com.foo.FooPortType from: jar:file:/D:/servers/jboss-soa-p-5/jboss-as/server/default/deploy/Foo.esb!/
2015-07-06 14:53:09,887 ERROR javax.xml.ws.WebServiceException: Cannot create proxy
at org.jboss.ws.core.jaxws.spi.ServiceDelegateImpl.createProxy(ServiceDelegateImpl.java:471)
at org.jboss.ws.core.jaxws.spi.ServiceDelegateImpl.getPortInternal(ServiceDelegateImpl.java:304)
at org.jboss.ws.core.jaxws.spi.ServiceDelegateImpl.getPort(ServiceDelegateImpl.java:225)
at javax.xml.ws.Service.getPort(Service.java:92)
at com.foo.FooService.getFooPort(FooService.java:86)
at com.foo.actions.FooAction.process(FooAction.java:65)
at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.processPipeline(ActionProcessingPipeline.java:649)
at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.processPipeline(ActionProcessingPipeline.java:603)
at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.process(ActionProcessingPipeline.java:433)
at org.jboss.soa.esb.listeners.message.MessageAwareListener$TransactionalRunner.run(MessageAwareListener.java:550)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.IllegalArgumentException: interface org.jboss.ws.core.StubExt is not visible from class loader
at java.lang.reflect.Proxy.getProxyClass0(Proxy.java:461)
at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:690)
at org.jboss.ws.core.jaxws.spi.ServiceDelegateImpl.createProxy(ServiceDelegateImpl.java:451)
... 12 more
此服务正在调用另一个服务。我添加了maven依赖:
<dependency>
<groupId>org.jboss.ws.native</groupId>
<artifactId>jbossws-native-core</artifactId>
<version>4.2.1.Final</version>
</dependency>
如果我打开这个jar,我显然可以看到StubExt类。
有什么不对?
此问题类似于:https://developer.jboss.org/thread/232142
但是根本没有答案:(
答案 0 :(得分:0)
愚蠢的错误......我有2份jbossws-native-core
。
一个在.esb文件中,第二个在我的Jboss服务器上的lib文件夹中。
添加<scope>provided</scope>
到jbossws-native-core
依赖项解决了我的问题。