users@grizzly.java.net

Re: Atmosphere shutdown

From: jfarcand <jfarcand_at_ning.com>
Date: Tue, 11 May 2010 14:25:40 -0400

Salut,

On 10-05-11 2:21 PM, nakoned wrote:
>
> Paul, JFA,
> I am sorry to bug you again, but I tried Paul's suggestions on GF, but
> still cannot run PubSub example. Now I get the following exception:
>
> INFO: Scanning for root resource and provider classes in the Web app
> resource paths:
> /WEB-INF/lib
> /WEB-INF/classes
> INFO: Root resource classes found:
> class org.atmosphere.samples.pubsub.PubSub
> class org.atmosphere.commons.jersey.ResourceChat
> INFO: Provider classes found:
> class org.atmosphere.jersey.BroadcasterFactoryInjector
> class org.atmosphere.jersey.AtmosphereResourceConfigurator
> class org.atmosphere.jersey.BroadcasterInjector
> class org.atmosphere.jersey.AtmosphereResourceInjector
> INFO: Initiating Jersey application, version 'Jersey: 1.1.5.1 03/10/2010
> 02:33 PM'
> INFO: Adding the following classes declared in
> META-INF/services/jersey-server-components to the resource configuration:
> class org.atmosphere.jersey.BroadcasterInjector
> class org.atmosphere.jersey.AtmosphereProviders$BroadcasterProvider
> class org.atmosphere.jersey.BroadcasterFactoryInjector
> class org.atmosphere.jersey.AtmosphereResourceInjector
> class org.atmosphere.jersey.AtmosphereResourceConfigurator
> class com.sun.jersey.multipart.impl.FormDataMultiPartDispatchProvider
> class com.sun.jersey.multipart.impl.MultiPartConfigProvider
> class com.sun.jersey.multipart.impl.MultiPartReader
> class com.sun.jersey.multipart.impl.MultiPartWriter
> INFO: Atmosphere Framework 0.6-SNAPSHOT started.
> INFO: Loading application AtmPubSub at /APS
> INFO: AtmPubSub was successfully deployed in 12,313 milliseconds.
> INFO: @PreDestroy invoked...
> INFO: onBroadcast: org.atmosphere.cpr.AtmosphereResourceEventImpl_at_1989e7c
> INFO: This is just an example that demonstrate how a Broadcaster can be
> customized using atmosphere.xml or by defining it inside web.xml
> INFO: onBroadcast: org.atmosphere.cpr.AtmosphereResourceEventImpl_at_1989e7c
> INFO: onResume: org.atmosphere.cpr.AtmosphereResourceEventImpl_at_1989e7c
> SEVERE: The log message is null.
> java.lang.NullPointerException
> at
> com.sun.grizzly.http.ProcessorTask.action(ProcessorTask.java:1163)
> at com.sun.grizzly.tcp.Request.action(Request.java:419)
> at com.sun.grizzly.tcp.Response.resume(Response.java:762)
> at
> org.apache.catalina.connector.Request.asyncComplete(Request.java:3756)
> at
> org.apache.catalina.connector.AsyncContextImpl.complete(AsyncContextImpl.java:223)
> at
> org.atmosphere.container.Servlet30Support.action(Servlet30Support.java:183)
> at
> org.atmosphere.container.Servlet30Support.action(Servlet30Support.java:63)
> at
> org.atmosphere.cpr.AtmosphereResourceImpl.resume(AtmosphereResourceImpl.java:131)
> at
> org.atmosphere.jersey.util.JerseyBroadcasterUtil.broadcast(JerseyBroadcasterUtil.java:73)
> at
> org.atmosphere.jersey.JerseyBroadcaster.broadcast(JerseyBroadcaster.java:66)
> at
> org.atmosphere.samples.pubsub.PubSubBroadcaster.broadcast(PubSubBroadcaster.java:74)
> at
> org.atmosphere.cpr.DefaultBroadcaster.push(DefaultBroadcaster.java:257)
> at
> org.atmosphere.cpr.DefaultBroadcaster.push(DefaultBroadcaster.java:232)
> at
> org.atmosphere.cpr.DefaultBroadcaster$1.run(DefaultBroadcaster.java:206)
> 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.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> at java.lang.Thread.run(Thread.java:619)
>
> Everything works fine if I run it on Tomcat.

Can you switch to use Grizzly Comet instead. Add the following two
systems properties:

    -Dv3.grizzly.cometSupport=true
    -Dorg.atmosphere.useNative=true

I'm cc-ing the grizzly dev team for the NPE, which may have been fixed
in 3.0.1 (I think I reported to Justin that NPE awhile ago)

A+

- Jeanfrancois



>
> Regards,
> Ed
>
>
>