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

RuntimeConfigurationPlugin doesn't work with JDK11+

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 5.16.0
    • 5.16.1, 5.17.0
    • Broker, Plugin
    • None

    Description

      If the broker configuration contains runtimeConfigurationPlugin like this:

      <broker ...>
       ...
               <plugins>
                <runtimeConfigurationPlugin checkPeriod="1000"/>
              </plugins>
        ...
      </broker>

      the broker doesn't start due to:

      Caused by: java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException
              at org.apache.activemq.plugin.RuntimeConfigurationPlugin.installPlugin(RuntimeConfigurationPlugin.java:38)
              at org.apache.activemq.broker.BrokerService.addInterceptors(BrokerService.java:2505)
              at org.apache.activemq.broker.BrokerService.createBroker(BrokerService.java:2365)
              at org.apache.activemq.broker.BrokerService.getBroker(BrokerService.java:1053)
              at org.apache.activemq.broker.BrokerService.getAdminConnectionContext(BrokerService.java:2636)
              at org.apache.activemq.broker.BrokerService.startVirtualConsumerDestinations(BrokerService.java:2797)
              at org.apache.activemq.broker.BrokerService.startDestinations(BrokerService.java:2627)
              at org.apache.activemq.broker.BrokerService.doStartBroker(BrokerService.java:747)
              at org.apache.activemq.broker.BrokerService.startBroker(BrokerService.java:741)
              at org.apache.activemq.broker.BrokerService.start(BrokerService.java:644)
              at org.apache.activemq.xbean.XBeanBrokerService.afterPropertiesSet(XBeanBrokerService.java:73)
              at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
              at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.base/java.lang.reflect.Method.invoke(Method.java:566)
              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1748)
              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1685)
              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1615)
              ... 27 more
      Caused by: java.lang.ClassNotFoundException: javax.xml.bind.JAXBException
              at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:471)
              at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
              at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
              ... 45 more 

      The problem is in the JAXB version in use. A simple workaround is to add JAXB (API and Core) in activemq/lib (I'm testing the fix).

      So, it could be just a question of documentation to add JAXB jar in ActiveMQ in order to use runtimeConfigurationPlugin.

      Attachments

        Activity

          People

            jbonofre Jean-Baptiste Onofré
            jbonofre Jean-Baptiste Onofré
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 0.5h
                0.5h