You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by ihunter <ih...@hotmail.com> on 2014/03/13 11:14:17 UTC

Problem with ActiveMQ in TomEE...

Hi Folks,

I'm porting a legacy app from TC6 to TomEE (PLUS, 1.6.0), and whenever I
enable a simple MDB, I get the exception below on startup.

>From my pom.xml, I include openejb-core which includes activemq 5.9.0, so
they are part of my war. I also notice that activemq 5.9.0 is in the lib
dir. of TomEE instllation.

I'm still obviously missing something, perhaps a bit of config? 

Any help appreciated
Thx
Ian Hunter

======================================
SEVERE: Failed to start ActiveMQ
java.lang.Exception: ActiveMQFactory.createBroker.InvocationTargetException
	at
org.apache.openejb.resource.activemq.ActiveMQFactory.createBroker(ActiveMQFactory.java:127)
	at
org.apache.openejb.resource.activemq.ActiveMQResourceAdapter.createInternalBroker(ActiveMQResourceAdapter.java:130)
	at
org.apache.openejb.resource.activemq.ActiveMQResourceAdapter.start(ActiveMQResourceAdapter.java:120)
	at
org.apache.openejb.assembler.classic.Assembler.createResource(Assembler.java:2172)
	at
org.apache.openejb.config.ConfigurationFactory.install(ConfigurationFactory.java:431)
	at
org.apache.openejb.config.AutoConfig.installResource(AutoConfig.java:2074)
	at org.apache.openejb.config.AutoConfig.getResourceId(AutoConfig.java:1926)
	at org.apache.openejb.config.AutoConfig.getResourceId(AutoConfig.java:1869)
	at
org.apache.openejb.config.AutoConfig.createContainer(AutoConfig.java:1109)
	at org.apache.openejb.config.AutoConfig.deploy(AutoConfig.java:844)
	at org.apache.openejb.config.AutoConfig.deploy(AutoConfig.java:193)
	at
org.apache.openejb.config.ConfigurationFactory$Chain.deploy(ConfigurationFactory.java:396)
	at
org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:938)
	at
org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1171)
	at
org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:1051)
	at
org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:127)
	at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
	at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
	at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5322)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
	at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:983)
	at
org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1660)
	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
	at java.util.concurrent.FutureTask.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at
org.apache.openejb.resource.activemq.ActiveMQFactory.createBroker(ActiveMQFactory.java:121)
	... 29 more
Caused by: java.io.IOException: Could not load broker
factory:java.lang.ClassCastException:
org.apache.activemq.broker.DefaultBrokerFactory cannot be cast to
org.apache.activemq.broker.BrokerFactoryHandler
	at
org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:27)
	at
org.apache.activemq.broker.BrokerFactory.createBrokerFactoryHandler(BrokerFactory.java:43)
	at
org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:70)
	at
org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:54)
	at
org.apache.openejb.resource.activemq.ActiveMQ5Factory.createBroker(ActiveMQ5Factory.java:62)
	... 34 more
Caused by: java.lang.ClassCastException:
org.apache.activemq.broker.DefaultBrokerFactory cannot be cast to
org.apache.activemq.broker.BrokerFactoryHandler
	at
org.apache.activemq.broker.BrokerFactory.createBrokerFactoryHandler(BrokerFactory.java:41)
	... 37 more





--
View this message in context: http://openejb.979440.n4.nabble.com/Problem-with-ActiveMQ-in-TomEE-tp4668181.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: Problem with ActiveMQ in TomEE...

Posted by Romain Manni-Bucau <rm...@gmail.com>.
either remove amq from your app or add in conf/system.properties
openejb.classloader.forced-skip=org.apache.activemq
Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linkedin.com/in/rmannibucau
Github: https://github.com/rmannibucau



2014-03-13 11:14 GMT+01:00 ihunter <ih...@hotmail.com>:
> Hi Folks,
>
> I'm porting a legacy app from TC6 to TomEE (PLUS, 1.6.0), and whenever I
> enable a simple MDB, I get the exception below on startup.
>
> From my pom.xml, I include openejb-core which includes activemq 5.9.0, so
> they are part of my war. I also notice that activemq 5.9.0 is in the lib
> dir. of TomEE instllation.
>
> I'm still obviously missing something, perhaps a bit of config?
>
> Any help appreciated
> Thx
> Ian Hunter
>
> ======================================
> SEVERE: Failed to start ActiveMQ
> java.lang.Exception: ActiveMQFactory.createBroker.InvocationTargetException
>         at
> org.apache.openejb.resource.activemq.ActiveMQFactory.createBroker(ActiveMQFactory.java:127)
>         at
> org.apache.openejb.resource.activemq.ActiveMQResourceAdapter.createInternalBroker(ActiveMQResourceAdapter.java:130)
>         at
> org.apache.openejb.resource.activemq.ActiveMQResourceAdapter.start(ActiveMQResourceAdapter.java:120)
>         at
> org.apache.openejb.assembler.classic.Assembler.createResource(Assembler.java:2172)
>         at
> org.apache.openejb.config.ConfigurationFactory.install(ConfigurationFactory.java:431)
>         at
> org.apache.openejb.config.AutoConfig.installResource(AutoConfig.java:2074)
>         at org.apache.openejb.config.AutoConfig.getResourceId(AutoConfig.java:1926)
>         at org.apache.openejb.config.AutoConfig.getResourceId(AutoConfig.java:1869)
>         at
> org.apache.openejb.config.AutoConfig.createContainer(AutoConfig.java:1109)
>         at org.apache.openejb.config.AutoConfig.deploy(AutoConfig.java:844)
>         at org.apache.openejb.config.AutoConfig.deploy(AutoConfig.java:193)
>         at
> org.apache.openejb.config.ConfigurationFactory$Chain.deploy(ConfigurationFactory.java:396)
>         at
> org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:938)
>         at
> org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1171)
>         at
> org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:1051)
>         at
> org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:127)
>         at
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
>         at
> org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
>         at
> org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5322)
>         at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
>         at
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
>         at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
>         at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
>         at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:983)
>         at
> org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1660)
>         at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
>         at java.util.concurrent.FutureTask.run(Unknown Source)
>         at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
>         at java.lang.Thread.run(Unknown Source)
> Caused by: java.lang.reflect.InvocationTargetException
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>         at java.lang.reflect.Method.invoke(Unknown Source)
>         at
> org.apache.openejb.resource.activemq.ActiveMQFactory.createBroker(ActiveMQFactory.java:121)
>         ... 29 more
> Caused by: java.io.IOException: Could not load broker
> factory:java.lang.ClassCastException:
> org.apache.activemq.broker.DefaultBrokerFactory cannot be cast to
> org.apache.activemq.broker.BrokerFactoryHandler
>         at
> org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:27)
>         at
> org.apache.activemq.broker.BrokerFactory.createBrokerFactoryHandler(BrokerFactory.java:43)
>         at
> org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:70)
>         at
> org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:54)
>         at
> org.apache.openejb.resource.activemq.ActiveMQ5Factory.createBroker(ActiveMQ5Factory.java:62)
>         ... 34 more
> Caused by: java.lang.ClassCastException:
> org.apache.activemq.broker.DefaultBrokerFactory cannot be cast to
> org.apache.activemq.broker.BrokerFactoryHandler
>         at
> org.apache.activemq.broker.BrokerFactory.createBrokerFactoryHandler(BrokerFactory.java:41)
>         ... 37 more
>
>
>
>
>
> --
> View this message in context: http://openejb.979440.n4.nabble.com/Problem-with-ActiveMQ-in-TomEE-tp4668181.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.