Monthly Archives: November 2012

Why my TomEE/Tomcat doesn’t start because of listener?


Sometimes Tomcat (or TomEE) doesn’t start saying something like:

SEVERE: Skipped installing application listeners due to previous error(s)
Nov 26, 2012 9:22:46 AM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart
Nov 26, 2012 9:22:46 AM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/demo] startup failed due to previous errors

So great our code doesn’t work…but we don’t know why. Since that’s often while the class is instantiated that’s hard to debug your own code.

Continue reading

JPA entities scanning in TomEE


JPA offers the ability to discover entities scanning the application classes instead of asking you to define all entities in the persistence unit. It is the effect of ‘exclude-unlisted-classes’ parameter.

For a simple application with a single persistence unit it is pretty nice but it means the container will scan your app for CDI, JSF, EJB…stuffs (in TomEE we already unified those parts – one of the reason why you shouldn’t use a plain old Tomcat if you use more than one of these technologies) then re-scan it for JPA (it is delegated to the JPA provider).

For big apps it can be a little pain to write/work on integration tests and moreover it uses more memory (scanning is not shared).

Continue reading

OpenEJB Application Composer, new features: JAXRS, JAXWS, @Classes…


Go further in standalone webapp testing

It always has been possible to use OpenEJB to test small part of webapps in embedded mode but it needed to perfectly know all internals…mainly means nobody was doing it excepting for some particular advanced tests in OpenEJB itself.

But these days REST, JAXWS etc testing in standalone can be very interesting when working on an issue or simply to get very fast test executions.

Continue reading

Avoid properties conflict when configuring TomEE DataSource


TomEE now supports to switch the connection pooling implementation (commons-dbcp, tomcat-jdbc, bonecp…). However it tries to convert dbcp properties to the other implementation if these properties are found (mainly for compatibility reasons).

In some cases it can be hard.

Here some small tips to make it easier :).

Continue reading

[TomEE] Don’t deploy openejb internal app when you don’t need it


When TomEE starts it starts an internal application (called openejb). The goal is to offer some internal beans mainly used by TomEE tooling (TomEE deployer, reload feature of TomEE maven plugin…).

But depending on your environment (typically with WTP) it can be useless and just make you loose some startup time.

To avoid this application to be deployed just add the following system property:

openejb.system.apps = false