Uploaded image for project: 'ActiveMQ'
  1. ActiveMQ
  2. AMQ-7315

Upgrade the dependency from org.apache.servicemix.bundles.xstream to org.apache.servicemix.bundles.xstream-java8

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Not A Problem
    • 5.15.9
    • None
    • OSGi/Karaf
    • None
    • Java 8, Java 11

    Description

      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

      <bundle dependency="true">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.xstream-java8/${xstream-bundle-version}</bundle>
      

      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.

      Caused by: com.thoughtworks.xstream.InitializationException: Could not instantiate mapper : com.thoughtworks.xstream.mapper.LambdaMapper
      at com.thoughtworks.xstream.XStream.buildMapperDynamically(XStream.java:645) ~[?:?]
      
      330 | Active   |  50 | 1.4.10.1                | Apache ServiceMix :: Bundles :: xstream
      337 | Active   |  80 | 1.4.10.1                | Apache ServiceMix :: Bundles :: xstream
      

      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.

      Attachments

        Issue Links

          Activity

            People

              jbonofre Jean-Baptiste Onofré
              xldai Xilai Dai
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: