0

NoSuchMethodError in CometAsyncServlet

asked 2013-10-25 11:41:07 +0800

avidD gravatar image avidD
166 2

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

delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-09-09 07:20:55 +0800

hawk gravatar image hawk
2255 1 5
http://hawkphoenix.blogsp... ZK Team

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.

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2013-10-25 11:41:07 +0800

Seen: 50 times

Last updated: Sep 09 '15

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More