有人测试Shiro和Primefaces Push(氛围): org.atmosphere.container.JSR356Endpoint
我遇到了WildFly 8.2的问题:
19:18:02,848 ERROR [org.atmosphere.container.JSR356Endpoint] (default task-46) : org.apache.shiro.UnavailableSecurityManagerException: No SecurityManager accessible to the calling code, either bound to the org.apache.shiro.util.ThreadContext or as a vm static singleton. This is an invalid application configuration.
at org.apache.shiro.SecurityUtils.getSecurityManager(SecurityUtils.java:123) [shiro-core-1.2.4.jar:1.2.4]
at org.apache.shiro.subject.Subject$Builder.<init>(Subject.java:627) [shiro-core-1.2.4.jar:1.2.4]
at org.apache.shiro.SecurityUtils.getSubject(SecurityUtils.java:56) [shiro-core-1.2.4.jar:1.2.4]
at org.apache.shiro.web.servlet.ShiroHttpServletRequest.getSubject(ShiroHttpServletRequest.java:88) [shiro-web-1.2.4.jar:1.2.4]
at org.apache.shiro.web.servlet.ShiroHttpServletRequest.getSession(ShiroHttpServletRequest.java:155) [shiro-web-1.2.4.jar:1.2.4]
at javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:270) [jboss-servlet-api_3.1_spec-1.0.0.Final.jar:1.0.0.Final]
at io.undertow.servlet.websockets.ServletWebSocketHttpExchange.getSession(ServletWebSocketHttpExchange.java:205) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.websockets.jsr.handshake.ExchangeHandshakeRequest.getHttpSession(ExchangeHandshakeRequest.java:70) [undertow-websockets-jsr-1.1.0.Final.jar:1.1.0.Final]
at org.atmosphere.container.JSR356Endpoint.onOpen(JSR356Endpoint.java:187) [atmosphere-runtime-2.4.0-RC5.jar:2.4.0-RC5]
at io.undertow.websockets.jsr.EndpointSessionHandler.onConnect(EndpointSessionHandler.java:120) [undertow-websockets-jsr-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.websockets.jsr.JsrWebSocketFilter$1.handleUpgrade(JsrWebSocketFilter.java:121) [undertow-websockets-jsr-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.server.protocol.http.HttpReadListener.exchangeComplete(HttpReadListener.java:307) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.server.protocol.http.HttpServerConnection.exchangeComplete(HttpServerConnection.java:212) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.server.HttpServerExchange.invokeExchangeCompleteListeners(HttpServerExchange.java:1163) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.server.HttpServerExchange.terminateResponse(HttpServerExchange.java:1383) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.server.Connectors.terminateResponse(Connectors.java:98) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.server.protocol.http.ServerFixedLengthStreamSinkConduit.channelFinished(ServerFixedLengthStreamSinkConduit.java:51) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.conduits.AbstractFixedLengthStreamSinkConduit.exitFlush(AbstractFixedLengthStreamSinkConduit.java:300) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.conduits.AbstractFixedLengthStreamSinkConduit.flush(AbstractFixedLengthStreamSinkConduit.java:234) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
at org.xnio.conduits.ConduitStreamSinkChannel.flush(ConduitStreamSinkChannel.java:162)
at io.undertow.channels.DetachableStreamSinkChannel.flush(DetachableStreamSinkChannel.java:118) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
at org.xnio.channels.Channels.flushBlocking(Channels.java:63)
at io.undertow.servlet.spec.ServletOutputStreamImpl.close(ServletOutputStreamImpl.java:609) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.servlet.spec.HttpServletResponseImpl.closeStreamAndWriter(HttpServletResponseImpl.java:497) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.servlet.spec.HttpServletResponseImpl.responseDone(HttpServletResponseImpl.java:581) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:308) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:247) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:76) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:166) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.server.Connectors.executeRootHandler(Connectors.java:197) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:759) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_65]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_65]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_65]
19:18:02,854 ERROR [org.atmosphere.container.JSR356Endpoint] (default task-46) : java.lang.IllegalArgumentException: Reason Phrase cannot exceed 123 UTF-8 encoded bytes: No SecurityManager accessible to the calling code, either bound to the org.apache.shiro.util.ThreadContext or as a vm static singleton. This is an invalid application configuration.
at javax.websocket.CloseReason.<init>(CloseReason.java:70) [jboss-websocket-api_1.1_spec-1.1.0.Final.jar:1.1.0.Final]
at org.atmosphere.container.JSR356Endpoint.onOpen(JSR356Endpoint.java:256) [atmosphere-runtime-2.4.0-RC5.jar:2.4.0-RC5]
at io.undertow.websockets.jsr.EndpointSessionHandler.onConnect(EndpointSessionHandler.java:120) [undertow-websockets-jsr-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.websockets.jsr.JsrWebSocketFilter$1.handleUpgrade(JsrWebSocketFilter.java:121) [undertow-websockets-jsr-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.server.protocol.http.HttpReadListener.exchangeComplete(HttpReadListener.java:307) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.server.protocol.http.HttpServerConnection.exchangeComplete(HttpServerConnection.java:212) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.server.HttpServerExchange.invokeExchangeCompleteListeners(HttpServerExchange.java:1163) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.server.HttpServerExchange.terminateResponse(HttpServerExchange.java:1383) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.server.Connectors.terminateResponse(Connectors.java:98) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.server.protocol.http.ServerFixedLengthStreamSinkConduit.channelFinished(ServerFixedLengthStreamSinkConduit.java:51) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.conduits.AbstractFixedLengthStreamSinkConduit.exitFlush(AbstractFixedLengthStreamSinkConduit.java:300) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.conduits.AbstractFixedLengthStreamSinkConduit.flush(AbstractFixedLengthStreamSinkConduit.java:234) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
at org.xnio.conduits.ConduitStreamSinkChannel.flush(ConduitStreamSinkChannel.java:162)
at io.undertow.channels.DetachableStreamSinkChannel.flush(DetachableStreamSinkChannel.java:118) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
at org.xnio.channels.Channels.flushBlocking(Channels.java:63)
at io.undertow.servlet.spec.ServletOutputStreamImpl.close(ServletOutputStreamImpl.java:609) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.servlet.spec.HttpServletResponseImpl.closeStreamAndWriter(HttpServletResponseImpl.java:497) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.servlet.spec.HttpServletResponseImpl.responseDone(HttpServletResponseImpl.java:581) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:308) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:247) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:76) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:166) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.server.Connectors.executeRootHandler(Connectors.java:197) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:759) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_65]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_65]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_65]