Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JAX-WS Dispatch client was working fine until wlfullclient.jar was added

I have a standalone batch program which runs on jdk1.6.0_31. This standalone program has JAX-WS client and EJB client. JAX-WS client was working fine without adding any jars until I added wlfullclient.jar for EJB client. Now with wlfullclient.jar in classpath I am getting the below exception. Please let me know how to resolve this. Appreciate your help.

Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/xml/ws /spi/ProviderImpl
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at javax.xml.ws.spi.FactoryFinder.safeLoadClass(FactoryFinder.java:150)
at javax.xml.ws.spi.FactoryFinder.newInstance(FactoryFinder.java:30)
at javax.xml.ws.spi.FactoryFinder.find(FactoryFinder.java:90)
at javax.xml.ws.spi.Provider.provider(Provider.java:83)
at javax.xml.ws.Service.<init>(Service.java:56)
at javax.xml.ws.Service.create(Service.java:691)
like image 472
Doss Avatar asked Jul 31 '12 16:07

Doss


1 Answers

We had the same problem, after researching and finding this question, I followed a hunch and looked into the documentation for the Weblogic Server.

I was looking for alternative Clients.

There are basically three client jars:

  • wlclient.jar - for IIOP clients
  • wlfullclient.jar - for everything in one jar (massive size ~50MB)
  • wlthint3client.jar - for a very thin t3 client

The last option is a slimmed down version of the client which has support for Weblogics proprietary t3 protocol. It has some drawback in terms of functionality, but if all you need to do is talk to an ejb on the server: it's all there.

After switching form wlfullclient.jar to wlthint3client.jar, all NoClassDefFoundError were gone.

Here a link to the Weblogic Documentation.

like image 160
dertoni Avatar answered Oct 13 '22 20:10

dertoni