1

Glassfish atmosphere-runtime-2.0.04 と一緒に使用すると、以下のエラー スタック トレースでスパムが発生します。primefaces-4.0.RC1これは、私のglassfish-4インストール(linux + openjdk)の1つでのみ発生しますが、Windows 7で同じアプリを実行している他のインストールでは発生しません(OSの問題ではないと思います..)

グラスフィッシュの設定で、http-listener-1 に対してコメットとウェブソケットの両方を有効にしました。それとは別に、すべてがデフォルトのglassfish-4設定である必要があります(異なるデータベースなどですが、それは実際には関係ありません)。

異なる動作を引き起こす gf4 インスタンスの 1 つで忘れた設定はありますか?

[#|2013-09-21T23:38:23.159+0200|INFO|glassfish 4.0||_ThreadID=20;_ThreadName=Thread-3;_TimeMillis=1379799503159;_LevelValue=800;|
  2013-09-21 23:38:23,159 [p-listener-1(2)] ERROR AtmosphereFramework            - AtmosphereFramework exception
java.lang.IllegalStateException: Request is within the scope of a filter or servlet that does not support asynchronous operations
    at org.apache.catalina.connector.Request.startAsync(Request.java:4259)
    at org.apache.catalina.connector.Request.startAsync(Request.java:4236)
    at org.apache.catalina.connector.RequestFacade.startAsync(RequestFacade.java:1044)
    at org.atmosphere.cpr.AtmosphereRequest.startAsync(AtmosphereRequest.java:505)
    at org.atmosphere.container.Servlet30CometSupport.suspend(Servlet30CometSupport.java:128)
    at org.atmosphere.container.Servlet30CometSupport.service(Servlet30CometSupport.java:103)
    at org.atmosphere.cpr.AtmosphereFramework.doCometSupport(AtmosphereFramework.java:1675)
    at org.atmosphere.cpr.AtmosphereServlet.doPost(AtmosphereServlet.java:177)
    at org.atmosphere.cpr.AtmosphereServlet.doGet(AtmosphereServlet.java:163)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
    at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:344)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
    at org.glassfish.tyrus.servlet.TyrusServletFilter.doFilter(TyrusServletFilter.java:253)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:316)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673)
    at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174)
    at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:357)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:260)
    at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:188)
    at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:191)
    at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:168)
    at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:189)
    at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
    at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288)
    at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206)
    at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136)
    at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114)
    at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
    at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:838)
    at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:113)
    at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115)
    at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55)
    at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135)
    at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:564)
    at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:544)
    at java.lang.Thread.run(Thread.java:724)|#]

エラーが発生する前は、通常の外観のスタートアップ トレースだけがあり、Windows と Linux の両方で非常に同じように見えます。

INFO  AtmosphereFramework            - Atmosphere is using org.atmosphere.cpr.DefaultAnnotationProcessor for processing annotation]]
INFO  DefaultAnnotationProcessor     - AnnotationProcessor class org.atmosphere.cpr.DefaultAnnotationProcessor$ServletContainerInitializerAnnotationProcessor being used]]
ERROR DefaultAnnotationProcessor     - No @AtmosphereService annotation found. Annotation won't work.]]
INFO  AtmosphereFramework            - Auto detecting atmosphere handlers /WEB-INF/classes/]]
INFO  AtmosphereFramework            - Auto detecting WebSocketHandler in /WEB-INF/classes/]]
INFO  AtmosphereFramework            - Installed WebSocketProtocol org.atmosphere.websocket.protocol.SimpleHttpProtocol]]
INFO  AtmosphereFramework            - Installing Default AtmosphereInterceptor]]
INFO  AtmosphereFramework            -  org.atmosphere.interceptor.DefaultHeadersInterceptor : Default Response's Headers Interceptor]]
INFO  AtmosphereFramework            -  org.atmosphere.interceptor.PaddingAtmosphereInterceptor : Browser Padding Interceptor Support]]
INFO  AtmosphereFramework            -  org.atmosphere.interceptor.AndroidAtmosphereInterceptor : Android Interceptor Support]]
INFO  AtmosphereFramework            -  org.atmosphere.interceptor.SSEAtmosphereInterceptor : SSE Interceptor Support]]
INFO  AtmosphereFramework            -  org.atmosphere.interceptor.JSONPAtmosphereInterceptor : JSONP Interceptor Support]]
INFO  AtmosphereFramework            -  org.atmosphere.interceptor.JavaScriptProtocol : Atmosphere JavaScript Protocol]]
INFO  AtmosphereFramework            -  org.atmosphere.interceptor.OnDisconnectInterceptor : Browser disconnection detection]]
INFO  AtmosphereFramework            - Set org.atmosphere.cpr.AtmosphereInterceptor.disableDefaults to disable them.]]
WARN  AtmosphereFramework            - No BroadcasterCache configured. Broadcasted message between client reconnection will be LOST. It is recommended to configure the org.atmosphere.cache.UUIDBroadcasterCache]]
INFO  AtmosphereFramework            - Broadcaster Polling Wait Time 100]]
INFO  AtmosphereFramework            - Shared ExecutorService supported: true]]
INFO  AtmosphereFramework            - HttpSession supported: false]]
INFO  AtmosphereFramework            - Using BroadcasterFactory: org.atmosphere.cpr.DefaultBroadcasterFactory]]
INFO  AtmosphereFramework            - Using WebSocketProcessor: org.atmosphere.websocket.DefaultWebSocketProcessor]]
INFO  AtmosphereFramework            - Using Broadcaster: org.atmosphere.cpr.DefaultBroadcaster]]
INFO  AtmosphereFramework            - Atmosphere is using async support: org.atmosphere.container.JSR356AsyncSupport running under container: GlassFish Server Open Source Edition  4.0  using javax.servlet/3.0 using javax.servlet/3.0 and jsr356/WebSocket API]]
INFO  AtmosphereFramework            - Atmosphere Framework 2.0.0 started.]]
INFO  AtmosphereFramework            - 

    For Atmosphere Framework Commercial Support, visit 
    http://www.async-io.org/ or send an email to support@async-io.org]]

INFO  AtmosphereFramework            - Installed AtmosphereInterceptor Atmosphere LifeCycle with priority AFTER_DEFAULT]]
4

1 に答える 1

8

に追加する<async-supported>true</async-supported>と、Push Servletこの問題は解決しました。私のグラスフィッシュインスタンスの理由でそれが機能した理由を説明していません。

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.1" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaeehttp://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd">
... 
    <servlet>
        <servlet-name>Push Servlet</servlet-name>
        <servlet-class>org.primefaces.push.PushServlet</servlet-class>
        <init-param>
            <param-name>org.atmosphere.cpr.broadcasterCacheClass</param-name>
            <param-value>org.atmosphere.cache.UUIDBroadcasterCache</param-value>
        </init-param>
        <load-on-startup>1</load-on-startup>
        <async-supported>true</async-supported>
    </servlet>
    <servlet-mapping>
        <servlet-name>Push Servlet</servlet-name>
        <url-pattern>/primepush/*</url-pattern>
    </servlet-mapping>
...
</web-app>
于 2013-10-07T17:47:16.997 に答える