PF5.2 and push OK, 5.3 do not work anymore !

UI Components for JSF
fxliagre
Posts: 12
Joined: 20 Dec 2012, 15:26

23 Oct 2015, 17:46

I tried to replace PF and atmosphere jar from 5.2/2.3.0-RC6 by 5.3/2.4.0-RC6 and nothing is working anymore! :(
Push calls crashes with a NPE on
EventBus eventBus = EventBusFactory.getDefault().eventBus();
Other posts on this topic seems unrelevant (no CDI in my case, just Faces Managed beans)

Any idea of what could cause this? (going back to previous jars immediately restores the Push facilities...)

Miguel Cubells
Posts: 99
Joined: 25 Feb 2015, 11:02

27 Oct 2015, 09:10

We are facing similar issues.

Just upgrading from 5.2/2.3.5 to 5.3/2.4.0-RC6 , -without any code change-, stops Push mechanism from working at all.

We had to revert to 5.2/2.3.5, as we don't have time to investigate the root cause at the moment.
PrimeFaces 6.1 / PF Extensions 6.1.1 / Atmosphere 2.4.3
Apache Mojarra 2.2.13+
WildFly 10.1.0.Final

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

27 Oct 2015, 14:30

Can you reply with a stacktrace of the NPE?
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

Miguel Cubells
Posts: 99
Joined: 25 Feb 2015, 11:02

28 Oct 2015, 04:14

In our case, there are no Null Pointer or stack trace Exceptions.
Everything in the log seems to be fine... but the Push Events just doesn't work....

Rolling back to 5.2/2.3.4 fixes the problem.
We will try to do some investigation if we have time...
PrimeFaces 6.1 / PF Extensions 6.1.1 / Atmosphere 2.4.3
Apache Mojarra 2.2.13+
WildFly 10.1.0.Final

UXMichael
Posts: 1
Joined: 02 Nov 2015, 09:30

02 Nov 2015, 09:32

At me too. @OnOpen and @onClose EventBus is null. My workaround is to get the eventbus from the factory.

Greetings

paulkeogh
Posts: 45
Joined: 04 Apr 2013, 23:00
Location: Dublin, Ireland
Contact:

05 Nov 2015, 13:03

It doesn't work for me either. Here is the ST I get;

Code: Select all

10:59:50,139 WARN  [org.atmosphere.websocket.DefaultWebSocketProcessor] (default task-27) Failed invoking AtmosphereFramework.doCometSupport(): java.lang.IncompatibleClassChangeError: Found class org.atmosphere.cpr.AtmosphereRequest, but interface was expected
	at org.primefaces.push.impl.RemoteEndpointImpl.<init>(RemoteEndpointImpl.java:38) [primefaces-5.3.jar:5.3]
	at org.primefaces.push.impl.PushEndpointHandlerProxy.onRequest(PushEndpointHandlerProxy.java:153) [primefaces-5.3.jar:5.3]
	at org.atmosphere.cpr.AsynchronousProcessor.action(AsynchronousProcessor.java:206) [atmosphere-runtime-2.3.0.jar:2.3.0]
	at org.atmosphere.cpr.AsynchronousProcessor.suspended(AsynchronousProcessor.java:108) [atmosphere-runtime-2.3.0.jar:2.3.0]
	at org.atmosphere.container.Servlet30CometSupport.service(Servlet30CometSupport.java:66) [atmosphere-runtime-2.3.0.jar:2.3.0]
	at org.atmosphere.cpr.AtmosphereFramework.doCometSupport(AtmosphereFramework.java:2242) [atmosphere-runtime-2.3.0.jar:2.3.0]
	at org.atmosphere.websocket.DefaultWebSocketProcessor.dispatch(DefaultWebSocketProcessor.java:567) [atmosphere-runtime-2.3.0.jar:2.3.0]
	at org.atmosphere.websocket.DefaultWebSocketProcessor.open(DefaultWebSocketProcessor.java:221) [atmosphere-runtime-2.3.0.jar:2.3.0]
	at org.atmosphere.container.JSR356Endpoint.onOpen(JSR356Endpoint.java:222) [atmosphere-runtime-2.3.0.jar:2.3.0]
	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_60]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_60]
	at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_60]

