java.lang.ClassCastException: model.HazelcastUser cannot be cast to model.HazelcastUser at persistence.HazelcastController.setIsOnline(HazelcastController.java:41) --> WHICH IS HazelcastUser currentUser = users.get(idUser);


Solutions on the web

Solution icon of googlegroups
via Google Groups by Chris Roffler, 1 year ago
model.HazelcastUser cannot be cast to model.HazelcastUser at persistence.HazelcastController.setIsOnline(HazelcastController.java:41) --> WHICH IS HazelcastUser currentUser = users.get(idUser);

Stack trace

java.lang.ClassCastException: model.HazelcastUser cannot be cast to model.HazelcastUser
     at persistence.HazelcastController.setIsOnline(HazelcastController.java:41) --> WHICH IS     HazelcastUser currentUser = users.get(idUser);
	at control.chat.HazelcastChatController.connectChat(HazelcastChatController.java:12)
	at action.ConnectChatAction.doAction(ConnectChatAction.java:30)
	at action.controller.ActionController.executeAction(ActionController.java:53)
	at handler.CChatHandler.serviceDoPost(CChatHandler.java:82)
	at handler.CChatHandler.onRequest(CChatHandler.java:40)
	at org.atmosphere.cpr.AsynchronousProcessor.action(AsynchronousProcessor.java:254)
	at org.atmosphere.cpr.AsynchronousProcessor.suspended(AsynchronousProcessor.java:164)
	at org.atmosphere.container.Jetty9AsyncSupportWithWebSocket.service(Jetty9AsyncSupportWithWebSocket.java:127)
	at org.atmosphere.cpr.AtmosphereFramework.doCometSupport(AtmosphereFramework.java:1335)
	at org.atmosphere.websocket.DefaultWebSocketProcessor.dispatch(DefaultWebSocketProcessor.java:259)
	at org.atmosphere.websocket.DefaultWebSocketProcessor$2.run(DefaultWebSocketProcessor.java:209)
	at org.atmosphere.util.VoidExecutorService.execute(VoidExecutorService.java:101)
	at org.atmosphere.websocket.DefaultWebSocketProcessor.dispatch(DefaultWebSocketProcessor.java:204)
	at org.atmosphere.websocket.DefaultWebSocketProcessor.invokeWebSocketProtocol(DefaultWebSocketProcessor.java:180)
	at org.atmosphere.container.Jetty9WebSocketHandler.onWebSocketText(Jetty9WebSocketHandler.java:74)
	at org.eclipse.jetty.websocket.core.io.event.ListenerEventDriver.onTextMessage(ListenerEventDriver.java:117)
	at org.eclipse.jetty.websocket.core.io.message.SimpleTextMessage.messageComplete(SimpleTextMessage.java:69)
	at org.eclipse.jetty.websocket.core.io.event.ListenerEventDriver.onTextFrame(ListenerEventDriver.java:109)
	at org.eclipse.jetty.websocket.core.io.event.EventDriver.incoming(EventDriver.java:147)
	at org.eclipse.jetty.websocket.core.io.WebSocketSession.incoming(WebSocketSession.java:124)
	at org.eclipse.jetty.websocket.core.protocol.Parser.notifyFrame(Parser.java:189)
	at org.eclipse.jetty.websocket.core.protocol.Parser.parse(Parser.java:224)
	at org.eclipse.jetty.websocket.core.io.AbstractWebSocketConnection.read(AbstractWebSocketConnection.java:377)
	at org.eclipse.jetty.websocket.core.io.AbstractWebSocketConnection.onFillable(AbstractWebSocketConnection.java:287)
	at org.eclipse.jetty.io.AbstractConnection$1.onCompleted(AbstractConnection.java:80)
	at org.eclipse.jetty.io.AbstractConnection$1.onCompleted(AbstractConnection.java:63)
	at org.eclipse.jetty.util.ExecutorCallback$1.run(ExecutorCallback.java:32)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:595)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:526)
	at java.lang.Thread.run(Thread.java:722)

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

You are the first who have seen this exception. Write a tip to help other users and build your expert profile.