Additionally, any servlet filters that sit in front of the Atmosphere servlet must have the
true element. If you just want to use Tomcat’s Comet support then add
Please find the attached application. This war file also contains the source file as well and all configuration files I used.
In tomcat 6.0.33 it works fine and detects it as comet application.
The same application does not work in tomcat 7.0.22 and gives following error
WARNING: failed using comet support: org.atmosphere.container.TomcatCometSupport, error: Tomcat failed to detect this is a Comet application because context.xml is missing or the Http11NioProtocol Connector is not enabled.
If that’s not the case, you can also remove META-INF/context.xml and WEB-INF/lib/atmosphere-compat-tomcat.jar
Oct 5, 2011 3:08:39 PM org.atmosphere.cpr.AtmosphereServlet doCometSupport
WARNING: Using BlockingIOCometSupport.
Yes, I looked at it. You have one, potentially two, problems. The first is that the context path in ServerPushApplication is incorrect. there is no /root context in tomcat by default. Your context.xml has the context path as “” which means the root context; however, since you are deploying as a WAR file that context path is overwritten by Tomcat. Since the name of the WAR is ServerPush.war the correct path is /SeverPush/foo/bar.
Hi Mark,
I am still not able to run it successfully. One difference I see is following
I see the message
INFO: Atmosphere is using comet support: org.atmosphere.container.TomcatCometSupport running under container: Apache Tomcat/7.0.22
Instead of
INFO: Atmosphere is using comet support: org.atmosphere.container.Servlet30Support running under container: Apache Tomcat/7.0.22 using javax.servlet/3.0
Even though I have my web.xml schema pointing to 3.0 as following
And I have following property set in both Vaadin servlet and Atmosphere servlet
true
I dont have any servlet jar in WEB-INF/lib as well
Does it have to use Servlet30Support in order for me to fix this issue? And why is it not using Servlet30Support?
Hmm it has become a nightmare for me. When I comment this property I get this error in Tomcat 7.0.22. Yes I do have web.xml using Sevlet 3.0 header
SEVERE: AtmosphereServlet exception
java.lang.IllegalStateException: Not supported.
at org.apache.catalina.connector.Request.startAsync(Request.java:1642)
at org.apache.catalina.connector.Request.startAsync(Request.java:1635)
at org.apache.catalina.connector.RequestFacade.startAsync(RequestFacade.java:1024)
at org.atmosphere.container.Servlet30Support.suspend(Servlet30Support.java:137)
at org.atmosphere.container.Servlet30Support.service(Servlet30Support.java:91)
at org.atmosphere.cpr.AtmosphereServlet.doCometSupport(AtmosphereServlet.java:1156)
at org.atmosphere.cpr.AtmosphereServlet.doPost(AtmosphereServlet.java:1138)
at org.atmosphere.cpr.AtmosphereServlet.doGet(AtmosphereServlet.java:1124)
I am sorry for your troubles but I am unable to reproduce your issue. The ISE “Not supported” only occurs when either a servlet or servlet filter accessed as part of a request that calls startAsync() on the HTTP request is not marked as
true . All standard Tomcat valves support async so the issue would not be there. I suggest you look at your tomcat config and make sure there is not something in your request path not supporting async. As an example, when I first wrote this add-on it worked perfectly on my machine but when I integrated it into my company’s build and pushed it to the test system it did not work with the exact error you have specified. I about pulled my teeth out trying to understand why. It turned out that a third-party library we were using in the app, Java Melody, had included a web-fragment.xml in the JAR’s META-INF/ directory which declared a non-aysnc servlet filter with the mapping of /*. We were already including this filter in our web.xml so it was completely redundant; however, we never noticed it until moving to tomcat 7 and using servlet 3.0. Review your JAR files in WEB-INF/lib and make sure there is nothing like this:
for JAR in WEB-INF/lib/*.jar; do
if [ `unzip -l $JAR | grep -c web-fragment.xml` -gt 0 ]
; then
echo "web-fragment.xml found in $JAR"
fi
done
Also review the context.xml and server.xml in Tomcat’s conf dir.
First, thank you very much for writing this add-on. It is highly needed in several dynamic web applications and should be IMO part of the official vaadin release.
Well, it has already been proposed for vaadin 7 as I see on http://dev.vaadin.com/wiki/Vaadin7/Proposals/ServerPush
However, I have some stability problem with this add-on.
My web application consists of a button and a normal (lazy) table. When I press the button my program starts filling the table in the background. Since I want to present the results as fast as possible I decided to use ServerPush in order to update the table in the browser incrementally. Thereto I use the ServerPush servlet (org.vaadin.addons.serverpush.ServerPushApplicationServlet) so that I do not have to manually call push().
For adding rows to the table I use the normal addItem(content, id) method.
But almost always when I add more than 100 rows to the table the table (or the client-server communication or whatever) crashes. In this case the table does not react anymore on certain user actions. I cannot sort the rows by column anymore and the table does not load new rows anymore when I scroll down via mouse wheel.
Thus, the question is whether the table, the normal GWT communication or the atmosphere communication crashes? But how to find the cause for this problem?
BTW, when I reload the page the table works again normally.
I am trying to use the ServerPush add on. I follow the steps in
this post .
On the third step, I have to create a custom widgetset inheriting the org.vaadin.addons.serverpush.ServerPushWidgetset widgetset, but there is no matching class.The only one avalaible is org.vaadin.addons.serverpush.ServerPush.
How should I do ?
I am using ServerPush 1.06 and Vaadin 6.7.1. on RBD8
Hallo
i need some help with the web.xml configuration for tomcat 6. With the example web.xml from the “web/” directory in the add-on archive it doesn’t work for tomcat6 but it works with tomcat7.
When i start the tomcat6 my vaadin application and the web.xml template i get the following error:
ERROR [http-8080-3]
org.atmosphere.cpr.AtmosphereServlet - AtmosphereServlet exception
java.lang.IllegalStateException: !(Jetty || Servlet 3.0 || ContinuationFilter)
at org.eclipse.jetty.continuation.ContinuationSupport.getContinuation(ContinuationSupport.java:145)
at org.atmosphere.container.Jetty7CometSupport.service(Jetty7CometSupport.java:78)
at org.atmosphere.cpr.AtmosphereServlet.doCometSupport(AtmosphereServlet.java:1156)
at org.atmosphere.cpr.AtmosphereServlet.doPost(AtmosphereServlet.java:1138)
at org.atmosphere.cpr.AtmosphereServlet.doGet(AtmosphereServlet.java:1124)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:662)
Hi Mark,
I know that you do not support this add-on anymore, but I am using it and I hope that you could help me.
I have two “small” issues.
My web-application supports multi - tabs/windows. ServerPush works perfectly but when I close one tab/window, I receive a warn:
“WARN [org.atmosphere.handler.AbstractReflectorAtmosphereHandler]
(Atmosphere-AsyncWrite-0) Serializer exception: message: org.atmosphere.gwt.server.impl.Heartbeat@1c0e7b8: ClientAbortException: java.net.SocketException: Software caused connection abort: socket write error”.
Is there any way to catch that warning or to update the servlet not to commuicate with that particular window/tab?
When a window/tab opens I get this info:
" INFO [org.vaadin.addons.serverpush.VaadinServerPushHandler]
(http-localhost-127.0.0.1-8080-1) You have set an infinite timeout for your comet connection this is not recommended" .
Should I worry about that?