[ANN] 2.2.1 released; PrimeFaces 5.1RC1 Push errors

UI Components for JSF
Post Reply
smithh032772
Posts: 6144
Joined: 10 Sep 2011, 21:10

23 Sep 2014, 00:49

[ANN] 2.2.1 released
jfarcand wrote:Salut,

a quick one, mostly to workaround JHipster issue with Spring Boot and Tomcat

http://goo.gl/vOiIIN

-- Jeanfrancois
Maven Central repository: org.atmosphere runtime
Last edited by smithh032772 on 23 Sep 2014, 00:53, edited 1 time in total.
Howard

PrimeFaces 6.0, Extensions 6.0.0, Push (Atmosphere 2.4.0)
TomEE+ 1.7.4 (Tomcat 7.0.68), MyFaces Core 2.2.9, JDK8
JUEL 2.2.7 | OmniFaces | EclipseLink-JPA/Derby | Chrome

Java EE 6 Tutorial|NetBeans|Google|Stackoverflow|PrimeFaces|Apache

smithh032772
Posts: 6144
Joined: 10 Sep 2011, 21:10

23 Sep 2014, 00:50

I just tried PrimeFaces 5.1 RC1 + Atmosphere 2.2.1 + TomEE 1.7.1 (tomcat 7.0.55), and I am getting errors :(

Code: Select all

Sep 22, 2014 6:32:11 PM org.atmosphere.cpr.AtmosphereFramework addAtmosphereHandler
INFO: Installed AtmosphereInterceptor [@PushEndpoint Interceptor] mapped to AtmosphereHandler org.primefaces.push.impl.PushEndpointHandlerProxy
Sep 22, 2014 6:32:21 PM org.atmosphere.cpr.AsynchronousProcessor completeLifecycle
SEVERE: Failed to cancel resource: 456c1120-6d79-4d90-b2a0-758e53bb0911
java.lang.NullPointerException
	at org.primefaces.push.impl.PushEndpointHandlerProxy.invokeOpenOrClose(PushEndpointHandlerProxy.java:373)
	at org.primefaces.push.impl.PushEndpointHandlerProxy.onStateChange(PushEndpointHandlerProxy.java:246)
	at org.atmosphere.cpr.AsynchronousProcessor.invokeAtmosphereHandler(AsynchronousProcessor.java:492)
	at org.atmosphere.cpr.AsynchronousProcessor.completeLifecycle(AsynchronousProcessor.java:444)
	at org.atmosphere.interceptor.OnDisconnectInterceptor.inspect(OnDisconnectInterceptor.java:67)
	at org.atmosphere.cpr.AsynchronousProcessor.invokeInterceptors(AsynchronousProcessor.java:302)
	at org.atmosphere.cpr.AsynchronousProcessor.action(AsynchronousProcessor.java:167)
	at org.atmosphere.cpr.AsynchronousProcessor.suspended(AsynchronousProcessor.java:104)
	at org.atmosphere.container.Servlet30CometSupport.service(Servlet30CometSupport.java:66)
	at org.atmosphere.container.Tomcat7Servlet30SupportWithWebSocket.doService(Tomcat7Servlet30SupportWithWebSocket.java:67)
	at org.atmosphere.container.TomcatWebSocketUtil.doService(TomcatWebSocketUtil.java:98)
	at org.atmosphere.container.Tomcat7Servlet30SupportWithWebSocket.service(Tomcat7Servlet30SupportWithWebSocket.java:62)
	at org.atmosphere.cpr.AtmosphereFramework.doCometSupport(AtmosphereFramework.java:2034)
	at org.atmosphere.cpr.AtmosphereServlet.doPost(AtmosphereServlet.java:211)
	at org.atmosphere.cpr.AtmosphereServlet.doGet(AtmosphereServlet.java:197)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:620)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
	at org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:44)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1736)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1695)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Thread.java:745)
atmosphere startup log

Code: Select all

