You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by "Jeff Genender (JIRA)" <de...@geronimo.apache.org> on 2005/09/29 19:27:51 UTC

[jira] Commented: (GERONIMO-518) Deploying Struts app fails on Logging ClassCastException

    [ http://issues.apache.org/jira/browse/GERONIMO-518?page=comments#action_12330837 ] 

Jeff Genender commented on GERONIMO-518:
----------------------------------------

I think this is only a quick fix to a bigger issue.  The excluded packages need declaration in the plan.  I do not feel comfortable harcoding packages in the class loaders other than those required by spec.  Lets update the xsd and the web builder to get these from the plan.

Also the patch has a bug...you included:

name.startsWith("org.apache.commons.logging.") 

where it should be

name.startsWith("org/apache/commons/logging/")



> Deploying Struts app fails on Logging ClassCastException
> --------------------------------------------------------
>
>          Key: GERONIMO-518
>          URL: http://issues.apache.org/jira/browse/GERONIMO-518
>      Project: Geronimo
>         Type: Bug
>   Components: core, web
>     Reporter: Aaron Mulder
>     Assignee: Aaron Mulder
>     Priority: Critical
>      Fix For: 1.0-M5
>  Attachments: excludeCommonsLogging.patch, my-mailreader.war
>
> Deploying a web app based on Struts results in the ClassCastException in commons logging displayed below.  The web app includes a version of commons-logging in its WEB-INF/lib.  The same web app can be successfully deployed in Tomcat 5.0.25 with no problems.
> Exception in thread "Thread-4" java.lang.ExceptionInInitializerError
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>         at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
>         at java.lang.Class.newInstance0(Class.java:350)
>         at java.lang.Class.newInstance(Class.java:303)
>         at org.mortbay.jetty.servlet.Holder.newInstance(Holder.java:199)
>         at org.mortbay.jetty.servlet.ServletHolder.start(ServletHolder.java:240)
>         at org.mortbay.jetty.servlet.ServletHandler.initializeServlets(ServletHandler.java:447)
>         at org.mortbay.jetty.servlet.WebApplicationHandler.initializeServlets(WebApplicationHandler.java:298)
>         at org.mortbay.jetty.servlet.WebApplicationContext.doStart(WebApplicationContext.java:512)
>         at org.apache.geronimo.jetty.JettyWebAppContext.doStart(JettyWebAppContext.java:244)
> ...
> Caused by: org.apache.commons.logging.LogConfigurationException: java.lang.ClassCastException: org.apache.geronimo.kernel.log.GeronimoLogFactory
>         at org.apache.commons.logging.LogFactory$2.run(LogFactory.java:609)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at org.apache.commons.logging.LogFactory.newFactory(LogFactory.java:561)
>         at org.apache.commons.logging.LogFactory.getFactory(LogFactory.java:298)
>         at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:395)
>         at org.apache.struts.action.ActionServlet.<clinit>(ActionServlet.java:375)
>         ... 67 more
> Caused by: java.lang.ClassCastException: org.apache.geronimo.kernel.log.GeronimoLogFactory
>         at org.apache.commons.logging.LogFactory$2.run(LogFactory.java:571)
>         ... 72 more

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira