使用JBoss的城域网服务栈的问题

时间:2011-06-07 09:10:38

标签: jboss java-metro-framework

我正在使用Metro 2.1和JBoss 4.2.2。

应用程序部署没有错误但是当我尝试访问WebService时,我收到以下错误:

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

问题是Jboss尝试加载它自己的web服务实现的ProviderImpl,而不是使用来自metro实现的ProviderImpl

META-INF/services/javaw.xml.ws.spi.Provider我已配置:com.sun.xml.ws.spi.ProviderImpl

为什么Jboss不使用地铁堆栈?

英戈

完整堆栈跟踪:

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:

2 个答案:

答案 0 :(得分:2)

我发现了这个,它适用于jboss 4.2.3和metro 3.1.1:

来自http://community.jboss.org/thread/1080

  

我能够通过从JBOSS_HOME / server / name / lib目录中删除jboss-jaxws.jar来解决这个问题。

答案 1 :(得分:0)

更改

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

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

(注意javax)