I'm using dwr3
for reverse ajax with spring mvc
. Everything works fine when the application is deployed in tomcat(version 6)
. But I'm getting the following error when running the same application in glassfish (version 3.1). Any help is highly appreciated.
the error i'm getting;
INFO: [ERROR] [Thread-50 05:00:02] (GrizzlyContinuationSleeper.java:wakeUp:167) Exception resuming continuation:
java.lang.NullPointerException
at org.directwebremoting.util.Continuation.resume(Continuation.java:108)
at org.directwebremoting.server.grizzly.GrizzlyContinuationSleeper.wakeUp(GrizzlyContinuationSleeper.java:157)
at org.directwebremoting.impl.OutputAlarm$AlarmScriptConduit$1.run(OutputAlarm.java:103)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
INFO: [ERROR] [Thread-50 05:00:02] (GrizzlyContinuationSleeper.java:wakeUp:167) Exception resuming continuation:
java.lang.NullPointerException
at org.directwebremoting.util.Continuation.resume(Continuation.java:108)
at org.directwebremoting.server.grizzly.GrizzlyContinuationSleeper.wakeUp(GrizzlyContinuationSleeper.java:157)
at org.directwebremoting.impl.OutputAlarm$AlarmScriptConduit$1.run(OutputAlarm.java:103)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Add this to the POM.This should do the trick
<dependency>
<groupId>com.sun.grizzly</groupId>
<artifactId>grizzly-continuation</artifactId>
<version>1.9.0-RC1</version>
</dependency>
The later jar file contains the Grizzly's classes that detect with Grizzly version is installed and will make DWR works with all GlassFish version (9.1, 9.1 ur1, Sailfin, OpenESB).