Jens Kordowski created KARAF-6106:
-------------------------------------

             Summary: LinkageError due to javax.activation not in kernel anymore
                 Key: KARAF-6106
                 URL: https://issues.apache.org/jira/browse/KARAF-6106
             Project: Karaf
          Issue Type: Bug
          Components: karaf
    Affects Versions: 4.2.2
            Reporter: Jens Kordowski


With the update of Karaf from 4.2.1 to 4.2.2 I found the following error:

Caused by: java.lang.LinkageError: loader constraint violation: when resolving 
method 
"javax.xml.soap.SOAPMessage.createAttachmentPart(Ljavax/activation/DataHandler;)Ljavax/xml/soap/AttachmentPart;"
 the class loader "<unnamed>" (instance of 
[org.apache.felix.framework.BundleWiringImpl$BundleClassLoader@2febf41d|mailto:org.apache.felix.framework.BundleWiringImpl$BundleClassLoader@2febf41d],
 child of 
[java.net.URLClassLoader@3fee9989|mailto:java.net.URLClassLoader@3fee9989]) of 
the current class, com/sap/it/cxf/xi/XIUtils, and the class loader <bootstrap> 
for the method's defining class, javax/xml/soap/SOAPMessage, have different 
Class objects for the type javax/activation/DataHandler used in the signature

 

I think this came in with this change: 
https://issues.apache.org/jira/browse/KARAF-5989

 

Since the servicemix javax.activation bundle is not part of the framework 
bundle anymore, it has to load it from the jdk and it will not import it from 
the servicemix bundle (see change above).

Other bundles correctly importing javax.activation will get it from the 
servicemix bundle.

This can lead to the linkage error outlined above.

 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to