tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shultz, Dmitry" <>
Subject RE: How to disable default TomEE JMS and JDBC resources creation?
Date Thu, 21 Feb 2019 19:29:48 GMT
Hi Jonathan,

I had to put SINGLETON and MANAGED containers definition when I disabled the default containers
creation using the openejb.offline=true, but this gave me the clear error about some JMS connection
factory that should not be there (instead of trying to create a matching default one). Apparently
I forgot to remove the injection of old jms connection factory resource in one of my beans
while migrating the service from Sonic to Artemis JMS. Once I removed it and cleaned up the
tomee.xml everything went to normal :)  

Thanks a lot for your help!


-----Original Message-----
From: Jonathan Gallimore [] 
Sent: Thursday, February 21, 2019 3:22 AM
Subject: Re: How to disable default TomEE JMS and JDBC resources creation?


You can try the -Dopenejb.offline=true setting. This will stop any resources (and containers)
being created automatically. The downside is that anything you are using, you'll need to explicitly
declare in your tomee.xml - so EJB bean containers, for example. I just added this setting
to an app here to get the following message:

21-Feb-2019 11:14:26.512 SEVERE [main]
org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal Unable to deploy collapsed ear
in war StandardEngine[Catalina].StandardHost[localhost].StandardContext[]
 org.apache.openejb.OpenEJBException: A container of type SINGLETON must be declared in the
configuration file for bean: XXXXXXXXXX at
at org.apache.openejb.config.AutoConfig.deploy(
at org.apache.openejb.config.AutoConfig.deploy(

Which is correct, I'm using Singleton EJB beans and I'd need to define a container for them.

The error that you're seeing, sounds like something is triggering TomEE to try and start ActiveMQ,
and that is failing, presumably because you're running the Webprofile flavour. This could
happen if you have MDBs, or references to Topics/Queues in your app that you are intending
to point to something else that isn't ActiveMQ. If you post your log, I'd be happy to take
a look and advise whether there is something you could tweak to avoid the error, without going
to the extreme of setting openejb.offline=true. Or if its a bug in the server, I'm happy to
help fix it.



On Thu, Feb 21, 2019 at 3:41 AM Shultz, Dmitry <>

> Hi All,
> My tomee.xml is deliberately empty, but in the log at start up TomEE 
> is configuring Default Unmanaged JDBC and Default JMS (which I don't 
> really need).
> The deployment is failing with this:
> java.lang.NoClassDefFoundError:
> org/apache/activemq/ra/ActiveMQResourceAdapter
> How to disable these default resources creation?
> Cheers,
> Dmitry
View raw message