10:59:50,139 WARN  [org.atmosphere.websocket.DefaultWebSocketProcessor] (default task-28) Failed invoking AtmosphereFramework.doCometSupport(): java.lang.IncompatibleClassChangeError: Found class org.atmosphere.cpr.AtmosphereRequest, but interface was expected
	at org.primefaces.push.impl.RemoteEndpointImpl.<init>(RemoteEndpointImpl.java:38) [primefaces-5.3.jar:5.3]
	at org.primefaces.push.impl.PushEndpointHandlerProxy.onRequest(PushEndpointHandlerProxy.java:153) [primefaces-5.3.jar:5.3]
	at org.atmosphere.cpr.AsynchronousProcessor.action(AsynchronousProcessor.java:206) [atmosphere-runtime-2.3.0.jar:2.3.0]
	at org.atmosphere.cpr.AsynchronousProcessor.suspended(AsynchronousProcessor.java:108) [atmosphere-runtime-2.3.0.jar:2.3.0]
	at org.atmosphere.container.Servlet30CometSupport.service(Servlet30CometSupport.java:66) [atmosphere-runtime-2.3.0.jar:2.3.0]
	at org.atmosphere.cpr.AtmosphereFramework.doCometSupport(AtmosphereFramework.java:2242) [atmosphere-runtime-2.3.0.jar:2.3.0]
	at org.atmosphere.websocket.DefaultWebSocketProcessor.dispatch(DefaultWebSocketProcessor.java:567) [atmosphere-runtime-2.3.0.jar:2.3.0]
	at org.atmosphere.websocket.DefaultWebSocketProcessor.open(DefaultWebSocketProcessor.java:221) [atmosphere-runtime-2.3.0.jar:2.3.0]
	at org.atmosphere.container.JSR356Endpoint.onOpen(JSR356Endpoint.java:222) [atmosphere-runtime-2.3.0.jar:2.3.0]
	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_60]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_60]
	at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_60]

10:59:50,142 WARN  [org.atmosphere.websocket.protocol.SimpleHttpProtocol] (default task-27) java.lang.IncompatibleClassChangeError: Found class org.atmosphere.cpr.AtmosphereRequest, but interface was expected. Unable to deliver the websocket messages to installed component. Status 500 Message Server Error
10:59:50,143 WARN  [org.atmosphere.websocket.protocol.SimpleHttpProtocol] (default task-28) java.lang.IncompatibleClassChangeError: Found class org.atmosphere.cpr.AtmosphereRequest, but interface was expected. Unable to deliver the websocket messages to installed component. Status 500 Message Server Error

Primefaces 6.2 Atmosphere 2.5
Red Hat Developer Studio 12.9 GA
Wildfly 14
Linux RHEL 7/CentOS 7

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

05 Nov 2015, 15:48

paulkeogh wrote:It doesn't work for me either...
Hmmm, you are using JBoss AS7.1 'and' Wildfly 8.2, so what does your web.xml look like for both AS7.1 and Wildfly 8.2?

Code: Select all

Primefaces 5.2 Atmosphere 2.3
JBoss Developer Studio 9.0 GA
JBoss AS 7.1/Wildfly 8.2
JBoss Forge 1.4.4,2.15
Linux RHEL 6/CentOS 6
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

paulkeogh
Posts: 45
Joined: 04 Apr 2013, 23:00
Location: Dublin, Ireland
Contact:

06 Nov 2015, 11:29

I use Maven profiles to support a range of app servers.

Anyway, good news is that Primefaces 5.3 seems to work well with the 2.4 release.
Primefaces 6.2 Atmosphere 2.5
Red Hat Developer Studio 12.9 GA
Wildfly 14
Linux RHEL 7/CentOS 7

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

06 Nov 2015, 17:16

Okay good, glad to hear that.
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

Miguel Cubells
Posts: 99
Joined: 25 Feb 2015, 11:02

10 Nov 2015, 07:23

In my case, even upgrading the the 2.4.0 release version, we still suffer the same problem as mentioned by UXMichael.
In the @OnOpen method, the EventBus parameter is NULL. That was the root cause of all our problems.

Getting the EventBus inside the @OnOpen method with the Factory (and removing it as a parameter method) works fine, as a workaround:

Code: Select all

    @OnOpen
    public void onOpen(RemoteEndpoint r) {
    	EventBus eventBus = EventBusFactory.getDefault().eventBus();
        ...
    }
But definitely there must be some problem with the PF 5.3 - Atmosphere 2.4.x integration.
PrimeFaces 6.1 / PF Extensions 6.1.1 / Atmosphere 2.4.3
Apache Mojarra 2.2.13+
WildFly 10.1.0.Final

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 26 guests