Support Article

AtmosphereRequest ClassCastException invoking Async listeners.

SA-36793

Summary



The user is getting ClassCastException in the Systemout.log file of the Websphere instance.


Error Messages



[4/9/17 14:27:14:429 CEST] 00000146 SystemOut O 2017-04-09 14:27:14,428 [ ] [ STANDARD] [ ] [ ] (tmosphere.AtmospherePushEngine) INFO - Async support implementation used by framework: org.atmosphere.container.Servlet30CometSupport

[4/9/17 7:37:00:719 CEST] 00014437 async W com.ibm.ws.webcontainer.async.ListenerHelper _invokeAsyncErrorHandling SRVE8106W: An exception occurred invoking the async listeners.

java.lang.ClassCastException: com.ibm.ws.cache.servlet.CacheProxyRequest incompatible with org.atmosphere.cpr.AtmosphereRequest

at org.atmosphere.container.Servlet30CometSupport$CometListener.onTimeout(Servlet30CometSupport.java:188)

at com.ibm.ws.webcontainer.async.AsyncListenerEntry.invokeOnTimeout(AsyncListenerEntry.java:74)

at com.ibm.ws.webcontainer.async.ListenerHelper._invokeAsyncErrorHandling(ListenerHelper.java:182)

at com.ibm.ws.webcontainer.async.ListenerHelper.invokeAsyncErrorHandling(ListenerHelper.java:129)

at com.ibm.ws.webcontainer.async.AsyncTimeoutRunnable.run(AsyncTimeoutRunnable.java:28)

at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:483)

at java.util.concurrent.FutureTask.run(FutureTask.java:274)

at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:190)

at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1157)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:627)

at java.lang.Thread.run(Thread.java:863)


Steps to Reproduce



It happens al time throughout the day


Root Cause



Setting for "Enable servlet and command caching" (from Webspehere Console > Server > Container Management) was enabled for few instances where this "ClassCastException" was noticed in the logs


Resolution



Perform the following local-change:

Disable the
"Enable servlet and command caching" (from Webspehere Console > Server > Container Management)

Published April 20, 2017 - Updated April 28, 2017

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.