You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by "Thorsten Scherler (JIRA)" <ji...@apache.org> on 2007/10/01 17:20:50 UTC

[jira] Created: (FOR-1049) Forrest war is crashing Tomcat upon restart

Forrest war is crashing Tomcat upon restart
-------------------------------------------

                 Key: FOR-1049
                 URL: https://issues.apache.org/jira/browse/FOR-1049
             Project: Forrest
          Issue Type: Bug
          Components: Launch servlet WAR
            Reporter: Thorsten Scherler
            Priority: Critical


http://www.mail-archive.com/user@forrest.apache.org/msg00779.html
"I'm having some problems with the present svn head (two days old): the war it creates installes fine in Tomcat when deployed through Tomcat's HTML Manager, and as long as Tomcat is running without interruption, there's no problem. But when restarted, Tomcat crashes severely. This happens only when the Forrest war is installed, without the Forrest war, there is no problem.

Config:
- (almost) latest Forrest svn
- Tomcat 5.5.9
- Java 1.5_02
- Win2k server"

I am seeing the same issue on an ubuntu linux.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FOR-1049) Forrest war is crashing Tomcat upon restart

Posted by "Thorsten Scherler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FOR-1049?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12531532 ] 

Thorsten Scherler commented on FOR-1049:
----------------------------------------

http://www.opensubscriber.com/message/users@cocoon.apache.org/4379659.html -> tip from Antonio "The problem seems to be an older commons-logging-jar in your classpath" 


> Forrest war is crashing Tomcat upon restart
> -------------------------------------------
>
>                 Key: FOR-1049
>                 URL: https://issues.apache.org/jira/browse/FOR-1049
>             Project: Forrest
>          Issue Type: Bug
>          Components: Launch servlet WAR
>            Reporter: Thorsten Scherler
>            Priority: Critical
>
> http://www.mail-archive.com/user@forrest.apache.org/msg00779.html
> "I'm having some problems with the present svn head (two days old): the war it creates installes fine in Tomcat when deployed through Tomcat's HTML Manager, and as long as Tomcat is running without interruption, there's no problem. But when restarted, Tomcat crashes severely. This happens only when the Forrest war is installed, without the Forrest war, there is no problem.
> Config:
> - (almost) latest Forrest svn
> - Tomcat 5.5.9
> - Java 1.5_02
> - Win2k server"
> I am seeing the same issue on an ubuntu linux.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FOR-1049) Forrest war is crashing Tomcat upon restart

Posted by "Thorsten Scherler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FOR-1049?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12531531 ] 

Thorsten Scherler commented on FOR-1049:
----------------------------------------

http://servlets.com/archive/servlet/ReadMsg?msgId=484982&listName=tomcat-user

> Forrest war is crashing Tomcat upon restart
> -------------------------------------------
>
>                 Key: FOR-1049
>                 URL: https://issues.apache.org/jira/browse/FOR-1049
>             Project: Forrest
>          Issue Type: Bug
>          Components: Launch servlet WAR
>            Reporter: Thorsten Scherler
>            Priority: Critical
>
> http://www.mail-archive.com/user@forrest.apache.org/msg00779.html
> "I'm having some problems with the present svn head (two days old): the war it creates installes fine in Tomcat when deployed through Tomcat's HTML Manager, and as long as Tomcat is running without interruption, there's no problem. But when restarted, Tomcat crashes severely. This happens only when the Forrest war is installed, without the Forrest war, there is no problem.
> Config:
> - (almost) latest Forrest svn
> - Tomcat 5.5.9
> - Java 1.5_02
> - Win2k server"
> I am seeing the same issue on an ubuntu linux.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FOR-1049) Forrest war is crashing Tomcat upon restart

Posted by "Thorsten Scherler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FOR-1049?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12531533 ] 

Thorsten Scherler commented on FOR-1049:
----------------------------------------

http://osdir.com/ml/text.xml.forrest.user/2006-02/msg00100.html 
More related threads.

