geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greythorn <>
Subject ClassCastException with Log4J when Running Multiple Ears
Date Thu, 02 Jul 2009 09:58:44 GMT

Scenario: I deploy two ear files. The first application I can access
successfully, the application's logging working fine (to console and log

When I access the second application I get a class cast exception on the
very first call to Log4J's Logger.getLogger().  The first application still

If I restart Geronimo and access the applications in the REVERSE order, I
get the same error, i.e. the first application I hit works (and continues to
work) but the second fails.

Also, the Server Log Viewer now gives an ArrayIndexOutOfBoundsException

java.lang.ArrayIndexOutOfBoundsException: 0
	at javax.portlet.GenericPortlet.doDispatch(
	at javax.portlet.GenericPortlet.render(
	at org.apache.geronimo.console.BasePortlet.render(
	at org.apache.pluto.core.PortletServlet.dispatch(
	at org.apache.pluto.core.PortletServlet.doGet(

Both ears contain a single web module each using its own log4j.jar (same
version as Geronimo).  

I have tried using the hidden-classes tag in geronimo-application.xml for
the org.apache.log4j packages.  Same error.

I have added the inverse-classloading tag to the geronimo-application.xml.  
Same error.

I have tried removing the log4j jars from the applications to force them to
use Geronimo's log4j jar.  Same error.

Have deployed via the console.  Same error.

I'm obviously missing something (hopefully something straight forward) but

Any ideas?
View this message in context:
Sent from the Apache Geronimo - Users mailing list archive at

View raw message