Sep 22, 2014 6:30:25 PM org.atmosphere.cpr.AtmosphereFramework interceptor
INFO: Installed AtmosphereInterceptor Atmosphere LifeCycle with priority AFTER_DEFAULT 
Sep 22, 2014 6:30:25 PM org.atmosphere.cpr.AtmosphereFramework interceptor
INFO: Installed AtmosphereInterceptor  Track Message Size Interceptor using | with priority BEFORE_DEFAULT 
Sep 22, 2014 6:30:25 PM org.atmosphere.util.IOUtils readServiceFile
WARNING: META-INF/services/org.atmosphere.cpr.AtmosphereFramework not found in class loader
Sep 22, 2014 6:30:25 PM org.atmosphere.cpr.AtmosphereFramework autoConfigureService
INFO: Atmosphere is using org.atmosphere.cpr.DefaultAnnotationProcessor for processing annotation
Sep 22, 2014 6:30:25 PM org.atmosphere.cpr.DefaultAnnotationProcessor configure
INFO: AnnotationProcessor class org.atmosphere.cpr.DefaultAnnotationProcessor$ServletContainerInitializerAnnotationProcessor being used
Sep 22, 2014 6:30:25 PM org.atmosphere.cpr.AnnotationHandler handleAnnotation
INFO: Found Annotation in class org.primefaces.push.impl.PushEndpointInterceptor being scanned: interface org.atmosphere.config.service.AtmosphereInterceptorService
Sep 22, 2014 6:30:25 PM org.atmosphere.cpr.AnnotationHandler handleAnnotation
INFO: Found Annotation in class org.primefaces.push.impl.PushEndpointProcessor being scanned: interface org.atmosphere.config.AtmosphereAnnotation
Sep 22, 2014 6:30:25 PM org.atmosphere.cpr.AnnotationHandler handleAnnotation
INFO: Found Annotation in class org.primefaces.push.impl.PushEndpointMapper being scanned: interface org.atmosphere.config.service.EndpointMapperService
Sep 22, 2014 6:30:25 PM org.atmosphere.cpr.AnnotationHandler handleAnnotation
INFO: Found Annotation in class pf.NotifyResource being scanned: interface org.primefaces.push.annotation.PushEndpoint
Sep 22, 2014 6:30:25 PM org.atmosphere.cpr.AtmosphereFramework addAtmosphereHandler
INFO: Installed AtmosphereHandler org.primefaces.push.impl.PushEndpointHandlerProxy mapped to context-path /{usernameAndSessionId} and Broadcaster Class org.atmosphere.cpr.DefaultBroadcaster
Sep 22, 2014 6:30:25 PM org.atmosphere.cpr.AtmosphereFramework addAtmosphereHandler
INFO: Installed AtmosphereInterceptor [@PushEndpoint Interceptor] mapped to AtmosphereHandler org.primefaces.push.impl.PushEndpointHandlerProxy
Sep 22, 2014 6:30:25 PM org.atmosphere.cpr.AtmosphereFramework autoDetectWebSocketHandler
INFO: Auto detecting WebSocketHandler in /WEB-INF/classes/
Sep 22, 2014 6:30:25 PM org.atmosphere.cpr.AtmosphereFramework initWebSocket
INFO: Installed WebSocketProtocol org.atmosphere.websocket.protocol.SimpleHttpProtocol 
Sep 22, 2014 6:30:25 PM org.atmosphere.cpr.AtmosphereFramework configureAtmosphereInterceptor
INFO: Installing Default AtmosphereInterceptor
Sep 22, 2014 6:30:25 PM org.atmosphere.cpr.AtmosphereFramework newAInterceptor
INFO: 	org.atmosphere.interceptor.CorsInterceptor : CORS Interceptor Support
Sep 22, 2014 6:30:25 PM org.atmosphere.cpr.AtmosphereFramework newAInterceptor
INFO: 	org.atmosphere.interceptor.CacheHeadersInterceptor : Default Response's Headers Interceptor
Sep 22, 2014 6:30:25 PM org.atmosphere.cpr.AtmosphereFramework newAInterceptor
INFO: 	org.atmosphere.interceptor.PaddingAtmosphereInterceptor : Browser Padding Interceptor Support
Sep 22, 2014 6:30:25 PM org.atmosphere.cpr.AtmosphereFramework newAInterceptor
INFO: 	org.atmosphere.interceptor.AndroidAtmosphereInterceptor : Android Interceptor Support
Sep 22, 2014 6:30:25 PM org.atmosphere.cpr.AtmosphereFramework newAInterceptor
INFO: 	org.atmosphere.interceptor.HeartbeatInterceptor : Heartbeat Interceptor Support
Sep 22, 2014 6:30:25 PM org.atmosphere.cpr.AtmosphereFramework newAInterceptor
INFO: 	org.atmosphere.interceptor.SSEAtmosphereInterceptor : SSE Interceptor Support
Sep 22, 2014 6:30:25 PM org.atmosphere.cpr.AtmosphereFramework newAInterceptor
INFO: 	org.atmosphere.interceptor.JSONPAtmosphereInterceptor : JSONP Interceptor Support
Sep 22, 2014 6:30:25 PM org.atmosphere.cpr.AtmosphereFramework newAInterceptor
INFO: 	org.atmosphere.interceptor.JavaScriptProtocol : Atmosphere JavaScript Protocol
Sep 22, 2014 6:30:25 PM org.atmosphere.cpr.AtmosphereFramework newAInterceptor
INFO: 	org.atmosphere.interceptor.WebSocketMessageSuspendInterceptor : org.atmosphere.interceptor.WebSocketMessageSuspendInterceptor
Sep 22, 2014 6:30:25 PM org.atmosphere.cpr.AtmosphereFramework newAInterceptor
INFO: 	org.atmosphere.interceptor.OnDisconnectInterceptor : Browser disconnection detection
Sep 22, 2014 6:30:25 PM org.atmosphere.cpr.AtmosphereFramework newAInterceptor
INFO: 	org.atmosphere.interceptor.IdleResourceInterceptor : org.atmosphere.interceptor.IdleResourceInterceptor
Sep 22, 2014 6:30:25 PM org.atmosphere.cpr.AtmosphereFramework interceptor
INFO: Installed AtmosphereInterceptor  Track Message Size Interceptor using | with priority BEFORE_DEFAULT 
Sep 22, 2014 6:30:25 PM org.atmosphere.cpr.AtmosphereFramework interceptor
INFO: Installed AtmosphereInterceptor Atmosphere LifeCycle with priority AFTER_DEFAULT 
Sep 22, 2014 6:30:25 PM org.atmosphere.cpr.AtmosphereFramework configureAtmosphereInterceptor
INFO: Set org.atmosphere.cpr.AtmosphereInterceptor.disableDefaults to disable them.
Sep 22, 2014 6:30:25 PM org.atmosphere.cpr.AtmosphereFramework info
INFO: Using EndpointMapper class org.primefaces.push.impl.PushEndpointMapper
Sep 22, 2014 6:30:25 PM org.atmosphere.cpr.AtmosphereFramework info
INFO: Using BroadcasterCache: org.atmosphere.cache.UUIDBroadcasterCache
Sep 22, 2014 6:30:25 PM org.atmosphere.cpr.AtmosphereFramework info
INFO: Default Broadcaster Class: org.atmosphere.cpr.DefaultBroadcaster
Sep 22, 2014 6:30:25 PM org.atmosphere.cpr.AtmosphereFramework info
INFO: Broadcaster Polling Wait Time 100
Sep 22, 2014 6:30:25 PM org.atmosphere.cpr.AtmosphereFramework info
INFO: Shared ExecutorService supported: true
Sep 22, 2014 6:30:25 PM org.atmosphere.cpr.AtmosphereFramework info
INFO: Messaging Thread Pool Size: Unlimited
Sep 22, 2014 6:30:25 PM org.atmosphere.cpr.AtmosphereFramework info
INFO: Async I/O Thread Pool Size: 200
Sep 22, 2014 6:30:25 PM org.atmosphere.cpr.AtmosphereFramework info
INFO: Using BroadcasterFactory: org.atmosphere.cpr.DefaultBroadcasterFactory
Sep 22, 2014 6:30:25 PM org.atmosphere.cpr.AtmosphereFramework info
INFO: Using WebSocketProcessor: org.atmosphere.websocket.DefaultWebSocketProcessor
Sep 22, 2014 6:30:25 PM org.atmosphere.cpr.AtmosphereFramework info
INFO: Invoke AtmosphereInterceptor on WebSocket message true
Sep 22, 2014 6:30:25 PM org.atmosphere.cpr.AtmosphereFramework info
INFO: HttpSession supported: false
Sep 22, 2014 6:30:25 PM org.atmosphere.cpr.AtmosphereFramework info
INFO: Atmosphere is using org.primefaces.push.impl.PushObjectFactory@4e498eaf for dependency injection and object creation
Sep 22, 2014 6:30:25 PM org.atmosphere.cpr.AtmosphereFramework info
INFO: Atmosphere is using async support: org.atmosphere.container.Tomcat7Servlet30SupportWithWebSocket running under container: Apache Tomcat (TomEE)/7.0.55 (1.7.1) using javax.servlet/3.0
Sep 22, 2014 6:30:25 PM org.atmosphere.cpr.AtmosphereFramework info
INFO: Atmosphere Framework 2.2.1 started.
Sep 22, 2014 6:30:25 PM org.atmosphere.cpr.AtmosphereFramework info
INFO: 

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

