问题
I use jaxws 2.2.3 and Jboss 5.1 with JDK 6.
When calling ws client, I get
java.util.ServiceConfigurationError: javax.xml.ws.spi.Provider: Provider org.jboss.ws.core.jaxws.spi.ProviderImpl not found (see full stack trace below)
When I remove libs jbossws-native-*.jar from jboss/lib/endorsed everthing works fine. But they must be there.
I tried to tell jboss to use com.sun.xml.ws.spi.ProviderImpl:
- META-INF/services/javax.xml.ws.spi.Provider
- -Djavax.xml.ws.spi.Provider
to read first my libs WEB-INF/jboss-classloading.xml
<classloading xmlns="urn:jboss:classloading:1.0" parent-first="false" domain="DefaultDomain" top-level-classloader="true" parent-domain="Ignored" export-all="NON_EMPTY" import-all="true"> </classloading>
No luck. I spent whole day with this and I have no idea.
Please help me.
回答1:
I created endorsed libs for jboss instance - /jboss/server//lib/endorsed and copied these jars:
jaxws-api-2.2.3.jar
jaxws-rt-2.2.3.jar
jaxws-spring-1.8.jar
policy-2.2.2.jar
in my startup file I added:
set PRIVATE_ENDORSED_DIRS=%JBOSS_HOME%\server\portal_V1\lib\endorsed
then in run.bat:
if "x%PRIVATE_ENDORSED_DIRS%" == "x" (
set "JBOSS_ENDORSED_DIRS=%JBOSS_HOME%\lib\endorsed"
) else (
set "JBOSS_ENDORSED_DIRS=%PRIVATE_ENDORSED_DIRS%;%JBOSS_HOME%\lib\endorsed"
)
REM set JBOSS_ENDORSED_DIRS=%JBOSS_HOME%\lib\endorsed
I couldn't play with JBoss libraries, because there are JBoss instances which don't belong to me and I know nothing about them.
来源:https://stackoverflow.com/questions/7842286/providerimpl-not-found-jboss-5-1