Bug 92788 - javax.xml.ws.WebServiceException: Provider com.sun.xml.ws.spi.ProviderImpl not found
javax.xml.ws.WebServiceException: Provider com.sun.xml.ws.spi.ProviderImpl no...
Status: RESOLVED WONTFIX
Product: webservices
Classification: Unclassified
Component: JAX-WS
5.x
All All
: P2 (vote)
: TBD
Assigned To: issues@webservices
issues@webservices
:
: 92789 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-01-18 16:48 UTC by dyegoleal
Modified: 2007-02-26 13:58 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dyegoleal 2007-01-18 16:51:21 UTC
I'm downloaded NetBeans 5.5.1 JDK 1.6.0 and GlassFish v2 b32
and now... i'm trying to create a simple webservice:

/**
 *
 * @author Dyego Souza Dantas Leal
 */
@WebService()
public class TesteWebService {
    /**
     * Web service operation
     */
    @WebMethod
    public String ping() {
        // TODO implement operation 
        return "pong !";
    }
    
}


and deployed on GlassFish v2 b32 , test and everythink works !!!!

I'm create a normal Java Application (with Sourcelevel 1.6 ) in my NetBeans and
create a WebService Client for my little webservice (using wizard).

to invoke , here is the code:

public class Main {
    
    /** Creates a new instance of Main */
    public Main() {
        //com.sun.xml.internal.ws.spi.ProviderImpl a;
        
        try { // Call Web Service Operation
            teste.TesteWebServiceService service = new
teste.TesteWebServiceService();
            teste.TesteWebService port = service.getTesteWebServicePort();
            // TODO process result here
            java.lang.String result = port.ping();
            System.out.println("Result = "+result);
        } catch (Exception ex) {
            ex.printStackTrace();
            // TODO handle custom exceptions here
        }
        
    }
    
    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        new Main();
        // TODO code application logic here
    }
    
}


And INSIDE netbeans... i got an error:

init:
deps-jar:
wsimport-init:
wsimport-client-check-TesteWebServiceService:
wsimport-client-TesteWebServiceService:
wsimport-client-generate:
wsimport-client-compile:
compile:
run:
javax.xml.ws.WebServiceException: Provider com.sun.xml.ws.spi.ProviderImpl not found
        at javax.xml.ws.spi.FactoryFinder.newInstance(FactoryFinder.java:38)
        at javax.xml.ws.spi.FactoryFinder.find(FactoryFinder.java:133)
        at javax.xml.ws.spi.Provider.provider(Provider.java:84)
        at javax.xml.ws.Service.<init>(Service.java:56)
        at teste.TesteWebServiceService.<init>(TesteWebServiceService.java:41)
        at javaapplication10.Main.<init>(Main.java:23)
        at javaapplication10.Main.main(Main.java:39)
Caused by: java.lang.ClassNotFoundException: com.sun.xml.ws.spi.ProviderImpl
        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
        at javax.xml.ws.spi.FactoryFinder.newInstance(FactoryFinder.java:34)
        ... 6 more
BUILD SUCCESSFUL (total time: 1 second)


But... if try to run outside netbeans... everythink works OK.

Is a bug ?
Comment 1 dyegoleal 2007-01-18 16:54:58 UTC
*** Issue 92789 has been marked as a duplicate of this issue. ***
Comment 2 Lukas Jungmann 2007-01-18 17:22:29 UTC
issue with JAX-WS 2.1 on JDK 6, see the duplicate.

*** This issue has been marked as a duplicate of 91622 ***
Comment 3 dyegoleal 2007-01-18 18:11:18 UTC
I'm using default jax-ws inside 1.6.0... is not ws 2.1... is 2.0
Comment 4 Lukas Jungmann 2007-01-18 18:32:44 UTC
> I'm using default jax-ws inside 1.6.0... is not ws 2.1... is 2.0

Are you really sure? AFAIK in GF-v2-b32 there's only *JAX-WS 2.1-ea3*, there's
no JAX-WS 2.0 anymore. And the same applies to NetBeans 5.5.1.

If you want to use JAX-WS 2.0 in NB 5.5.1 then replace jars in JAX-WS library in
the Library Manager (Tools -> Library Manager) with the ones from real JAX-WS
2.0 library (you can get it from http://jax-ws.dev.java.net).

Workarounds exist => P2.

BTW: Did you try a workaround I suggested on nbdev?
Comment 5 Milan Kuchtiak 2007-02-26 13:58:13 UTC
There are basically 2 options (when using jdk1.6) :

1. JAX-WS 2.1 library is selected in Project customizer :
  - the java.endorsed.dirs property (JVM Option) should be specified :
-Djava.endorsed.dirs=path to JAX-WS2.1 API classes

2.JAX-WS 2.1 library is not selected in Project customizer (doesn't need to be
as jdk1.6 contains JAX-WS2.0) :
  - the java.endorsed.dirs propery don't need to be specified.

The exception occurs when java.endorsed.library refers to JAX-WS2.1 API classes,
but the implementation classes(com.sun.xml.ws.spi.ProviderImpl) are missing in
that directory.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo