Unable to restart a controller

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

Unable to restart a controller

Jerome Louvel-2

Hi all,

I completing the Grizzly connector for Restlet 1.1 M2 release. It almost
working but I encountered an issue.

If you start a controller, then stop it, then start it again, you get a NPE
due to issues with the default pipeline.

Exception in thread "Thread-2" java.lang.NullPointerException
        at
com.sun.grizzly.DefaultPipeline.startPipeline(DefaultPipeline.java:180)
        at com.sun.grizzly.Controller.start(Controller.java:819)
        at com.noelios.restlet.ext.grizzly.GrizzlyServerHelper

                $1.run(GrizzlyServerHelper.java:94)

I found a workaround by doing this:
        this.controller.stop();
      this.controller.getPipeline().stopPipeline();
      this.controller.setPipeline(new DefaultPipeline());

Obviously, it would be better to be able to reuse the existing
pipeline/threads.

Best regards,
Jerome Louvel
http://www.restlet.org



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Unable to restart a controller

Jeanfrancois Arcand-2
Salut Jerome,

Jerome Louvel wrote:

> Hi all,
>
> I completing the Grizzly connector for Restlet 1.1 M2 release. It almost
> working but I encountered an issue.
>
> If you start a controller, then stop it, then start it again, you get a NPE
> due to issues with the default pipeline.
>
> Exception in thread "Thread-2" java.lang.NullPointerException
> at
> com.sun.grizzly.DefaultPipeline.startPipeline(DefaultPipeline.java:180)
> at com.sun.grizzly.Controller.start(Controller.java:819)
> at com.noelios.restlet.ext.grizzly.GrizzlyServerHelper
>
> $1.run(GrizzlyServerHelper.java:94)
>
> I found a workaround by doing this:
> this.controller.stop();
>       this.controller.getPipeline().stopPipeline();
>       this.controller.setPipeline(new DefaultPipeline());

I've just filled:

https://grizzly.dev.java.net/issues/show_bug.cgi?id=77

The fix is simple...testing :-)

Merci!

-- Jeanfrancois


>
> Obviously, it would be better to be able to reuse the existing
> pipeline/threads.
>
> Best regards,
> Jerome Louvel
> http://www.restlet.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Unable to restart a controller

Jeanfrancois Arcand-2
Salut Jerome,

fixed :-) and backported to 1.7.2

A+

-- Jeanfrancois

Jeanfrancois Arcand wrote:

> Salut Jerome,
>
> Jerome Louvel wrote:
>> Hi all,
>>
>> I completing the Grizzly connector for Restlet 1.1 M2 release. It almost
>> working but I encountered an issue.
>>
>> If you start a controller, then stop it, then start it again, you get
>> a NPE
>> due to issues with the default pipeline.
>>
>> Exception in thread "Thread-2" java.lang.NullPointerException
>>     at
>> com.sun.grizzly.DefaultPipeline.startPipeline(DefaultPipeline.java:180)
>>     at com.sun.grizzly.Controller.start(Controller.java:819)
>>     at com.noelios.restlet.ext.grizzly.GrizzlyServerHelper
>>
>>         $1.run(GrizzlyServerHelper.java:94)
>>
>> I found a workaround by doing this:
>>     this.controller.stop();
>>       this.controller.getPipeline().stopPipeline();
>>       this.controller.setPipeline(new DefaultPipeline());
>
> I've just filled:
>
> https://grizzly.dev.java.net/issues/show_bug.cgi?id=77
>
> The fix is simple...testing :-)
>
> Merci!
>
> -- Jeanfrancois
>
>
>>
>> Obviously, it would be better to be able to reuse the existing
>> pipeline/threads.
>>
>> Best regards,
>> Jerome Louvel
>> http://www.restlet.org
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: Unable to restart a controller

Jerome Louvel-2

Salut Jean-François,

That was quick! Thanks, it's working fine now :)

Best regards,
Jerome  

> -----Message d'origine-----
> De : [hidden email] [mailto:[hidden email]]
> Envoyé : jeudi 28 février 2008 17:52
> À : [hidden email]
> Objet : Re: Unable to restart a controller
>
> Salut Jerome,
>
> fixed :-) and backported to 1.7.2
>
> A+
>
> -- Jeanfrancois
>
> Jeanfrancois Arcand wrote:
> > Salut Jerome,
> >
> > Jerome Louvel wrote:
> >> Hi all,
> >>
> >> I completing the Grizzly connector for Restlet 1.1 M2
> release. It almost
> >> working but I encountered an issue.
> >>
> >> If you start a controller, then stop it, then start it
> again, you get
> >> a NPE
> >> due to issues with the default pipeline.
> >>
> >> Exception in thread "Thread-2" java.lang.NullPointerException
> >>     at
> >>
> com.sun.grizzly.DefaultPipeline.startPipeline(DefaultPipeline.
> java:180)
> >>     at com.sun.grizzly.Controller.start(Controller.java:819)
> >>     at com.noelios.restlet.ext.grizzly.GrizzlyServerHelper
> >>
> >>         $1.run(GrizzlyServerHelper.java:94)
> >>
> >> I found a workaround by doing this:
> >>     this.controller.stop();
> >>       this.controller.getPipeline().stopPipeline();
> >>       this.controller.setPipeline(new DefaultPipeline());
> >
> > I've just filled:
> >
> > https://grizzly.dev.java.net/issues/show_bug.cgi?id=77
> >
> > The fix is simple...testing :-)
> >
> > Merci!
> >
> > -- Jeanfrancois
> >
> >
> >>
> >> Obviously, it would be better to be able to reuse the existing
> >> pipeline/threads.
> >>
> >> Best regards,
> >> Jerome Louvel
> >> http://www.restlet.org
> >>
> >>
> >>
> >>
> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: [hidden email]
> >> For additional commands, e-mail: [hidden email]
> >>
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]
> > For additional commands, e-mail: [hidden email]
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]