异常恢复继续:dwr glassfish

时间:2012-08-22 11:27:44

标签: spring glassfish dwr reverse-ajax

我正在使用dwr3spring mvc进行反向ajax。在tomcat(version 6)中部署应用程序时,一切正常。但是我在glassfish(版本3.1)中运行相同的应用程序时遇到以下错误。任何帮助都非常感谢。

我得到的错误;

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)

1 个答案:

答案 0 :(得分:1)

将此添加到POM中。这应该可以解决问题

<dependency>
  <groupId>com.sun.grizzly</groupId>
  <artifactId>grizzly-continuation</artifactId>
 <version>1.9.0-RC1</version>
</dependency>

后面的jar文件包含安装了Grizzly版本的Grizzly类,并且将使DWR适用于所有GlassFish版本(9.1,9.1 ur1,Sailfin,OpenESB)。