> Forrest war is crashing Tomcat upon restart
> -------------------------------------------
>
>                 Key: FOR-1049
>                 URL: https://issues.apache.org/jira/browse/FOR-1049
>             Project: Forrest
>          Issue Type: Bug
>          Components: Launch servlet WAR
>            Reporter: Thorsten Scherler
>            Priority: Critical
>
> http://www.mail-archive.com/user@forrest.apache.org/msg00779.html
> "I'm having some problems with the present svn head (two days old): the war it creates installes fine in Tomcat when deployed through Tomcat's HTML Manager, and as long as Tomcat is running without interruption, there's no problem. But when restarted, Tomcat crashes severely. This happens only when the Forrest war is installed, without the Forrest war, there is no problem.
> Config:
> - (almost) latest Forrest svn
> - Tomcat 5.5.9
> - Java 1.5_02
> - Win2k server"
> I am seeing the same issue on an ubuntu linux.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FOR-1049) Forrest war is crashing apache-tomcat-5.5.23 upon restart

Posted by "Thorsten Scherler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FOR-1049?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12535887 ] 

Thorsten Scherler commented on FOR-1049:
----------------------------------------

The real problem lies in the web.xml (here forrest).

We use here:
...
<!--
      Set commons-logging classes, in particular JCS, to use the logkit so the log messages
      are properly handled by cocoon.
    -->
    <init-param>
      <param-name>force-property</param-name>
      <param-value>
        org.apache.commons.logging.Log=org.apache.commons.logging.impl.LogKitLogger
      </param-value>
    </init-param>

    <!--
      This parameter allows you to startup Cocoon2 immediately after startup
      of your servlet engine.
    -->
    <load-on-startup>1</load-on-startup>
...

This combination is forcing the usage of the LogKitLogger for ALL servlets in your servlet container. I tested with Jetty as well and you will get the same error. 

The explanation is that since the cocoon servlet is loaded first we are setting the org.apache.commons.logging.Log variable for the whole container. 

http://commons.apache.org/logging/troubleshooting.html#Fixes 

Meaning no other servlet can override this any more, very bad if you have different servlets/contexts.

The solution is instead of using an init-param a context-param. This way every context can handle its on logging:
...
<context-param>
  <param-name>force-property</param-name>
  <param-value> org.apache.commons.logging.Log=org.apache.commons.logging.impl.LogKitLogger
  </param-value>
</context-param>
...

Will apply a fix ASAP.

> Forrest war is crashing apache-tomcat-5.5.23 upon restart
> ---------------------------------------------------------
>
>                 Key: FOR-1049
>                 URL: https://issues.apache.org/jira/browse/FOR-1049
>             Project: Forrest
>          Issue Type: Bug
>          Components: Launch servlet WAR
>            Reporter: Thorsten Scherler
>            Priority: Critical
>
> http://www.mail-archive.com/user@forrest.apache.org/msg00779.html
> "I'm having some problems with the present svn head (two days old): the war it creates installes fine in Tomcat when deployed through Tomcat's HTML Manager, and as long as Tomcat is running without interruption, there's no problem. But when restarted, Tomcat crashes severely. This happens only when the Forrest war is installed, without the Forrest war, there is no problem.
> Config:
> - (almost) latest Forrest svn
> - Tomcat 5.5.9
> - Java 1.5_02
> - Win2k server"
> I am seeing the same issue on an ubuntu linux.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FOR-1049) Forrest war is crashing Tomcat upon restart

Posted by "Thorsten Scherler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FOR-1049?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12531543 ] 

Thorsten Scherler commented on FOR-1049:
----------------------------------------

Till now I think the best hint gave Antonio.

If you do 
cd tomcat5.5/bin
mv commons-logging-api.jar commons-logging-api.jar.bck
cp $SOME_WHERE/commons-logging-1.0.4.jar commons-logging-api.jar

