geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Łukasz Budnik" <>
Subject class loading: LinkageError: loader constraint violation
Date Mon, 15 Dec 2008 19:12:12 GMT
Hi all,

I'm exposing some methods of my SLSB as WebServices (@WebService,
@WebMethod) etc.

All works.

Recently I have added new functionality. I'm invoking external web
services using Axis2: org.apache.axis2.client.ServiceClient.

I added this dependency:


During deployment of my application (and of course @WebService SLSB)
there is an error.

     [exec]     Error: Operation failed: start of
     [exec]     org.xh.nuntius/EnterpriseContainer/0.2-dev/car failed
     [exec]             Unknown start exception
     [exec]             Configuration
org.xh.nuntius/EnterpriseContainer/0.2-dev/car failed
     [exec]     to start due to the following reasons:
     [exec]       The service
     [exec]     did not start because
     [exec]     org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver cannot be
     [exec]     cast to org.apache.axis2.engine.MessageReceiver

Not good...


If I remove axis2-kernel dependency, application is deployed - which is weird.

But when execution gets to:

serviceClient.sendReceiveNonBlocking(OMXMLUtils.parseString(payload), callback);

I get:

LinkageError: loader constraint violation: when resolving method
the class loader (instance of
org/apache/geronimo/kernel/classloader/JarFileClassLoader) of the
current class, org/xh/nuntius/enterprise/broker/client/AsynchronousAxis2ServiceClient,
and the class loader (instance of
org/apache/geronimo/kernel/classloader/JarFileClassLoader) for
resolved class, org/apache/axis2/client/ServiceClient, have different
Class objects for the type org/apache/axiom/om/OMElement used in the

I'm 100% confused.

ServiceClient is defined in axis2-kernel. I cannot defined it
explicitly because my @WebService will not be created.

When I skip this dependency Geronimo somehow is adding it when doing
@WebService stuff and there will be 2 different classes for

Any ideas? Or maybe I should post this to Geronimo dev?

best regards
View raw message