Sep 22, 2014 6:30:25 PM org.atmosphere.cpr.AtmosphereFramework interceptor
INFO: Installed AtmosphereInterceptor @PushEndpoint Interceptor with priority AFTER_DEFAULT 
...
Sep 22, 2014 6:30:26 PM org.atmosphere.cpr.AtmosphereFramework$4 run
INFO: Latest version of Atmosphere's JavaScript Client 2.2.4
EDIT: Issue # 7469
Last edited by smithh032772 on 23 Sep 2014, 16:29, edited 1 time in total.
Howard

PrimeFaces 6.0, Extensions 6.0.0, Push (Atmosphere 2.4.0)
TomEE+ 1.7.4 (Tomcat 7.0.68), MyFaces Core 2.2.9, JDK8
JUEL 2.2.7 | OmniFaces | EclipseLink-JPA/Derby | Chrome

Java EE 6 Tutorial|NetBeans|Google|Stackoverflow|PrimeFaces|Apache

magsam
Posts: 71
Joined: 18 Jun 2012, 17:43
Location: Bavaria, DE
Contact:

23 Sep 2014, 14:04

I get a similar error. I am using GlassFish Server Open Source Edition 4.1 (13)

Code: Select all

2014-09-23T13:49:15.860+0200|Schwerwiegend: 117998 [http-listener-1(2)] ERROR org.atmosphere.cpr.AsynchronousProcessor - Failed to cancel resource: e549cfa3-2e1d-4151-80ec-c72f7fd93c4d
2014-09-23T13:49:15.862+0200|Schwerwiegend: java.lang.NullPointerException  
But the chat works correct
PrimeFaces 6.1, Extensions 6.1.1 , Mojarra 2.3 , GlassFish Server Open Source Edition 4.1 (build 13) , atmosphere-runtime 2.4.9 , Open Source ERP with Primefaces http://osretail.de/osRetail/

