开发者

Problem using metro webservice stack with JBoss

开发者 https://www.devze.com 2023-03-11 03:40 出处:网络
I am using Metro 2.1 together with JBoss 4.2.2. The application deploys without errors but when I try to access a WebService I get the following error:

I am using Metro 2.1 together with JBoss 4.2.2.

The application deploys without errors but when I try to access a WebService I get the following error:

java.util.ServiceConfigurationError: javax.xml.ws.spi.Provider: Provider org.jboss.ws.core.jaxws.spi.ProviderImpl not found (see full stack trace below)

The Problem is that Jboss tries to load the ProviderImpl of it's own webservice implementation instead it should use the ProviderImpl from the metro implementation.

In META-INF/services/javaw.xml.ws.spi.Provider I have configured: com.sun.xml.ws.spi.ProviderImpl.

Why does Jboss not use the metro stack?

Ingo

Full stack trace:

java.util.ServiceConfigurationError: javax.xml.ws.spi.Provider: Provider org.jboss.ws.core.jaxws.spi.ProviderImpl not found
    at java.util.ServiceLoader.fail(ServiceLoader.java:214)
    at java.util.ServiceLoader.access$400(ServiceLoader.java:164)
    at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:350)
    at java.util.ServiceLoader$1.next(ServiceLoader.java:421)
    at javax.xml.ws.spi.Provider.getProviderUsingServiceLoader(Provider.java:146)
    at javax.xml.ws.spi.Provider.provider(Provider.java:106)
    at javax.xml.ws.Service.<init>(Service.java:57)
    at javax.xml.ws.Service.create(Service.java:687)
    at com.sun.xml.ws.security.trust.impl.TrustPluginImpl.invokeRST(TrustPluginImpl.java:547)
    at com.sun.xml.ws.security.trust.impl.TrustPluginImpl.process(TrustPluginImpl.java:174)
    at com.sun.xml.ws.security.trust.impl.client.开发者_开发技巧STSIssuedTokenProviderImpl.getIssuedTokenContext(STSIssuedTokenProviderImpl.java:144)
    at com.sun.xml.ws.security.trust.impl.client.STSIssuedTokenProviderImpl.issue(STSIssuedTokenProviderImpl.java:74)
    at com.sun.xml.ws.api.security.trust.client.IssuedTokenManager.getIssuedToken(IssuedTokenManager.java:83)
    at com.cg.ihe.doc.impl.GespagTokenGenerator.createToken(GespagTokenGenerator.java:108)
    at com.cg.ihe.doc.sourceadapter.impl.TianiIheAuthenticationProvider.login(TianiIheAuthenticationProvider.java:100)
    at com.cg.ihe.doc.impl.ConfigurableDocumentProvider.createSession(ConfigurableDocumentProvider.java:198)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
    at org.springframework.aop.framework.adapter.AfterReturningAdviceInterceptor.invoke(AfterReturningAdviceInterceptor.java:50)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:160)
    at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:54)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:160)
    at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
    at $Proxy99.createSession(Unknown Source)
    at com.cg.ihe.doc.impl.DexaMinerServiceImpl.createSession(DexaMinerServiceImpl.java:


I found this and it worked for jboss 4.2.3 and metro 3.1.1:

from http://community.jboss.org/thread/1080 :

I was able to overcome the problem by removing the jboss-jaxws.jar from the JBOSS_HOME/server/name/lib directory.


Change

META-INF/services/javaw.xml.ws.spi.Provider

to

META-INF/services/javax.xml.ws.spi.Provider

(note javax)

0

精彩评论

暂无评论...
验证码 换一张
取 消