Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

javax.xml.ws.WebServiceException: Provider com.sun.xml.internal.ws.spi.ProviderImpl not found

Tags:

java

oracle

I'm trying to run a webservice client on jdk1.5 and gives me the following error:

javax.xml.ws.WebServiceException: Provider com.sun.xml.internal.ws.spi.ProviderImpl not found

Any suggestion will be appreciated.

like image 559
user2079954 Avatar asked Mar 03 '13 09:03

user2079954


2 Answers

Make sure that on your path you can find also the jar containing the class com.sun.xml.internal.ws.spi.ProviderImpl. I checked what jar might be needed and here you can see the jars containing the given class. Any of them might help you.

like image 176
Olimpiu POP Avatar answered Oct 08 '22 18:10

Olimpiu POP


I don't know exact reason why it can not find the right class but I think it is some problem with (or feature of) Java class loader in Oracle database when it looks for resources.

I loaded JAX-WS reference implementation from java.net with all its dependencies with the SYS user (with the public access permissions and public synonyms). But the classes generated from service WSDL I loaded to user SCOTT schema. And for some reason when SCOTT runs procedures that uses service, javax.xml.ws.spi.FactoryFinder does look up for implementation name in META-INF/services/javax.xml.ws.spi.Provider resource (which have correct value com.sun.xml.ws.spi.ProviderImpl) but can not find this resource so tries to load provider from hard-coded class name (com.sun.xml.internal.ws.spi.ProviderImpl) and fails.

Solution for me was to load all META-INF/services/* files from all the JAX-WS RI and dependencies jar's to SCOTT schema. Alternative way could be to load all JAX-WS RI, dependencies and final program to the same schema.

like image 35
devegied Avatar answered Oct 08 '22 19:10

devegied