You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Xilai Dai (Jira)" <ji...@apache.org> on 2019/10/08 10:52:00 UTC

[jira] [Created] (AMQ-7315) Upgrade the dependency from org.apache.servicemix.bundles.xstream to org.apache.servicemix.bundles.xstream-java8

Xilai Dai created AMQ-7315:
------------------------------

             Summary: Upgrade the dependency from org.apache.servicemix.bundles.xstream to org.apache.servicemix.bundles.xstream-java8
                 Key: AMQ-7315
                 URL: https://issues.apache.org/jira/browse/AMQ-7315
             Project: ActiveMQ
          Issue Type: Improvement
          Components: OSGi/Karaf
    Affects Versions: 5.15.9
         Environment: Java 8, Java 11
            Reporter: Xilai Dai


The old xstream (java 7) bundle is used in the "activemq" feature definition. here https://github.com/apache/activemq/blob/master/activemq-karaf/src/main/resources/features-core.xml#L64

It may has to be upgraded to 
{code}
<bundle dependency="true">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.xstream-java8/${xstream-bundle-version}</bundle>
{code}

Otherwize there is a problem when install both "activemq-broker" feature and other 3rd-party feature which ask for xstream-java8 bundle (e.g. camel-xstream) onto OSGI karaf container.
{code}
Caused by: com.thoughtworks.xstream.InitializationException: Could not instantiate mapper : com.thoughtworks.xstream.mapper.LambdaMapper
at com.thoughtworks.xstream.XStream.buildMapperDynamically(XStream.java:645) ~[?:?]
{code}

{code}
330 | Active   |  50 | 1.4.10.1                | Apache ServiceMix :: Bundles :: xstream
337 | Active   |  80 | 1.4.10.1                | Apache ServiceMix :: Bundles :: xstream
{code}

Both xstream (java7) bundle and xstream-java8 bundle will be installed on karaf OSGi container.

We may upgrade to xstream-java8 bundle to avoid this potential co-existing/classloading problem in case of OSGi env, if no special reason stay with the xstream(java 7) bundle.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)