SEVERE: Error listenerStart

Just found how strangely Tomcat 5.5.9 running on JDK 1.4.x reacts to the fact that a web application was compiled with JDK 5.0 Instead of showing some meaningful error the record in catalina.out looks like this:

Apr 26, 2005 6:29:52 AM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
Apr 26, 2005 6:29:52 AM org.apache.catalina.core.StandardContext start
SEVERE: Context [/cm] startup failed due to previous errors

The problem becomes obvious only after looking into localhost log where the following error message can be found:

SEVERE: Error configuring application listener of class cm.common.SessionListener
java.lang.UnsupportedClassVersionError: cm/common/SessionListener (Unsupported major.minor version 49.0)
        at java.lang.ClassLoader.defineClass0(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java(Compiled Code))
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java(Compiled Code))
        at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java(Compiled Code))
        at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java(Compiled Code))
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java(Compiled Code))
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java(Compiled Code))
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3617)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4104)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
        at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:894)
        at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:857)
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:475)
        at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1165)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:293)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java(Compiled Code))
        at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java(Compiled Code))
        at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java(Compiled Code))
        at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java(Compiled Code))
        at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1557)
        at java.lang.Thread.run(Thread.java:567)
Apr 26, 2005 6:35:28 AM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Skipped installing application listeners due to previous error(s)

which makes much more sense.

It took quite some time to figure out what was wrong.