Joe
Joe

Reputation: 7919

Not found javax.xml.ws.spi.ProviderImpl in migration to JBoss7.2

Environment:

Migration from:

I am migrating from JBoss 5.2 to Jboss 7.2 and I came across with an error with WS soap that does not find ProviderImpl because it is from the older implementation com.sun.xml.internal.ws.spi.ProviderImpl. Should i remove the file resources/META-INF/services/javax.xml.ws.spi.Provider to get the default implementation on JBoss 7.2? or change it?

EmpleoWeb

/**
 * This class was generated by the JAX-WS RI.
 * JAX-WS RI 2.2.4-b01
 * Generated source version: 2.2
 * 
 */
@WebServiceClient(name = "EmpleoWeb", targetNamespace = "http://namespace.softwareag.com/entirex/xml/mapping", wsdlLocation = "http://intra.web.es/WebServicesEntireX/services/EmpleoWeb?wsdl")
public class EmpleoWeb extends Service {

    private final static URL EMPLEOWEB_WSDL_LOCATION;
    private final static WebServiceException EMPLEOWEB_EXCEPTION;
    private final static QName EMPLEOWEB_QNAME = new QName("http://namespace.softwareag.com/entirex/xml/mapping", "EmpleoWeb");

    static {
        URL url = null;
        WebServiceException e = null;
        try {
            url = new URL("http://intra.web.es/WebServicesEntireX/services/EmpleoWeb?wsdl");
        } catch (MalformedURLException ex) {
            e = new WebServiceException(ex);
        }
        EMPLEOWEB_WSDL_LOCATION = url;
        EMPLEOWEB_EXCEPTION = e;
    }

    public EmpleoWeb() {
        super(__getWsdlLocation(), EMPLEOWEB_QNAME);
    }

    public EmpleoWeb(WebServiceFeature... features) {
        super(__getWsdlLocation(), EMPLEOWEB_QNAME, features);
    }

    public EmpleoWeb(URL wsdlLocation) {
        super(wsdlLocation, EMPLEOWEB_QNAME);//ERROR
    }
    ...

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

com.sun.xml.internal.ws.spi.ProviderImpl

Error log

Caused by: java.util.ServiceConfigurationError: javax.xml.ws.spi.Provider: Provider com.sun.xml.internal.ws.spi.ProviderImpl not found

...
Caused by: java.lang.reflect.InvocationTargetException
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at [email protected]//org.jboss.weld.injection.producer.DefaultLifecycleCallbackInvoker.invokeMethods(DefaultLifecycleCallbackInvoker.java:83)
    ... 146 more
Caused by: javax.xml.ws.WebServiceException: Error while searching for service [javax.xml.ws.spi.Provider]
    at [email protected]//javax.xml.ws.spi.FactoryFinder$1.createException(FactoryFinder.java:65)
    at [email protected]//javax.xml.ws.spi.FactoryFinder$1.createException(FactoryFinder.java:62)
    at [email protected]//javax.xml.ws.spi.ServiceLoaderUtil.firstByServiceLoader(ServiceLoaderUtil.java:74)
    at [email protected]//javax.xml.ws.spi.FactoryFinder.find(FactoryFinder.java:93)
    at [email protected]//javax.xml.ws.spi.Provider.provider(Provider.java:96)
    at [email protected]//javax.xml.ws.Service.<init>(Service.java:112)
    at deployment.accfor2.ear.accfor-ejb.jar//es.caib.accfor.business.io.ws.silcoi.entity.wsdl.empleo.EmpleoWeb.<init>(EmpleoWeb.java:50)
    at deployment.accfor2.ear.accfor-ejb.jar//es.caib.accfor.business.io.ws.silcoi.boundary.SilcoiClient.setWsdlEmpleoWeb(SilcoiClient.java:339)
    at deployment.accfor2.ear.accfor-ejb.jar//es.caib.accfor.business.io.ws.silcoi.boundary.SilcoiClient.<init>(SilcoiClient.java:45)
    at deployment.accfor2.ear.accfor-back.war//es.caib.accfor.presentation.back.io.ws.silcoi.SilcoiBean.init(SilcoiBean.java:43)
    ... 151 more
Caused by: java.util.ServiceConfigurationError: javax.xml.ws.spi.Provider: Provider com.sun.xml.internal.ws.spi.ProviderImpl not found
    at java.base/java.util.ServiceLoader.fail(ServiceLoader.java:588)
    at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.nextProviderClass(ServiceLoader.java:1211)
    at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNextService(ServiceLoader.java:1220)
    at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNext(ServiceLoader.java:1264)
    at java.base/java.util.ServiceLoader$2.hasNext(ServiceLoader.java:1299)
    at java.base/java.util.ServiceLoader$3.hasNext(ServiceLoader.java:1384)
    at [email protected]//javax.xml.ws.spi.ServiceLoaderUtil.firstByServiceLoader(ServiceLoaderUtil.java:67)
    ... 158 more

Upvotes: 3

Views: 11294

Answers (2)

janrb
janrb

Reputation: 11

In my case it was due to the removal of the default implementation from java 11: Not found javax.xml.ws.spi.ProviderImpl in migration to JBoss7.2

Upvotes: 0

Joe
Joe

Reputation: 7919

Following the Oracle JDK Migration Guide and JEP 320: Remove the Java EE and CORBA Modules

I added the following depending to maven project to keep up running.

    <!-- JAXWS for Java 11 -->
    <dependency>
        <groupId>com.sun.xml.ws</groupId>
        <artifactId>jaxws-rt</artifactId>
        <version>2.3.0</version>
    </dependency>

And I had to download jaxws-rt-2.3.0.jar and added to /lib folder.

Upvotes: 2

Related Questions