Since the log4j jar is in your web module. Have you tried to add hidden-classes in your WAR/WEB-INF/geronimo-web.xml ?
Greythorn wrote: > > Scenario: I deploy two ear files. The first application I can access > successfully, the application's logging working fine (to console and log > file). > > 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 works. > > 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 > exception: > > java.lang.ArrayIndexOutOfBoundsException: 0 > at > org.apache.geronimo.console.logmanager.LogViewerPortlet.doView(LogViewerPortlet.java:107) > at javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:247) > at javax.portlet.GenericPortlet.render(GenericPortlet.java:175) > at org.apache.geronimo.console.BasePortlet.render(BasePortlet.java:125) > at > org.apache.pluto.core.PortletServlet.dispatch(PortletServlet.java:208) > at org.apache.pluto.core.PortletServlet.doGet(PortletServlet.java:139) > > 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 > what? > > Any ideas? > ----- -Shawn -- View this message in context: http://www.nabble.com/ClassCastException-with-Log4J-when-Running-Multiple-Ears-tp24304125s134p24307572.html Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.
