Random unreproducable Tomcat error of the day

By Adrian Smith21 Jan 2008100 words1 mins to read

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

log4j:ERROR Error occured while converting date.
java.lang.NullPointerException
  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 was written by Adrian Smith on 21 Jan 2008

Follow me: Facebook | Twitter | LinkedIn | Email

More on: FAIL | Java | Web