2012-11-05 45 views
0

我配置並開發了一個內聯網應用程序,它結合了:spring 3.0.5(包括security)+ CometD 2.3.1。Cometd dojo應用程序 - 帶玻璃魚的HTTP 408

爲了設置的cometd,我提到: http://docs.cometd.org/2.4.3/reference/#java_server_services_integration_spring

當我運行我在碼頭的應用程序,一切工作正常。但是當我嘗試在glassfish v2中運行它時,我「隨機」獲取HTTP 408。錯誤的server.log:

[#|2012-11-02T15:43:50.428+0100|SEVERE|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=17;_ThreadName=httpSSLWorkerThread-9000-0;_RequestID=eb9ebc97-ac0f-48fe-8793-cfc9fd3e7b3a;|StandardWrapperValve[default]: PWC1406: Servlet.service() for servlet default threw exception 
java.lang.IllegalStateException 
    at org.apache.coyote.tomcat5.CoyoteResponseFacade.sendError(CoyoteResponseFacade.java:433) 
    at javax.servlet.http.HttpServletResponseWrapper.sendError(HttpServletResponseWrapper.java:141) 
    at org.springframework.security.web.context.SaveContextOnUpdateOrErrorResponseWrapper.sendError(SaveContextOnUpdateOrErrorResponseWrapper.java:54) 
    at org.apache.catalina.servlets.DefaultServlet.serveResource(DefaultServlet.java:740) 
    at org.apache.catalina.servlets.DefaultServlet.doGet(DefaultServlet.java:384) 
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:718) 
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:831) 
    at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411) 
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317) 
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198) 
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:368) 
    at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109) 
    at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83) 

而且從IE客戶端的角度來看,我的cometd連接不穩定:

13:16:16 - CometD Connection Established 
13:16:16 - CometD Connection Broken 
13:16:17 - CometD Connection Established 
13:16:17 - CometD Connection Broken 
13:16:20 - CometD Connection Established 
13:16:20 - CometD Connection Broken 
13:16:21 - CometD Connection Established 
13:16:21 - CometD Connection Broken 
13:16:22 - CometD Connection Established 
13:16:23 - CometD Connection Broken 

但儘管錯誤信息時,連接的cometd工作:訂閱行動是確定和通知是從服務器成功接收。

注意:我在同一個glassfish域中部署了示例dojo-chat應用程序(我將其作爲模型)並且工作正常!

我可能錯過了什麼?

回答

0

事實上,我發現在的cometd樣本WAR答案(web.xml文件):

<!-- Portability Filter, needed only to run on non Jetty or non Servlet-3.0 containers --> 
<filter> 
    <filter-name>continuation</filter-name> 
    <filter-class>org.eclipse.jetty.continuation.ContinuationFilter</filter-class> 
</filter> 
<filter-mapping> 
    <filter-name>continuation</filter-name> 
    <url-pattern>/cometd/*</url-pattern> 
</filter-mapping> 

這個過濾器是不是在我的web.xml中。 我不明白的是爲什麼演示應用程序工作正常(使用相同的servlet容器),而過濾器被評論?