Atmosphere/atmosphere — Issue #162: java.lang.NoClassDefFoundError: org/apache/catalina/comet/CometProcessor
Author: haed
Created: 2012-01-23 15:07:43+00:00
State: open

Version: 0.8.4

I used the following jars:

- atmosphere-annotations-0.8.4.jar
- atmosphere-compat-jbossweb-0.8.4.jar
- atmosphere-compat-jetty-0.8.4.jar
- atmosphere-compat-weblogic-0.8.4.jar
- atmosphere-jersey-0.8.4.jar
- atmosphere-runtime-0.8.4.jar
- atmosphere-compat-tomcat-0.8.4.jar

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/catalina/comet/CometProcessor
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:397)
at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:373)
at org.eclipse.jetty.util.Loader.loadClass(Loader.java:90)
at org.eclipse.jetty.util.Loader.loadClass(Loader.java:70)
at org.eclipse.jetty.servlet.Holder.doStart(Holder.java:81)
at org.eclipse.jetty.servlet.ServletHolder.doStart(ServletHolder.java:239)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:58)
at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:765)
at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:245)
at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1208)
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:586)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:449)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:58)
at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:89)
at org.eclipse.jetty.server.Server.doStart(Server.java:258)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:58)

With atmosphere-compat-tomcat-0.8.1.jar it works, there are the missing org/apache/catalina/comet/*-classes.

AtmosphereServlet
==> imports: org.atmosphere.cpr.DefaultCometSupportResolver
==> imports: org.atmosphere.container.Tomcat7CometSupport
==> imports: org.apache.catalina.comet.CometEvent :-(

Why atmosphere do not use dynamic class loading? So nobody needs to add these compat-jars...