AnsweredAssumed Answered

Stall on shutdown when OpenOffice is available

Question asked by sacco on Aug 3, 2007
I'm posting this on the forum rather than JIRA, as I'm not entirely sure whether it's a bug or a 'feature'.

    Alfresco versions: any from 2.1.0RC1 through to latest nightly build of 2.1.0

    Using  alfresco-community-tomcat  to eliminate tomcat version problems.

    IBM JVM 1.5.0

    RHEL 4

1.)
If I have an OpenOffice.org service available for document transformation, then the
Alfresco server blocks entirely during shutdown and will not shut itself down until the
OpenOffice service is killed (but then it complains that the OpenOffice service died.

 ERROR [net.sf.jooreports.openoffice.connection.SocketOpenOfficeConnection] disconnected unexpectedly

2)
Thus, if I make my script to stop OpenOffice wait for the Alfresco server process to
finish (to avoid the above error) the Alfresco server process simply blocks at
INFO: Stopping Coyote HTTP/1.1 on http-8080
and never exits.  (I've left iot over the weekend to check!)

3)
If on the other hand I simply kill the OpenOffce process indiscriminately (as suggested in the Wiki),
then as well as the error above, the log contains (usually two of)
log4j:ERROR Error occured while converting date.

Typically, every run of Alfresco therefore ends with something like:

02-Aug-2007 21:57:42 org.apache.coyote.http11.Http11BaseProtocol pause
INFO: Pausing Coyote HTTP/1.1 on http-8080
02-Aug-2007 21:57:43 org.apache.catalina.core.StandardService stop
INFO: Stopping service Catalina
21:57:44,379 ERROR [alfresco.smb.protocol] Socket closed by remote client
Exception in thread "Thread-60" java.lang.NullPointerException
   at org.alfresco.linkvalidation.LinkValidationServiceImpl.run(LinkValidationServiceImpl.java:455)
   at java.lang.Thread.run(Thread.java:801)
02-Aug-2007 21:57:49 org.apache.coyote.http11.Http11BaseProtocol destroy
INFO: Stopping Coyote HTTP/1.1 on http-8080
log4j:ERROR Error occured while converting date.
java.lang.NullPointerException
   at java.lang.StringBuffer.getChars(StringBuffer.java:412)
   at org.apache.log4j.helpers.AbsoluteTimeDateFormat.format(AbsoluteTimeDateFormat.java:108)
   at java.text.DateFormat.format(DateFormat.java:331)
   at org.apache.log4j.helpers.PatternParser$DatePatternConverter.convert(PatternParser.java:436)
   at org.apache.log4j.helpers.PatternConverter.format(PatternConverter.java:56)
   at org.apache.log4j.PatternLayout.format(PatternLayout.java:495)
   at org.apache.log4j.WriterAppender.subAppend(WriterAppender.java:292)
   at org.apache.log4j.WriterAppender.append(WriterAppender.java:150)
   at org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:221)
   at org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:57)
   at org.apache.log4j.Category.callAppenders(Category.java:187)
   at org.apache.log4j.Category.forcedLog(Category.java:372)
   at org.apache.log4j.Category.log(Category.java:864)
   at org.apache.commons.logging.impl.Log4JLogger.error(Log4JLogger.java:181)
   at net.sf.jooreports.openoffice.connection.AbstractOpenOfficeConnection.disposing(AbstractOpenOfficeConnection.java:96)
   at com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge.notifyListeners(java_remote_bridge.java:528)
   at com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge.dispose(java_remote_bridge.java:678)
   at com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge.access$000(java_remote_bridge.java:108)
   at com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge$MessageDispatcher.invoke(java_remote_bridge.java:237)
   at com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge$MessageDispatcher.run(java_remote_bridge.java:144)
ERROR [openoffice.connection.SocketOpenOfficeConnection] disconnected unexpectedly
log4j:ERROR Error occured while converting date.
java.lang.NullPointerException
   at java.lang.StringBuffer.getChars(StringBuffer.java:412)
   at org.apache.log4j.helpers.AbsoluteTimeDateFormat.format(AbsoluteTimeDateFormat.java:108)
   at java.text.DateFormat.format(DateFormat.java:331)
   at org.apache.log4j.helpers.PatternParser$DatePatternConverter.convert(PatternParser.java:436)
   at org.apache.log4j.helpers.PatternConverter.format(PatternConverter.java:56)
   at org.apache.log4j.PatternLayout.format(PatternLayout.java:495)
   at org.apache.log4j.WriterAppender.subAppend(WriterAppender.java:292)
   at org.apache.log4j.DailyRollingFileAppender.subAppend(DailyRollingFileAppender.java:349)
   at org.apache.log4j.WriterAppender.append(WriterAppender.java:150)
   at org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:221)
   at org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:57)
   at org.apache.log4j.Category.callAppenders(Category.java:187)
   at org.apache.log4j.Category.forcedLog(Category.java:372)
   at org.apache.log4j.Category.log(Category.java:864)
   at org.apache.commons.logging.impl.Log4JLogger.error(Log4JLogger.java:181)
   at net.sf.jooreports.openoffice.connection.AbstractOpenOfficeConnection.disposing(AbstractOpenOfficeConnection.java:96)
   at com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge.notifyListeners(java_remote_bridge.java:528)
   at com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge.dispose(java_remote_bridge.java:678)
   at com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge.access$000(java_remote_bridge.java:108)
   at com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge$MessageDispatcher.invoke(java_remote_bridge.java:237)
   at com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge$MessageDispatcher.run(java_remote_bridge.java:144)

Outcomes