Then you get a slight different error:
SEVERE: Error deploying web application directory boja2
org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: No suitable Log constructor [Ljava.lang.Class;@1fe4169 for org.apache.commons.logging.impl.Log4JLogger (Caused by java.lang.NoClassDefFoundError: org/apache/log4j/Category) (Caused by org.apache.commons.logging.LogConfigurationException: No suitable Log constructor [Ljava.lang.Class;@1fe4169 for org.apache.commons.logging.impl.Log4JLogger (Caused by java.lang.NoClassDefFoundError: org/apache/log4j/Category))
        at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:543)
        at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:235)
        at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:370)
        at org.apache.catalina.core.ContainerBase.getLogger(ContainerBase.java:381)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4119)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
        at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)
        at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
        at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
        at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
        at org.apache.catalina.core.StandardService.start(StandardService.java:448)
        at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
Caused by: org.apache.commons.logging.LogConfigurationException: No suitable Log constructor [Ljava.lang.Class;@1fe4169 for org.apache.commons.logging.impl.Log4JLogger (Caused by java.lang.NoClassDefFoundError: org/apache/log4j/Category)
        at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:413)
        at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:529)
        ... 26 more
Caused by: java.lang.NoClassDefFoundError: org/apache/log4j/Category
        at java.lang.Class.getDeclaredConstructors0(Native Method)
        at java.lang.Class.privateGetDeclaredConstructors(Class.java:2357)
        at java.lang.Class.getConstructor0(Class.java:2671)
        at java.lang.Class.getConstructor(Class.java:1629)
        at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:410)
        ... 27 more
Oct 1, 2007 4:38:07 PM org.apache.catalina.startup.HostConfig deployDirectory

> Forrest war is crashing Tomcat upon restart
> -------------------------------------------
>
>                 Key: FOR-1049
>                 URL: https://issues.apache.org/jira/browse/FOR-1049
>             Project: Forrest
>          Issue Type: Bug
>          Components: Launch servlet WAR
>            Reporter: Thorsten Scherler
>            Priority: Critical
>
> http://www.mail-archive.com/user@forrest.apache.org/msg00779.html
> "I'm having some problems with the present svn head (two days old): the war it creates installes fine in Tomcat when deployed through Tomcat's HTML Manager, and as long as Tomcat is running without interruption, there's no problem. But when restarted, Tomcat crashes severely. This happens only when the Forrest war is installed, without the Forrest war, there is no problem.
> Config:
> - (almost) latest Forrest svn
> - Tomcat 5.5.9
> - Java 1.5_02
> - Win2k server"
> I am seeing the same issue on an ubuntu linux.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (FOR-1049) Forrest war is crashing apache-tomcat-5.5.23 upon restart

Posted by "Thorsten Scherler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FOR-1049?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thorsten Scherler closed FOR-1049.
----------------------------------

    Resolution: Fixed

Committed revision 585929.

> Forrest war is crashing apache-tomcat-5.5.23 upon restart
> ---------------------------------------------------------
>
>                 Key: FOR-1049
>                 URL: https://issues.apache.org/jira/browse/FOR-1049
>             Project: Forrest
>          Issue Type: Bug
>          Components: Launch servlet WAR
>            Reporter: Thorsten Scherler
>            Priority: Critical
>
> http://www.mail-archive.com/user@forrest.apache.org/msg00779.html
> "I'm having some problems with the present svn head (two days old): the war it creates installes fine in Tomcat when deployed through Tomcat's HTML Manager, and as long as Tomcat is running without interruption, there's no problem. But when restarted, Tomcat crashes severely. This happens only when the Forrest war is installed, without the Forrest war, there is no problem.
> Config:
> - (almost) latest Forrest svn
> - Tomcat 5.5.9
> - Java 1.5_02
> - Win2k server"
> I am seeing the same issue on an ubuntu linux.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (FOR-1049) Forrest war is crashing apache-tomcat-5.5.23 upon restart

