-
FEATURED COMPONENTS
First time here? Check out the FAQ!
We are using Comet push for some months now and everything was working fine. But now we gat the following exception on startup of our application:
java.lang.NoSuchMethodError: javax.servlet.ServletContext.addServlet(Ljava/lang/String;Ljava/lang/Class;)Ljavax/servlet/ServletRegistration$Dynamic;
at org.zkoss.zkmax.ui.comet.CometAsyncServlet.install(CometAsyncServlet.java:54)
at org.zkoss.zkmax.init.WebAppInit.init(WebAppInit.java:33)
at org.zkoss.zk.ui.util.Configuration.invokeWebAppInits(Configuration.java:727)
at org.zkoss.zk.ui.impl.AbstractWebApp.init(AbstractWebApp.java:202)
at org.zkoss.zk.ui.http.SimpleWebApp.init(SimpleWebApp.java:58)
at org.zkoss.zk.ui.http.WebManager.<init>(WebManager.java:223)
at org.zkoss.zk.ui.http.HttpSessionListener23.contextInitialized(HttpSessionListener23.java:140)
at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:549)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:136)
at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1282)
at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:518)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:499)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
at org.mortbay.jetty.Server.doStart(Server.java:224)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at runjettyrun.Bootstrap.main(Bootstrap.java:97)
When I have a look into the source of the servlet it says that it requires servlet-api 3. However, we use servlet-api 2.5 and that we did all the time. I am now wondering how this can happen. Is there some other initialization of the comet api that does not use this method and that maybe was used up to now?
Thanks beforehand, David
you might include a java servlet-api 3.0 jar but doesn't run your application in an application server that supports servlet 3.0.
Asked: 2013-10-25 11:41:07 +0800
Seen: 51 times
Last updated: Sep 09 '15