Closed magsam closed 8 years ago
Having the same trouble with atmosphere-runtime 2.4.0-RC6, PrimeFaces 5.3, Mojarra 2.2.12 , GlassFish Server Open Source Edition 4.1.1 ,Omnifaces 2.1,rewrite-servlet 2.0.12, rewrite-integration-faces-2.0.12
Workaround
<init-param>
<param-name>org.atmosphere.cpr.asyncSupport</param-name>
<param-value>org.atmosphere.container.GlassFishServ30WebSocketSupport</param-value>
</init-param>
now I get this message when I login to the chat
2015-10-28T12:31:45.648+0100|Schwerwiegend: [http-listener-1(3)] ERROR org.atmosphere.config.managed.Invoker - 2015-10-28T12:31:45.649+0100|Schwerwiegend: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497)
@magsam That's not the real error, you should have another exception in the log. Anyway I've commited more stuff for GlassFish that will be part of 2.4.0 and 2.5.6. Use SNAPSHOT right now or the workaround described above.
I installed the Snapshot. I get a second message (first: Schwerwiegend: java.lang.reflect.InvocationTargetException) and then Caused by: java.lang.NullPointerException at de.osretail.basis.ChatResource.onOpen(ChatResource.java:35)
@OnOpen
public void onOpen(RemoteEndpoint r, EventBus eventBus) {
logger.info("OnOpen {}", r);
line 35: eventBus.publish(room + "/*", new Message(String.format("%s has entered the room '%s'", username, room), true));
}
Here the log maybe it will help you
INFO de.osretail.basis.ChatResource - OnOpen RemoteEndpointImpl{request=AtmosphereRequest{ method=GET contextPath=/osRetail servletPath=/primepush pathInfo=/{room}/Handel_Versand requestURI=/osRetail/primepush/%7Broom%7D/Handel_Versand requestURL=http://localhost:8080/osRetail/primepush/%7Broom%7D/Handel_Versand AtmosphereResource UUID=e5793fbd-280f-4b97-9f7a-da487346686a destroyable=true}, uri='/osRetail/primepush/%7Broom%7D/Handel_Versand', status=Status{status=OPEN}}
I get this warning
WARN org.atmosphere.cpr.AtmosphereFramework - org.primefaces.push.impl.PushEndpointMapper is not a framework service that could be installed
@magsam Try it now :-)
pity no change. This is the Snapshot /osretailPrime/target/osretail-0.1.0-SNAPSHOT/WEB-INF/lib/atmosphere-runtime-2.4.0-20151028.192414-58.jar
OK for me it works with the 'showase' project so I won't work anymore on this issue unless you send me a test that reproduce the issue. At last just use the workaround it should work. Thanks.
The bug is caused ChatResource.onOpen and it is know but no solution till now
INFO de.osretail.basis.ChatResource - OnOpen eventBus{}null
eventBus is null so we get nullpointer
thank you for your help
regrads from Bavaria
Peter
@magsam This sample works for me, so not sure what is the issue. Try to isolate a test case.
in the showcase ChatResource there is missing these codelines @Inject private EventBus eventBus; @Inject private RemoteEndpoint endpoint;
now it works
When JSR 356 is enabled, all 2.x version are all broken.
atmosphere-runtime 2.4.0-RC6, PrimeFaces 5.3, Mojarra 2.2.11 , GlassFish Server Open Source Edition 4.1 (build 13) , Extensions 3.2.0 ,Omnifaces 2.1, Open Source ERP with Primefaces http://osretail.de/osRetail/