users@jax-ws.java.net

problem integrating jax-ws into spring application

From: Sascha Smutny <sascha.smutny_at_gmail.com>
Date: Fri, 22 Aug 2014 12:43:23 +0200

Hello,

maybe anyone can help me out with my problem. I'm trying to integrate some
JAX-WS services into my spring based web application.

First of all my environment:
- Tomcat 6 running on Java 6 with endorsed Jaxb and Jax-WS 2.2 libs
- Spring 4 application implementing a JAX-WS service and using 4 Jax-WS
clients
- JAX-WS Spring 1.9 from metro for integrating JAX-WS into spring

My own soap service using JAX-WS works fine, also 3 out of 4 soap client
services working without problems. Only on service throws an exception
during tomcat startup.

nested exception is java.lang.LinkageError: loader constraint violation:
loader (instance of
com/sun/xml/ws/client/WSServiceDelegate$DelegatingLoader) previously
initiated loading for a different type with name "com/myclasses/example"

This happens while trying to get the service port from the generated jax-ws
service class, the only difference between this client service and the
other ones is, that this service has more than one port. But I think this
isn't the problem at all. Using this client service in a standalone project
without tomcat works fine, I can get all the ports from the service I want.

So any ideas what the problem might be? It seems he is using another
classloader for the example class file, but why?

Greetings,

Sascha