cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to restart Alfresco using Tomcat manager

amenel
Champ in-the-making
Champ in-the-making
Hi people,
I have a development environment with a Tomcat installation that may go through dozens of server startup/shutdown cycles and the server startup times made quite painful. So I am looking for a solution.

After reading some documentation about Tomcat, I was hoping that it would be possible to restart Alfresco without having to shutdown and restart the whole server.
Tomcat ships with a webapp that can start, restart, stop, deploy, undeploy other webapps. Since Alfresco is running as a webapp (like any other webapp I thought), I was expecting that stopping the '/alfresco' context would not lead to a whole server shutdown! I can stop, start or restart all other apps on my server, except Alfresco… when all I need is to be able to do just that with Alfresco.
Is there a workaround ? a configuration option to set ?
1 REPLY 1

amenel
Champ in-the-making
Champ in-the-making
After some research, I found a JIRA issue (ALFCOM-1362) that exposes a problem similar to mine. The issue was reported more than a year ago and is still open so I guess there's no easy answer.
Anyway, I used the issue report as a guideline. I was having this exception when stopping Alfresco from the manager:

29 avr. 2009 10:23:35 org.apache.catalina.loader.WebappClassLoader loadClass
INFO: Illegal access: this web application instance has been stopped already.  C
ould not load org.apache.log4j.spi.NOPLoggerRepository.  The eventual following
stack trace is caused by an error thrown for debugging purposes as well as to at
tempt to terminate the thread which caused the illegal access, and has no functi
onal impact.
java.lang.IllegalStateException
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa
der.java:1273)
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa
der.java:1233)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
        at org.apache.log4j.LogManager.getLoggerRepository(LogManager.java:175)
        at org.apache.log4j.LogManager.getLogger(LogManager.java:199)
        at org.apache.log4j.Logger.getLogger(Logger.java:105)
        at org.apache.commons.logging.impl.Log4JLogger.getLogger(Log4JLogger.jav
a:283)
        at org.apache.commons.logging.impl.Log4JLogger.error(Log4JLogger.java:23
9)
        at org.alfresco.repo.shutdown.ShutdownBackstop$ShutdownBackstopThread.ru
n(ShutdownBackstop.java:133)
29 avr. 2009 10:23:35 org.apache.catalina.loader.WebappClassLoader loadClass
INFO: Illegal access: this web application instance has been stopped already.  C
ould not load org.apache.log4j.spi.NOPLoggerRepository.  The eventual following
stack trace is caused by an error thrown for debugging purposes as well as to at
tempt to terminate the thread which caused the illegal access, and has no functi
onal impact.
java.lang.IllegalStateException
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa
der.java:1273)
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa
der.java:1233)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
        at org.apache.log4j.LogManager.getLoggerRepository(LogManager.java:175)
        at org.apache.log4j.LogManager.getLogger(LogManager.java:199)
        at org.apache.log4j.Logger.getLogger(Logger.java:105)
        at org.apache.commons.logging.impl.Log4JLogger.getLogger(Log4JLogger.jav
a:283)
        at org.apache.commons.logging.impl.Log4JLogger.error(Log4JLogger.java:23
9)
        at org.alfresco.repo.shutdown.ShutdownBackstop$ShutdownBackstopThread.ru
n(ShutdownBackstop.java:161)
29 avr. 2009 10:23:35 org.apache.coyote.http11.Http11Protocol pause
INFO: Suspension de Coyote HTTP/1.1 sur http-8080
‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍
So I moved log4j-1.2.15.jar from tomcat/webapps/alfresco/WEB-INF/lib to tomcat/lib. Now I still have the unexpected server shutdown, but the message has changed:

INFO: Server startup in 59390 ms
log4j:WARN No appenders could be found for logger (org.alfresco.repo.shutdown.Sh
utdownBackstop).
log4j:WARN Please initialize the log4j system properly.
29 avr. 2009 10:42:37 org.apache.coyote.http11.Http11Protocol pause
INFO: Suspension de Coyote HTTP/1.1 sur http-8080
‍‍‍‍‍‍‍‍
Any clues ?