DWR 3.0.RC2 / Jetty 9.2.3 Broken reflection

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

DWR 3.0.RC2 / Jetty 9.2.3 Broken reflection

Kevin Shaw
Hi,

We are currently developing an application using DWR 3.0.RC2 deployed to Tomcat, in which DWR is configured and working as expected. We are considering switching to use Jetty, and I'm working on the migration process. However, I'm encountering exceptions on the server which are causing DWR to not work, and was wondering if anyone had encountered this or had suggestions (in case I missed some configuration, etc.

The application loads and launches. When browsed to, we get an error in the Browser console, and DWR data is not pushed when expected. The Server logs show stacktraces during each request with a DWR push.

The current deployment is on Tomcat 7.0.21, and we are trying to move to Jetty 9.2.3.v20140905. Can someone possibly provide some pointers?

Jetty Configuration:
 100% default (is freshly downloaded for this use), except ran java -jar start.jar --add-to-startd=https to enable HTTPS.

Relevant web.xml configuration:
<servlet> <description>Direct Web Remoting Servlet</description> <display-name>DWR Servlet</display-name> <servlet-name>dwr-invoker</servlet-name> <servlet-class>org.directwebremoting.servlet.DwrServlet</servlet-class> <!-- We're currently using Java annotations instead of a separate dwr.xml config file. --> <init-param> <!-- The "classes" servlet parameter must provide a comma-separated list of the fully-qualified class names of all annotated classes to be used with DWR. --> <param-name>classes</param-name> <param-value> org.ourdomain.ourapp.ApplicationDWR, org.ourdomain.ourapp.DataImportDWR </param-value> </init-param> <!-- Remove this unless you want to use active reverse ajax --> <init-param> <param-name>activeReverseAjaxEnabled</param-name> <param-value>true</param-value> </init-param> <!-- By default DWR creates application scope objects when they are first used. This creates them when the app-server is started --> <init-param> <param-name>initApplicationScopeCreatorsAtStartup</param-name> <param-value>true</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>dwr-invoker</servlet-name> <url-pattern>/dwr/*</url-pattern> </servlet-mapping>

Errors:
Client:
Error:
Object {name: "dwr.engine.missingData", message: "No data received from server"}
Server:
13:12:09,621 ERROR JettyContinuationSleeper:181 - Broken reflection
java.lang.NullPointerException
        at org.directwebremoting.util.Continuation.resume(Continuation.java:107)

        at org.directwebremoting.server.jetty.JettyContinuationSleeper.wakeUp(Je
ttyContinuationSleeper.java:177)
        at org.directwebremoting.impl.TimedAlarm$1.run(TimedAlarm.java:46)
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.
access$201(Unknown Source)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.
run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
Reply | Threaded
Open this post in threaded view
|

Re: DWR 3.0.RC2 / Jetty 9.2.3 Broken reflection

david@butterdev.com
Try the latest CI build and let me know if you see the problem.  I am pretty sure I fixed this awhile back.  https://directwebremoting.atlassian.net/browse/DWR-606?jql=text%20~%20%22jetty%22

On 09/26/2014 04:00 PM, Kevin Shaw wrote:
Hi,

We are currently developing an application using DWR 3.0.RC2 deployed to Tomcat, in which DWR is configured and working as expected. We are considering switching to use Jetty, and I'm working on the migration process. However, I'm encountering exceptions on the server which are causing DWR to not work, and was wondering if anyone had encountered this or had suggestions (in case I missed some configuration, etc.

The application loads and launches. When browsed to, we get an error in the Browser console, and DWR data is not pushed when expected. The Server logs show stacktraces during each request with a DWR push.

The current deployment is on Tomcat 7.0.21, and we are trying to move to Jetty 9.2.3.v20140905. Can someone possibly provide some pointers?

Jetty Configuration:
 100% default (is freshly downloaded for this use), except ran java -jar start.jar --add-to-startd=https to enable HTTPS.

Relevant web.xml configuration:
<servlet> <description>Direct Web Remoting Servlet</description> <display-name>DWR Servlet</display-name> <servlet-name>dwr-invoker</servlet-name> <servlet-class>org.directwebremoting.servlet.DwrServlet</servlet-class> <!-- We're currently using Java annotations instead of a separate dwr.xml config file. --> <init-param> <!-- The "classes" servlet parameter must provide a comma-separated list of the fully-qualified class names of all annotated classes to be used with DWR. --> <param-name>classes</param-name> <param-value> org.ourdomain.ourapp.ApplicationDWR, org.ourdomain.ourapp.DataImportDWR </param-value> </init-param> <!-- Remove this unless you want to use active reverse ajax --> <init-param> <param-name>activeReverseAjaxEnabled</param-name> <param-value>true</param-value> </init-param> <!-- By default DWR creates application scope objects when they are first used. This creates them when the app-server is started --> <init-param> <param-name>initApplicationScopeCreatorsAtStartup</param-name> <param-value>true</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>dwr-invoker</servlet-name> <url-pattern>/dwr/*</url-pattern> </servlet-mapping>

Errors:
Client:
Error:
Object {name: "dwr.engine.missingData", message: "No data received from server"}
Server:
13:12:09,621 ERROR JettyContinuationSleeper:181 - Broken reflection
java.lang.NullPointerException
        at org.directwebremoting.util.Continuation.resume(Continuation.java:107)

        at org.directwebremoting.server.jetty.JettyContinuationSleeper.wakeUp(Je
ttyContinuationSleeper.java:177)
        at org.directwebremoting.impl.TimedAlarm$1.run(TimedAlarm.java:46)
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.
access$201(Unknown Source)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.
run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)