[2.2] LinkageError: WebAppClassLoader vs. ResourceStoreClassLoader

View: New views
2 Messages — Rating Filter:   Alert me  

[2.2] LinkageError: WebAppClassLoader vs. ResourceStoreClassLoader

by Andreas Hartmann :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi everyone,

when using the RCL classloader I just can't get rid of this error:

java.lang.LinkageError: loader constraint violation in interface itable
initialization: when resolving method
"mypackage.BatchProcessManagerImpl.prepareListenerProcess(Ljava/lang/String;Lmypackage.Invoker;)Lmypackage.ListenerBatchProcess;"
the class loader (instance of
org/apache/commons/jci/stores/ResourceStoreClassLoader) of the current
class, mypackage/BatchProcessManagerImpl, and the class loader (instance
of org/mortbay/jetty/webapp/WebAppClassLoader) for interface
mypackage/BatchProcessManager have different Class objects for the type
mypackage/Invoker used in the signature


It occurs immediately for the first request after starting up Jetty.
What could be the reason that the interface is loaded by the
WebAppClassLoader and the implementation by the
ResourceStoreClassLoader? Problably a Spring thing …

Any hints would be very welcome!

Thanks a lot in advance,

-- Andreas



--
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: [2.2] LinkageError: WebAppClassLoader vs. ResourceStoreClassLoader

by Andreas Hartmann :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Andreas Hartmann schrieb:

> Hi everyone,
>
> when using the RCL classloader I just can't get rid of this error:
>
> java.lang.LinkageError: loader constraint violation in interface itable
> initialization: when resolving method
> "mypackage.BatchProcessManagerImpl.prepareListenerProcess(Ljava/lang/String;Lmypackage.Invoker;)Lmypackage.ListenerBatchProcess;"
> the class loader (instance of
> org/apache/commons/jci/stores/ResourceStoreClassLoader) of the current
> class, mypackage/BatchProcessManagerImpl, and the class loader (instance
> of org/mortbay/jetty/webapp/WebAppClassLoader) for interface
> mypackage/BatchProcessManager have different Class objects for the type
> mypackage/Invoker used in the signature
>
>
> It occurs immediately for the first request after starting up Jetty.
> What could be the reason that the interface is loaded by the
> WebAppClassLoader and the implementation by the
> ResourceStoreClassLoader? Problably a Spring thing …


I just noticed that I had a similar issue before, but back then the
interface and implementation were located in different blocks where one
was loaded by the RCL and the other one by the WebAppClassLoader. This
time both interface and class are located in the same block which should
be loaded by the RCL:

mypackage.batch.service%classes-dir=../batch/target/classes

Any suggestions are greatly appreciated.

-- Andreas



--
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...