Hi,

This error is not from cxf, it's from Sun's jaxws RI(reference implementation), you introduce Sun's jaxws RI with your upgrade.

The fix is just remove that jar(as you already did), or ensure that cxf-rt-frontend-jaxws.jar is also in the classpath but before Sun's jaxws RI jar.

Freeman

On 2011-3-30, at 上午12:39, Jimi wrote:

Hi,

We have a webservice client generated using wsdl2java and Maven
(cxf-codegen-plugin). This client code is used inside a 3:rd party CMS, and that has been working fine. However, today we upgraded the CMS on one of our test servers, and after that the webservice client doesn't work any more. The error is "interface com.sun.xml.ws.developer.WSBindingProvider is not visible from class loader". The stacktrace from the log file is available at
the bottom of this email.

Some simple googling didn't help much, so I then looked up the class
WSServiceDelegate from the stacktrace, and using jarfinder.com I found out that it is part of jaxws-rt (jaxws-rt-2.1.3.jar, jaxws-rt-2.1.4.jar and
similar). And the upgrade of the CMS had introduced the file
jaxws-rt-2.1.7.jar (no jaxws-rt jar file existed before). So I tried simply renaming that file to jaxws-rt-2.1.7.jar_ and restarted the CMS, and voila,
the error went away and the websevice client now works like a charm.

But now I would really like to understand why. And what my options are if removing the jar file is not an option. I will email the CMS company and ask them about it, because the update was just a minor update with no mentioning of anything webservice related in the release notes, and there seems to be alot of new files and even duplicate files (of different versions) and even
some new jar files that contained integration test code, so maybe they
simply goofed up the release.

But if the inclusion of jaxws-rt-2.1.7.jar is intentional, then I would really like to know how to make my generated webservice client handle this.
Any suggestions?

Regards

/Jimi


Stacktrace:
---------------------------------
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown
Source)
        at java.lang.reflect.Constructor.newInstance(Unknown Source)
        at
se.somecompany.webservice- test .osb .DocumentManagerClientFactory .createWebService(DocumentManagerClientFactory.java:42)
        at
se.somecompany.webservice- test .osb .DocumentManagerClientFactory .createWebService(DocumentManagerClientFactory.java:11)
        at
se.somecompany.webservice- test.providers.WebServiceProvider.doJob(WebServiceProvider.java:82)
        at
se.somecompany.webservice- test.providers.WebServiceProvider.doJob(WebServiceProvider.java:15)
        at
se.somecompany.webservice- test .misc.scheduling.SimpleJobRunner.runIfSuitable(SimpleJobRunner.java: 43)
        at
se.somecompany.webservice- test .misc .scheduling .SimpleRecurringJobRunner.run(SimpleRecurringJobRunner.java:157)
        at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IllegalArgumentException: interface
com.sun.xml.ws.developer.WSBindingProvider is not visible from class loader
        at java.lang.reflect.Proxy.getProxyClass(Unknown Source)
        at java.lang.reflect.Proxy.newProxyInstance(Unknown Source)
        at
com .sun .xml .ws .client .WSServiceDelegate.createEndpointIFBaseProxy(WSServiceDelegate.java: 641)
        at
com .sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java: 342)
        at
com .sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java: 324)
        at
com .sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java: 306)
        at javax.xml.ws.Service.getPort(Unknown Source)
        at
se.somecompany.webservice- test .osb .internal_generated .InternalDocumentManagerService .getInternalDocumentManagerServicePort (InternalDocumentManagerService.java:63)
        at
se.somecompany.webservice- test .osb .InternalDocumentManagerClient .generateInternalExternalDocumentManagerProxy (InternalDocumentManagerClient.java:36)
        at
se.somecompany.webservice-test.osb.InternalDocumentManagerClient. (InternalDocumentManagerClient.java:41)
        ... 11 more
---------------------------------
        
        

--
View this message in context: 
http://cxf.547215.n5.nabble.com/Generated-client-gets-error-WSBindingProvider-is-not-visible-from-class-loader-when-jaxws-rt-jar-is-t-tp4269669p4269669.html
Sent from the cxf-user mailing list archive at Nabble.com.


--
Freeman Fang

------------------------

FuseSource: http://fusesource.com
blog: http://freemanfang.blogspot.com
twitter: http://twitter.com/freemanfang
Apache Servicemix:http://servicemix.apache.org
Apache Cxf: http://cxf.apache.org
Apache Karaf: http://karaf.apache.org
Apache Felix: http://felix.apache.org

Reply via email to