I am trying to migrate an existing WebApp from PrimeFaces 4 to PrimeFaces 6 and everything is fine except for the PUSH components.
I have migrated the code exactly as the UserGuide says I should do and have even combed the Atmosphere site for clues as to what might be going wrong.
This is, however, not the point of this post: the PrimeFaces PUSH showcase simply refuses to work with Chrome 52 and 53 but functions flawlessly with Firefox.
This is relevant because it tells me that migrating to the new PrimeFaces PUSH is not likely to work regardless of what I do, indeed using various Atmosphere parameters and ensuring the PrimeFaces PUSH servlet loads on startup (which it needs to do otherwise all you see are NPE's) still does not get any messages sent to the browser. I know this because none of my PushEndPoint classes are being called.
PrimeFaces PUSH Showcase
- andyba
- Expert Member
- Posts: 2473
- Joined: 31 Mar 2011, 16:27
- Location: Steinfeld, near Bremen/Osnabrück, DE
- Contact:
PF 4.x (Elite versions), PF 5, Pf 5.1, PF 6.0
Glassfish 4.1, Mojarra 2.x, Java 8, Payara 4.1.1.
If you haven't read the forum rules read them now
Glassfish 4.1, Mojarra 2.x, Java 8, Payara 4.1.1.
If you haven't read the forum rules read them now
-
- PrimeFaces Core Developer
- Posts: 3979
- Joined: 03 Dec 2010, 14:11
- Location: Bavaria, DE
- Contact:
Feel free to help to analyze the problem and provide tickets + PRs if possible
Thomas Andraschko
PrimeFaces | PrimeFaces Extensions
Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE
Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko
PrimeFaces | PrimeFaces Extensions
Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE
Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko
- andyba
- Expert Member
- Posts: 2473
- Joined: 31 Mar 2011, 16:27
- Location: Steinfeld, near Bremen/Osnabrück, DE
- Contact:
Hmm, I was hoping you might be able to help me outtandraschko wrote:Feel free to help to analyze the problem and provide tickets + PRs if possible
PF 4.x (Elite versions), PF 5, Pf 5.1, PF 6.0
Glassfish 4.1, Mojarra 2.x, Java 8, Payara 4.1.1.
If you haven't read the forum rules read them now
Glassfish 4.1, Mojarra 2.x, Java 8, Payara 4.1.1.
If you haven't read the forum rules read them now
- andyba
- Expert Member
- Posts: 2473
- Joined: 31 Mar 2011, 16:27
- Location: Steinfeld, near Bremen/Osnabrück, DE
- Contact:
Well the first thing I notice is that in Chome 53 no WebSocket is opened to the server. There is no error message and no attempt to establish a connection to the server made at all.
In Firefox the WebSocket cannot establish a connection and falls back to long polling. After that I see "syntax error counter:2:1"
Edit: after about 2 minutes or so Chrome does attempt a fallback to long polling, things still are not working though.
In Firefox the WebSocket cannot establish a connection and falls back to long polling. After that I see "syntax error counter:2:1"
Edit: after about 2 minutes or so Chrome does attempt a fallback to long polling, things still are not working though.
PF 4.x (Elite versions), PF 5, Pf 5.1, PF 6.0
Glassfish 4.1, Mojarra 2.x, Java 8, Payara 4.1.1.
If you haven't read the forum rules read them now
Glassfish 4.1, Mojarra 2.x, Java 8, Payara 4.1.1.
If you haven't read the forum rules read them now
- andyba
- Expert Member
- Posts: 2473
- Joined: 31 Mar 2011, 16:27
- Location: Steinfeld, near Bremen/Osnabrück, DE
- Contact:
As far as my migrated app is concerned things look a little better.
Here the websocket is created and connects to the server.
Edit: The @PushEndpoint instances are created but an @OnMessage call is never made.
I have checked the path use, it matches the one used for the equivalent publish.
Btw, my sig is accurate as far as PF version and application server.
Here the websocket is created and connects to the server.
Edit: The @PushEndpoint instances are created but an @OnMessage call is never made.
I have checked the path use, it matches the one used for the equivalent publish.
Btw, my sig is accurate as far as PF version and application server.
PF 4.x (Elite versions), PF 5, Pf 5.1, PF 6.0
Glassfish 4.1, Mojarra 2.x, Java 8, Payara 4.1.1.
If you haven't read the forum rules read them now
Glassfish 4.1, Mojarra 2.x, Java 8, Payara 4.1.1.
If you haven't read the forum rules read them now
- andyba
- Expert Member
- Posts: 2473
- Joined: 31 Mar 2011, 16:27
- Location: Steinfeld, near Bremen/Osnabrück, DE
- Contact:
I have checked the PrimeFaces Showcase web.xml to compare it to mine and noticed
Which doesn't look right unless you are using a proxy to map incoming requests from primefaces:80 to the localhost:8080
Otherwise everything is as it should be.
I suspect that some of the problems with the Showcase are down to running on Jetty but that might simply be bias on my part.
Code: Select all
<context-param>
<param-name>primefaces.PUSH_SERVER_URL</param-name>
<param-value>http://127.0.0.1:8080</param-value>
</context-param>
Otherwise everything is as it should be.
I suspect that some of the problems with the Showcase are down to running on Jetty but that might simply be bias on my part.
PF 4.x (Elite versions), PF 5, Pf 5.1, PF 6.0
Glassfish 4.1, Mojarra 2.x, Java 8, Payara 4.1.1.
If you haven't read the forum rules read them now
Glassfish 4.1, Mojarra 2.x, Java 8, Payara 4.1.1.
If you haven't read the forum rules read them now
- andyba
- Expert Member
- Posts: 2473
- Joined: 31 Mar 2011, 16:27
- Location: Steinfeld, near Bremen/Osnabrück, DE
- Contact:
I have managed to reach the stage with the migrated app that I see the following Exceptions
followed by
The WELD message is a known problem and is easily cured (it is actually a side effect of deploy-on-save in my Dev project.
Code: Select all
An exception or error occurred in the container during the request processing
java.lang.NullPointerException
at org.glassfish.grizzly.http.util.HttpCodecUtils.parseHost(HttpCodecUtils.java:69)
at org.glassfish.grizzly.http.HttpRequestPacket.doParseHostHeader(HttpRequestPacket.java:723)
at org.glassfish.grizzly.http.HttpRequestPacket.parseHostHeader(HttpRequestPacket.java:717)
at org.glassfish.grizzly.http.HttpRequestPacket.serverName(HttpRequestPacket.java:283)
at org.glassfish.grizzly.http.server.Request.getServerName(Request.java:1246)
at org.apache.catalina.connector.Request.getServerName(Request.java:1882)
at org.apache.catalina.connector.RequestFacade.getServerName(RequestFacade.java:535)
at com.sun.enterprise.web.connector.coyote.PECoyoteConnector.requestEndEvent(PECoyoteConnector.java:1307)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:422)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:282)
at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167)
at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:201)
at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:175)
at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:561)
at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:565)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545)
at java.lang.Thread.run(Thread.java:745)
Code: Select all
WARN: WELD-000714: HttpContextLifecycle guard leak detected. The Servlet container is not fully compliant. The value was 1
java.lang.IllegalStateException: WELD-000335: Context is already active
at org.jboss.weld.context.http.LazyHttpConversationContextImpl.activate(LazyHttpConversationContextImpl.java:57)
at org.jboss.weld.servlet.ConversationContextActivator.activate(ConversationContextActivator.java:107)
at org.jboss.weld.servlet.ConversationContextActivator.activateConversationContext(ConversationContextActivator.java:93)
at org.jboss.weld.servlet.HttpContextLifecycle.requestInitialized(HttpContextLifecycle.java:225)
at org.jboss.weld.servlet.WeldInitialListener.requestInitialized(WeldInitialListener.java:156)
at org.apache.catalina.core.StandardContext.fireRequestInitializedEvent(StandardContext.java:5257)
at org.apache.catalina.core.StandardHostValve.preInvoke(StandardHostValve.java:655)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:166)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:415)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:282)
at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167)
at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:201)
at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:175)
at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:561)
at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:565)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545)
at java.lang.Thread.run(Thread.java:745)
PF 4.x (Elite versions), PF 5, Pf 5.1, PF 6.0
Glassfish 4.1, Mojarra 2.x, Java 8, Payara 4.1.1.
If you haven't read the forum rules read them now
Glassfish 4.1, Mojarra 2.x, Java 8, Payara 4.1.1.
If you haven't read the forum rules read them now
- andyba
- Expert Member
- Posts: 2473
- Joined: 31 Mar 2011, 16:27
- Location: Steinfeld, near Bremen/Osnabrück, DE
- Contact:
This is weird, I have changed nothing at all since the Exceptions I saw above.
All I have done differently is to start Glassfish in debug mode so I could follow the publish thread and it started working, even with Chrome 53.
Just to make sure I wasn't dreaming I stopped Glassfish, rebuilt the project from scratch and redeployed it using Glassfish in normal mode.
Edit: It worked after a simple restart in normal mode, after a clean+build+deploy it stopped working.
Something must be going wrong when Atmosphere is being configured, it would appear to be a race condition that doesn't break things when Glassfish is running in debug mode but more often than not does break things when in normal mode.
All I have done differently is to start Glassfish in debug mode so I could follow the publish thread and it started working, even with Chrome 53.
Just to make sure I wasn't dreaming I stopped Glassfish, rebuilt the project from scratch and redeployed it using Glassfish in normal mode.
Edit: It worked after a simple restart in normal mode, after a clean+build+deploy it stopped working.
Something must be going wrong when Atmosphere is being configured, it would appear to be a race condition that doesn't break things when Glassfish is running in debug mode but more often than not does break things when in normal mode.
PF 4.x (Elite versions), PF 5, Pf 5.1, PF 6.0
Glassfish 4.1, Mojarra 2.x, Java 8, Payara 4.1.1.
If you haven't read the forum rules read them now
Glassfish 4.1, Mojarra 2.x, Java 8, Payara 4.1.1.
If you haven't read the forum rules read them now
-
- PrimeFaces Core Developer
- Posts: 3979
- Joined: 03 Dec 2010, 14:11
- Location: Bavaria, DE
- Contact:
Did you try to upgrade atmosphere?
Thomas Andraschko
PrimeFaces | PrimeFaces Extensions
Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE
Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko
PrimeFaces | PrimeFaces Extensions
Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE
Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko
- andyba
- Expert Member
- Posts: 2473
- Joined: 31 Mar 2011, 16:27
- Location: Steinfeld, near Bremen/Osnabrück, DE
- Contact:
I am currently using Atmosphere 2.4.5.tandraschko wrote:Did you try to upgrade atmosphere?
The results are still the same, sometimes things work after a deployment, sometimes they don't. This is independent of the mode in which the VM starts.
I have also cleaned the OSGI cache in case there was something that might be causing problems.
In my dev evironment we use in-place deployment.
I am going to try deploying using the admin console to see what happens.
Update: after deploying the war file, the PUSH components worked but Grizzly broke meaning the underlying IO wasn't working.
Code: Select all
Schwerwiegend: Exception in thread "glassfish-web-async-thread-1"
Schwerwiegend: java.lang.NullPointerException
at org.apache.catalina.connector.InputBuffer$ReadHandlerImpl.processAllDataRead(InputBuffer.java:535)
at org.apache.catalina.connector.InputBuffer$ReadHandlerImpl.access$600(InputBuffer.java:439)
at org.apache.catalina.connector.InputBuffer$ReadHandlerImpl$2.run(InputBuffer.java:518)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
PF 4.x (Elite versions), PF 5, Pf 5.1, PF 6.0
Glassfish 4.1, Mojarra 2.x, Java 8, Payara 4.1.1.
If you haven't read the forum rules read them now
Glassfish 4.1, Mojarra 2.x, Java 8, Payara 4.1.1.
If you haven't read the forum rules read them now
-
- Information
-
Who is online
Users browsing this forum: No registered users and 39 guests