Skip to main content

java.lang.ClassNotFoundException: com.sun.xml.internal.ws.spi.ProviderImpl

3 replies [Last post]
eran_kawkaz
Offline
Joined: 2010-06-11
Points: 0

Hi all, I'm new here, so please be gentle with me...
I used wsimport utility from JAXWS2.2, to create a WS client for a specific wsdl.
I took the generated classes, added them to my project - Works fine.
I've put them in a jar, ran it - Perfect.
But, when I deployed that jar on a different env, I get the error:
javax.xml.ws.WebServiceException: Provider com.sun.xml.internal.ws.spi.ProviderImpl not found
at javax.xml.ws.spi.FactoryFinder.newInstance(FactoryFinder.java:33)
at javax.xml.ws.spi.FactoryFinder.find(FactoryFinder.java:128)
at javax.xml.ws.spi.Provider.provider(Provider.java:108)
at javax.xml.ws.Service.(Service.java:57)

I'm using JDK 5, not 6, on both envs.
Also the wsimport was run using java 5, and not 6.
As I understand - the com.sun.xml.internal.ws.spi.ProviderImpl class is a part of JDK 6, no?
Why is my client searching for this class?

Appreciate your answers, this is driving me crazy.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Jitendra Kotamraju

On 06/11/2010 04:16 AM, metro@javadesktop.org wrote:
> Hi all, I'm new here, so please be gentle with me...
> I used wsimport utility from JAXWS2.2, to create a WS client for a specific wsdl.
> I took the generated classes, added them to my project - Works fine.
> I've put them in a jar, ran it - Perfect.
> But, when I deployed that jar on a different env, I get the error:
> javax.xml.ws.WebServiceException: Provider com.sun.xml.internal.ws.spi.ProviderImpl not found
> at javax.xml.ws.spi.FactoryFinder.newInstance(FactoryFinder.java:33)
> at javax.xml.ws.spi.FactoryFinder.find(FactoryFinder.java:128)
> at javax.xml.ws.spi.Provider.provider(Provider.java:108)
> at javax.xml.ws.Service.(Service.java:57)
>
> I'm using JDK 5, not 6, on both envs.
> Also the wsimport was run using java 5, and not 6.
> As I understand - the com.sun.xml.internal.ws.spi.ProviderImpl class is a part of JDK 6, no?
>
Yes, it is. But the API's FactoryFinder may look for it. But that's not
the problem. In the second env, you don't seem to have jaxws-rt.jar in
the classpath.

Jitu
> Why is my client searching for this class?
>
> Appreciate your answers, this is driving me crazy.
> [Message sent by forum member 'eran_kawkaz']
>
> http://forums.java.net/jive/thread.jspa?messageID=473885
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@metro.dev.java.net
> For additional commands, e-mail: users-help@metro.dev.java.net
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@metro.dev.java.net
For additional commands, e-mail: users-help@metro.dev.java.net

eran_kawkaz
Offline
Joined: 2010-06-11
Points: 0

Hi Jitu, thanks for answering.
I checked, and it seems I do have the jaxws-rt.jar.
Furhter more, the class com.sun.xml.internal.ws.spi.ProviderImpl does not exist in this jar, so even if I do miss it, how will it solve my problem?

Ther rt jar got this class, but in a different package, so I don't see how it will be found and used during runtime.

marko123
Offline
Joined: 2009-05-27
Points: 0

I just posted something about the same problem in the older thread: "Metro deployment problems to Websphere 7".
I have metro 2.0 downloaded and the class nof found is in the webservices-rt.jar.

The error is:

[6/15/10 9:52:46:515 CEST] 00000032 EndpointMetho E com.sun.xml.ws.spi.ProviderImpl (initialization failure)
java.lang.NoClassDefFoundError: com.sun.xml.ws.spi.ProviderImpl (initialization failure)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:140)

This only happens if my service invokes another metro service.
For more information take a look at the mentioned thread...