Posted by "Thorsten Scherler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FOR-1049?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thorsten Scherler updated FOR-1049:
-----------------------------------

    Summary: Forrest war is crashing apache-tomcat-5.5.23 upon restart  (was: Forrest war is crashing Tomcat upon restart)

> Forrest war is crashing apache-tomcat-5.5.23 upon restart
> ---------------------------------------------------------
>
>                 Key: FOR-1049
>                 URL: https://issues.apache.org/jira/browse/FOR-1049
>             Project: Forrest
>          Issue Type: Bug
>          Components: Launch servlet WAR
>            Reporter: Thorsten Scherler
>            Priority: Critical
>
> http://www.mail-archive.com/user@forrest.apache.org/msg00779.html
> "I'm having some problems with the present svn head (two days old): the war it creates installes fine in Tomcat when deployed through Tomcat's HTML Manager, and as long as Tomcat is running without interruption, there's no problem. But when restarted, Tomcat crashes severely. This happens only when the Forrest war is installed, without the Forrest war, there is no problem.
> Config:
> - (almost) latest Forrest svn
> - Tomcat 5.5.9
> - Java 1.5_02
> - Win2k server"
> I am seeing the same issue on an ubuntu linux.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (FOR-1049) Forrest war is crashing apache-tomcat-5.5.23 upon restart

Posted by "Thorsten Scherler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FOR-1049?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thorsten Scherler resolved FOR-1049.
------------------------------------

    Resolution: Won't Fix

With apache-tomcat-6.0.14 this error is not happening.

Seems to be special to tomcat-5.5.*.

Since with updating to tomcat-6 is fixing the problem I changing to to wont fix here.

> Forrest war is crashing apache-tomcat-5.5.23 upon restart
> ---------------------------------------------------------
>
>                 Key: FOR-1049
>                 URL: https://issues.apache.org/jira/browse/FOR-1049
>             Project: Forrest
>          Issue Type: Bug
>          Components: Launch servlet WAR
>            Reporter: Thorsten Scherler
>            Priority: Critical
>
> http://www.mail-archive.com/user@forrest.apache.org/msg00779.html
> "I'm having some problems with the present svn head (two days old): the war it creates installes fine in Tomcat when deployed through Tomcat's HTML Manager, and as long as Tomcat is running without interruption, there's no problem. But when restarted, Tomcat crashes severely. This happens only when the Forrest war is installed, without the Forrest war, there is no problem.
> Config:
> - (almost) latest Forrest svn
> - Tomcat 5.5.9
> - Java 1.5_02
> - Win2k server"
> I am seeing the same issue on an ubuntu linux.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Reopened: (FOR-1049) Forrest war is crashing apache-tomcat-5.5.23 upon restart

Posted by "Thorsten Scherler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FOR-1049?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thorsten Scherler reopened FOR-1049:
------------------------------------


Actually the problem is not solved at all. As soon you add a second webapp you get this ugly bug again.

> Forrest war is crashing apache-tomcat-5.5.23 upon restart
> ---------------------------------------------------------
>
>                 Key: FOR-1049
>                 URL: https://issues.apache.org/jira/browse/FOR-1049
>             Project: Forrest
>          Issue Type: Bug
>          Components: Launch servlet WAR
>            Reporter: Thorsten Scherler
>            Priority: Critical
>
> http://www.mail-archive.com/user@forrest.apache.org/msg00779.html
> "I'm having some problems with the present svn head (two days old): the war it creates installes fine in Tomcat when deployed through Tomcat's HTML Manager, and as long as Tomcat is running without interruption, there's no problem. But when restarted, Tomcat crashes severely. This happens only when the Forrest war is installed, without the Forrest war, there is no problem.
> Config:
> - (almost) latest Forrest svn
> - Tomcat 5.5.9
> - Java 1.5_02
> - Win2k server"
> I am seeing the same issue on an ubuntu linux.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.