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

I have a separate batch program that runs on jdk1.6.0_31. This standalone program has a JAX-WS client and an EJB client. The JAX-WS client worked fine without adding any jars until I add wlfullclient.jar to the EJB client. Now with wlfullclient.jar in the classpath, I get the following exception. Please let me know how to solve 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) 
+6
source share
2 answers

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

I was looking for alternative Customers.

Basically there are three customer banks:

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

The final option is a smoothed version of the client that supports the t3 proprietary protocol for Weblogics. This has some flaw in terms of functionality, but if all you have to do is talk to ejb on the server: it's all there.

After switching the wlfullclient.jar form to wlthint3client.jar, all NoClassDefFoundError disappeared.

Here is a link to Weblogic Documentation .

+2
source

Are you lucky with this? I encountered the same problem as on JetSpeed ​​2.2.2 (tomcat-based portal server). Before including wlfullclient.jar in the server lib folder, my web service is working fine. Once enabled, it will explode to create an instance with the stack trace specified above.

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

wlfullclient.jar has a class that has the same name and package as the class already in the Metro web services stack. This class is loaded in front of the Metro class, and then directs the loading of classes down the path of loading web logic implementations instead of metro implementations. There is no web logic implementation (this is not the way we went to enable them, since we want to use standard java), and this explains NoClassDefFound.

It is worth noting that I did not find this proposed class with the same name and package in both Metro and wlfullclient.jar. In this sense, the class is currently akin to the Higgs boson. Assuming it exists, what to do about it?

I would like to know if you have found a solution.

Also I have to add:

I need to enable wlfullclient.jar as it is used by other portlets running on the same server. I cannot delete it, but I do not use it myself.

+1
source

Source: https://habr.com/ru/post/921777/


All Articles