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

javax/xml/bind/JAXBException with camel.xml and java11

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Not A Problem
    • 5.15.9
    • None
    • Camel
    • None

    Description

      The following camel.xml used to load on apache-activemq-5.15.8:

       

      <beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:lang="http://www.springframework.org/schema/lang"
       xmlns="http://www.springframework.org/schema/p"
       xsi:schemaLocation="
       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
       http://www.springframework.org/schema/lang
       http://www.springframework.org/schema/lang/spring-lang-2.5.xsd
       http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
      <!-- Allows us to use system properties as variables in this configuration file -->
       <bean id="configurationEncryptor" class="org.jasypt.encryption.pbe.StandardPBEStringEncryptor">
       <property name="algorithm" value="PBEWithMD5AndDES"/>
       <property name="password" value="a_password"/>
       </bean>
      <bean id="propertyConfigurer" class="org.jasypt.spring31.properties.EncryptablePropertyPlaceholderConfigurer">
       <constructor-arg ref="configurationEncryptor" />
       <property name="location" value="file:${activemq.base}/conf/credentials-enc.properties"/>
       </bean>
      <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
      <route id="test">
       <from uri="hub:ping" />
       <to uri="hub:pong" />
       </route>
      </camelContext>
      <!--
       Lets configure some Camel endpoints
      http://camel.apache.org/components.html
       -->
      <!-- configure the camel activemq component to use the current broker -->
       <bean id="hub" class="org.apache.activemq.camel.component.ActiveMQComponent" >
       <property name="connectionFactory">
       <bean class="org.apache.activemq.ActiveMQConnectionFactory">
       <property name="brokerURL" value="vm://hub?create=false&waitForStart=10000" />
       <property name="userName" value="${activemq.username}"/>
       <property name="password" value="${activemq.password}"/>
       </bean>
       </property>
       </bean>
      <bean id="seta" class="org.apache.activemq.camel.component.ActiveMQComponent" >
       <property name="connectionFactory">
       <bean class="org.apache.activemq.ActiveMQConnectionFactory">
       <property name="brokerURL" value="failover://(ssl://seta.example.org:61617)" />
       <property name="userName" value="${seta.username}"/>
       <property name="password" value="${seta.password}"/>
       </bean>
       </property>
       </bean>
       </beans>
       
      

      On apache-activemq-5.15.9, it fails with:

      2019-05-22 13:33:33,213 | INFO | Refreshing org.apache.activemq.xbean.XBeanBrokerFactory$1@957e06: startup date [Wed May 22 13:33:33 CEST 2019]; root of context hierarchy | org.apache.activemq.xbean.XBeanBrokerFactory$1 | main
      2019-05-22 13:33:34,550 | ERROR | Failed to load: class path resource [activemq.xml], reason: Unexpected exception parsing XML document from class path resource [camel.xml]; nested exception is org.springframework.beans.FatalBeanException: Invalid NamespaceHandler class [org.apache.camel.spring.handler.CamelNamespaceHandler] for namespace http://camel.apache.org/schema/spring: problem with handler class file or dependent class; nested exception is java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException | org.apache.activemq.xbean.XBeanBrokerFactory | main
       org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from class path resource [camel.xml]; nested exception is org.springframework.beans.FatalBeanException: Invalid NamespaceHandler class [org.apache.camel.spring.handler.CamelNamespaceHandler] for namespace http://camel.apache.org/schema/spring: problem with handler class file or dependent class; nested exception is java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException

      Attachments

        Activity

          People

            Unassigned Unassigned
            francescm Francesco
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: