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

2

6

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)
Geelong answered 31/7, 2012 at 16:7 Comment(0)
S
3

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.

Shuman answered 27/2, 2013 at 8:56 Comment(1)
Yes, replacing wlfullclient with wlthint3client.jar would fix this issueGeelong
H
1

Did you have any luck with this? I am running into exactly the same issue running on JetSpeed 2.2.2 (portal server based on tomcat). Before I include wlfullclient.jar in the server's lib folder my web service works fine. After inclusion it blows up on instantiation with exactly the stack trace you include above.

My thinking (theoretical at this stage) is as follows:

wlfullclient.jar has a class that has the same name and package as a class already in Metro web services stack. This class is getting loaded ahead of the Metro class and then directing classloading down a pathway of loading web logic implementations instead of metro implementations. The web logic implementations do not exist (it's not like we have gone to the effort to include them as we want to use standard java) and this explains the NoClassDefFound.

It is worth noting I have not found this supposed class with the same name and package in both Metro and wlfullclient.jar. In this sense the class is akin to the Higgs boson at at the moment. Then presuming it exists, what to do about it?

I'd be keen to know if you have found a solution.

Also I should add:

I need to include wlfullclient.jar as it is used by other portlets running on the same server. I cannot remove it but am not using it myself.

Holmann answered 19/11, 2012 at 21:31 Comment(1)
Likewise to you :) No solution as yet. I have been working on other projects but will certainly resume trying to solve this issue when I am back in that space.Holmann

© 2022 - 2024 — McMap. All rights reserved.