problem with tictactoe on tomcat 7

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

problem with tictactoe on tomcat 7

maxqua72
This post has NOT been accepted by the mailing list yet.
Hi, I'm using atmosphere 0.7.2 with tomcat 7.0.14.
I created a netbeans project using the files in the git repository but I can't get it to work.
How can I fix that?
Thanks in advance

...here is the error message:

1-ott-2011 15.27.55 org.apache.catalina.core.StandardWrapperValve invoke
GRAVE: Servlet.service() for servlet [AtmosphereServlet] in context with path [] threw exception
java.lang.IllegalStateException: Not supported.
        at org.apache.catalina.connector.Request.startAsync(Request.java:1618)
        at org.apache.catalina.connector.Request.startAsync(Request.java:1611)
        at org.apache.catalina.connector.RequestFacade.startAsync(RequestFacade.java:1024)
        at javax.servlet.ServletRequestWrapper.startAsync(ServletRequestWrapper.java:364)
        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)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:563)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:399)
        at org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:396)
        at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:356)
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1534)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:662)

the web.xml is:

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
    <description>Atmosphere TicTacToe</description>
    <display-name>Atmosphere TicTacToe</display-name>
    <servlet>
        <description>AtmosphereServlet</description>
        <servlet-name>AtmosphereServlet</servlet-name>
        <servlet-class>org.atmosphere.cpr.AtmosphereServlet</servlet-class>     
        <load-on-startup>0</load-on-startup>
        <async-supported>true</async-supported>
    </servlet>
    <servlet-mapping>
        <servlet-name>AtmosphereServlet</servlet-name>
        <url-pattern>/long_polling</url-pattern>
    </servlet-mapping>
    <session-config>
        <session-timeout>60</session-timeout>
    </session-config>
</web-app>

Reply | Threaded
Open this post in threaded view
|

Re: problem with tictactoe on tomcat 7

jfarcand
Administrator
This list is deprecated. Next time please use atmosphere-framework@googlegroups.com

You need to enable Servlet 3.0 in web.xml:

        <async-supported>true</async-supported>

or tell Atmosphere to use Tomcat Native API

        <init-param>
            <param-name>org.atmosphere.useNative</param-name>
            <param-value>true</param-value>
        </init-param>

Thanks!

-- Jeanfrancois