Francesco created AMQ-7215:
------------------------------
Summary: javax/xml/bind/JAXBException with camel.xml and java11
Key: AMQ-7215
URL: https://issues.apache.org/jira/browse/AMQ-7215
Project: ActiveMQ
Issue Type: Bug
Components: activemq-camel
Affects Versions: 5.15.9
Environment: {noformat}
$ java -version
java version "11.0.2" 2019-01-15 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.2+9-LTS)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.2+9-LTS, mixed
mode){noformat}
{code:java}
$ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 9 (stretch)"
NAME="Debian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"{code}
Reporter: Francesco
The following camel.xml used to load on apache-activemq-5.15.8:
{code:java}
<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>
{code}
On apache-activemq-5.15.9, it fails with:
{noformat}
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{noformat}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)