Random unreproducable Tomcat error of the day

I just tried to start Tomcat and it refused to start because of the following error:

log4j:ERROR Error occured while converting date.
  at java.lang.System.arraycopy(Native Method)
  at java.lang.AbstractStringBuilder.getChars
  at java.lang.StringBuffer.getChars
  at org.apache.log4j.helpers.ISO8601DateFormat.format
  at java.text.DateFormat.format
  at org.apache.log4j.Category.log
  at org.apache.commons.logging.impl.Log4JLogger.error
  at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt
  at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run
  at java.lang.Thread.run
log4j:ERROR Error occured while converting date.

So I just hit started it again, and this time it starts without error.

And people trust their mission-critical server architecture to this stuff!

Update: Since writing this article I've changed to using Jetty and have left this sort of error behind me

This article is © Adrian Smith.
It was originally published on 21 Jan 2008
More on: FAIL | Java | Web