smithh032772
Posts: 6144
Joined: 10 Sep 2011, 21:10

23 Sep 2014, 14:16

I should have mentioned the same earlier, messages are pushed to client, and the error is on the server.
Howard

PrimeFaces 6.0, Extensions 6.0.0, Push (Atmosphere 2.4.0)
TomEE+ 1.7.4 (Tomcat 7.0.68), MyFaces Core 2.2.9, JDK8
JUEL 2.2.7 | OmniFaces | EclipseLink-JPA/Derby | Chrome

Java EE 6 Tutorial|NetBeans|Google|Stackoverflow|PrimeFaces|Apache

smithh032772
Posts: 6144
Joined: 10 Sep 2011, 21:10

23 Sep 2014, 16:25

SOLUTION: I added empty @OnOpen and @OnClose methods to my PrimeFaces Push resource class, and now I don't get errors on the server.

Code: Select all

@PushEndpoint("/{usernameAndSessionId}")
@Singleton
public class NotifyResource {
         
    @OnMessage(encoders = {JSONEncoder.class})
    public FacesMessage onMessage(FacesMessage message) {
        return message;
    }
    
    @OnOpen
    public void onOpen(RemoteEndpoint r, EventBus eventBus) {
    }
 
    @OnClose
    public void onClose(RemoteEndpoint r, EventBus eventBus) {
    }
}
Howard

PrimeFaces 6.0, Extensions 6.0.0, Push (Atmosphere 2.4.0)
TomEE+ 1.7.4 (Tomcat 7.0.68), MyFaces Core 2.2.9, JDK8
JUEL 2.2.7 | OmniFaces | EclipseLink-JPA/Derby | Chrome

Java EE 6 Tutorial|NetBeans|Google|Stackoverflow|PrimeFaces|Apache

magsam
Posts: 71
Joined: 18 Jun 2012, 17:43
Location: Bavaria, DE
Contact:

24 Sep 2014, 11:38

Thank you. I can confirm your solution
PrimeFaces 6.1, Extensions 6.1.1 , Mojarra 2.3 , GlassFish Server Open Source Edition 4.1 (build 13) , atmosphere-runtime 2.4.9 , Open Source ERP with Primefaces http://osretail.de/osRetail/

smithh032772
Posts: 6144
Joined: 10 Sep 2011, 21:10

24 Sep 2014, 13:19

Issue # 7469 is fixed, so this should be fixed in PrimeFaces 5.1 RC2 or Final release. :)
Howard

PrimeFaces 6.0, Extensions 6.0.0, Push (Atmosphere 2.4.0)
TomEE+ 1.7.4 (Tomcat 7.0.68), MyFaces Core 2.2.9, JDK8
JUEL 2.2.7 | OmniFaces | EclipseLink-JPA/Derby | Chrome

Java EE 6 Tutorial|NetBeans|Google|Stackoverflow|PrimeFaces|Apache

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 55 guests