Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » NPE in my Servlet init kills http registry service...
NPE in my Servlet init kills http registry service... [message #107553] Sun, 06 April 2008 16:40 Go to next message
Neale Upstone is currently offline Neale UpstoneFriend
Messages: 50
Registered: July 2009
Member
Is this behaviour correct, or should I open a bug?

I have a servlet which I managed to have throw an NPE during init (e.g.
static { throw new NPE(); }
should do it.)

When I start Equinox, the NPE causes the registry service to fail,
rather than it just kicking my servlet off the field (or even...
smartly, it could install single class replacement servlet, which
reports the caught exception).

Surely my errant servlet shouldn't take down the whole service...?

Cheers,

Neale



java.lang.NullPointerException
...
at javax.servlet.GenericServlet.init(GenericServlet.java:168)
at
org.eclipse.equinox.http.registry.internal.ServletManager$Se rvletWrapper.initializeDelegate(ServletManager.java:195)
at
org.eclipse.equinox.http.registry.internal.ServletManager$Se rvletWrapper.init(ServletManager.java:171)
at
org.eclipse.equinox.http.servlet.internal.ServletRegistratio n.init(ServletRegistration.java:64)
at
org.eclipse.equinox.http.servlet.internal.ProxyServlet.regis terServlet(ProxyServlet.java:142)
at
org.eclipse.equinox.http.servlet.internal.HttpServiceImpl.re gisterServlet(HttpServiceImpl.java:50)
at
org.eclipse.equinox.http.registry.internal.HttpRegistryManag er.registerServlet(HttpRegistryManager.java:214)
at
org.eclipse.equinox.http.registry.internal.HttpRegistryManag er.addServletContribution(HttpRegistryManager.java:114)
at
org.eclipse.equinox.http.registry.internal.ServletManager.ad ded(ServletManager.java:136)
at
org.eclipse.equinox.http.registry.internal.ExtensionPointTra cker.open(ExtensionPointTracker.java:75)
at
org.eclipse.equinox.http.registry.internal.ServletManager.st art(ServletManager.java:62)
at
org.eclipse.equinox.http.registry.internal.HttpRegistryManag er.start(HttpRegistryManager.java:85)
at
org.eclipse.equinox.http.registry.internal.HttpServiceTracke r.addingService(HttpServiceTracker.java:58)
at
org.osgi.util.tracker.ServiceTracker$Tracked.trackAdding(Ser viceTracker.java:1064)
at
org.osgi.util.tracker.ServiceTracker$Tracked.trackInitialSer vices(ServiceTracker.java:926)
at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.jav a:330)
at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.jav a:274)
at
org.eclipse.equinox.http.registry.internal.HttpServiceTracke r.open(HttpServiceTracker.java:42)
at
org.eclipse.equinox.http.registry.internal.Activator.addingS ervice(Activator.java:59)
at
org.osgi.util.tracker.ServiceTracker$Tracked.trackAdding(Ser viceTracker.java:1064)
at
org.osgi.util.tracker.ServiceTracker$Tracked.trackInitialSer vices(ServiceTracker.java:926)
at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.jav a:330)
at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.jav a:274)
at
org.eclipse.equinox.http.registry.internal.Activator.start(A ctivator.java:37)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl$2 .run(BundleContextImpl.java:999)
at java.security.AccessController.doPrivileged(Native Method)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tartActivator(BundleContextImpl.java:993)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tart(BundleContextImpl.java:974)
at
org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(BundleHost.java:346)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.resu me(AbstractBundle.java:355)
at
org.eclipse.osgi.framework.internal.core.Framework.resumeBun dle(Framework.java:1073)
at
org.eclipse.osgi.framework.internal.core.StartLevelManager.r esumeBundles(StartLevelManager.java:632)
at
org.eclipse.osgi.framework.internal.core.StartLevelManager.i ncFWSL(StartLevelManager.java:506)
at
org.eclipse.osgi.framework.internal.core.StartLevelManager.d oSetStartLevel(StartLevelManager.java:280)
at
org.eclipse.osgi.framework.internal.core.StartLevelManager.d ispatchEvent(StartLevelManager.java:466)
at
org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEve nt(EventManager.java:209)
at
org.eclipse.osgi.framework.eventmgr.EventManager$EventThread .run(EventManager.java:319)
Re: NPE in my Servlet init kills http registry service... [message #107569 is a reply to message #107553] Sun, 06 April 2008 17:04 Go to previous messageGo to next message
Simon Kaegi is currently offline Simon KaegiFriend
Messages: 381
Registered: July 2009
Senior Member
Definitely not. Please log a bug.
"Neale" <neale@nealeupstone.com> wrote in message
news:ftaue3$9qa$1@build.eclipse.org...
> Is this behaviour correct, or should I open a bug?
>
> I have a servlet which I managed to have throw an NPE during init (e.g.
> static { throw new NPE(); }
> should do it.)
>
> When I start Equinox, the NPE causes the registry service to fail, rather
> than it just kicking my servlet off the field (or even... smartly, it
> could install single class replacement servlet, which reports the caught
> exception).
>
> Surely my errant servlet shouldn't take down the whole service...?
>
> Cheers,
>
> Neale
>
>
>
> java.lang.NullPointerException
> ...
> at javax.servlet.GenericServlet.init(GenericServlet.java:168)
> at
> org.eclipse.equinox.http.registry.internal.ServletManager$Se rvletWrapper.initializeDelegate(ServletManager.java:195)
> at
> org.eclipse.equinox.http.registry.internal.ServletManager$Se rvletWrapper.init(ServletManager.java:171)
> at
> org.eclipse.equinox.http.servlet.internal.ServletRegistratio n.init(ServletRegistration.java:64)
> at
> org.eclipse.equinox.http.servlet.internal.ProxyServlet.regis terServlet(ProxyServlet.java:142)
> at
> org.eclipse.equinox.http.servlet.internal.HttpServiceImpl.re gisterServlet(HttpServiceImpl.java:50)
> at
> org.eclipse.equinox.http.registry.internal.HttpRegistryManag er.registerServlet(HttpRegistryManager.java:214)
> at
> org.eclipse.equinox.http.registry.internal.HttpRegistryManag er.addServletContribution(HttpRegistryManager.java:114)
> at
> org.eclipse.equinox.http.registry.internal.ServletManager.ad ded(ServletManager.java:136)
> at
> org.eclipse.equinox.http.registry.internal.ExtensionPointTra cker.open(ExtensionPointTracker.java:75)
> at
> org.eclipse.equinox.http.registry.internal.ServletManager.st art(ServletManager.java:62)
> at
> org.eclipse.equinox.http.registry.internal.HttpRegistryManag er.start(HttpRegistryManager.java:85)
> at
> org.eclipse.equinox.http.registry.internal.HttpServiceTracke r.addingService(HttpServiceTracker.java:58)
> at
> org.osgi.util.tracker.ServiceTracker$Tracked.trackAdding(Ser viceTracker.java:1064)
> at
> org.osgi.util.tracker.ServiceTracker$Tracked.trackInitialSer vices(ServiceTracker.java:926)
> at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.jav a:330)
> at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.jav a:274)
> at
> org.eclipse.equinox.http.registry.internal.HttpServiceTracke r.open(HttpServiceTracker.java:42)
> at
> org.eclipse.equinox.http.registry.internal.Activator.addingS ervice(Activator.java:59)
> at
> org.osgi.util.tracker.ServiceTracker$Tracked.trackAdding(Ser viceTracker.java:1064)
> at
> org.osgi.util.tracker.ServiceTracker$Tracked.trackInitialSer vices(ServiceTracker.java:926)
> at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.jav a:330)
> at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.jav a:274)
> at
> org.eclipse.equinox.http.registry.internal.Activator.start(A ctivator.java:37)
> at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl$2 .run(BundleContextImpl.java:999)
> at java.security.AccessController.doPrivileged(Native Method)
> at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tartActivator(BundleContextImpl.java:993)
> at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tart(BundleContextImpl.java:974)
> at
> org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(BundleHost.java:346)
> at
> org.eclipse.osgi.framework.internal.core.AbstractBundle.resu me(AbstractBundle.java:355)
> at
> org.eclipse.osgi.framework.internal.core.Framework.resumeBun dle(Framework.java:1073)
> at
> org.eclipse.osgi.framework.internal.core.StartLevelManager.r esumeBundles(StartLevelManager.java:632)
> at
> org.eclipse.osgi.framework.internal.core.StartLevelManager.i ncFWSL(StartLevelManager.java:506)
> at
> org.eclipse.osgi.framework.internal.core.StartLevelManager.d oSetStartLevel(StartLevelManager.java:280)
> at
> org.eclipse.osgi.framework.internal.core.StartLevelManager.d ispatchEvent(StartLevelManager.java:466)
> at
> org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEve nt(EventManager.java:209)
> at
> org.eclipse.osgi.framework.eventmgr.EventManager$EventThread .run(EventManager.java:319)
>
>
>
>
>
>
>
>
>
>
>
>
Re: NPE in my Servlet init kills http registry service... [message #108195 is a reply to message #107569] Tue, 15 April 2008 20:13 Go to previous messageGo to next message
Simon Kaegi is currently offline Simon KaegiFriend
Messages: 381
Registered: July 2009
Senior Member
I looged a bug for this here --
https://bugs.eclipse.org/bugs/show_bug.cgi?id=227215
-Simon

"Simon Kaegi" <simon_kaegi@ca.ibm.com> wrote in message
news:ftavqq$gec$1@build.eclipse.org...
> Definitely not. Please log a bug.
> "Neale" <neale@nealeupstone.com> wrote in message
> news:ftaue3$9qa$1@build.eclipse.org...
>> Is this behaviour correct, or should I open a bug?
>>
>> I have a servlet which I managed to have throw an NPE during init (e.g.
>> static { throw new NPE(); }
>> should do it.)
>>
>> When I start Equinox, the NPE causes the registry service to fail, rather
>> than it just kicking my servlet off the field (or even... smartly, it
>> could install single class replacement servlet, which reports the caught
>> exception).
>>
>> Surely my errant servlet shouldn't take down the whole service...?
>>
>> Cheers,
>>
>> Neale
>>
>>
>>
>> java.lang.NullPointerException
>> ...
>> at javax.servlet.GenericServlet.init(GenericServlet.java:168)
>> at
>> org.eclipse.equinox.http.registry.internal.ServletManager$Se rvletWrapper.initializeDelegate(ServletManager.java:195)
>> at
>> org.eclipse.equinox.http.registry.internal.ServletManager$Se rvletWrapper.init(ServletManager.java:171)
>> at
>> org.eclipse.equinox.http.servlet.internal.ServletRegistratio n.init(ServletRegistration.java:64)
>> at
>> org.eclipse.equinox.http.servlet.internal.ProxyServlet.regis terServlet(ProxyServlet.java:142)
>> at
>> org.eclipse.equinox.http.servlet.internal.HttpServiceImpl.re gisterServlet(HttpServiceImpl.java:50)
>> at
>> org.eclipse.equinox.http.registry.internal.HttpRegistryManag er.registerServlet(HttpRegistryManager.java:214)
>> at
>> org.eclipse.equinox.http.registry.internal.HttpRegistryManag er.addServletContribution(HttpRegistryManager.java:114)
>> at
>> org.eclipse.equinox.http.registry.internal.ServletManager.ad ded(ServletManager.java:136)
>> at
>> org.eclipse.equinox.http.registry.internal.ExtensionPointTra cker.open(ExtensionPointTracker.java:75)
>> at
>> org.eclipse.equinox.http.registry.internal.ServletManager.st art(ServletManager.java:62)
>> at
>> org.eclipse.equinox.http.registry.internal.HttpRegistryManag er.start(HttpRegistryManager.java:85)
>> at
>> org.eclipse.equinox.http.registry.internal.HttpServiceTracke r.addingService(HttpServiceTracker.java:58)
>> at
>> org.osgi.util.tracker.ServiceTracker$Tracked.trackAdding(Ser viceTracker.java:1064)
>> at
>> org.osgi.util.tracker.ServiceTracker$Tracked.trackInitialSer vices(ServiceTracker.java:926)
>> at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.jav a:330)
>> at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.jav a:274)
>> at
>> org.eclipse.equinox.http.registry.internal.HttpServiceTracke r.open(HttpServiceTracker.java:42)
>> at
>> org.eclipse.equinox.http.registry.internal.Activator.addingS ervice(Activator.java:59)
>> at
>> org.osgi.util.tracker.ServiceTracker$Tracked.trackAdding(Ser viceTracker.java:1064)
>> at
>> org.osgi.util.tracker.ServiceTracker$Tracked.trackInitialSer vices(ServiceTracker.java:926)
>> at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.jav a:330)
>> at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.jav a:274)
>> at
>> org.eclipse.equinox.http.registry.internal.Activator.start(A ctivator.java:37)
>> at
>> org.eclipse.osgi.framework.internal.core.BundleContextImpl$2 .run(BundleContextImpl.java:999)
>> at java.security.AccessController.doPrivileged(Native Method)
>> at
>> org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tartActivator(BundleContextImpl.java:993)
>> at
>> org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tart(BundleContextImpl.java:974)
>> at
>> org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(BundleHost.java:346)
>> at
>> org.eclipse.osgi.framework.internal.core.AbstractBundle.resu me(AbstractBundle.java:355)
>> at
>> org.eclipse.osgi.framework.internal.core.Framework.resumeBun dle(Framework.java:1073)
>> at
>> org.eclipse.osgi.framework.internal.core.StartLevelManager.r esumeBundles(StartLevelManager.java:632)
>> at
>> org.eclipse.osgi.framework.internal.core.StartLevelManager.i ncFWSL(StartLevelManager.java:506)
>> at
>> org.eclipse.osgi.framework.internal.core.StartLevelManager.d oSetStartLevel(StartLevelManager.java:280)
>> at
>> org.eclipse.osgi.framework.internal.core.StartLevelManager.d ispatchEvent(StartLevelManager.java:466)
>> at
>> org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEve nt(EventManager.java:209)
>> at
>> org.eclipse.osgi.framework.eventmgr.EventManager$EventThread .run(EventManager.java:319)
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>
>
Re: NPE in my Servlet init kills http registry service... [message #108337 is a reply to message #108195] Thu, 17 April 2008 08:43 Go to previous message
Neale Upstone is currently offline Neale UpstoneFriend
Messages: 50
Registered: July 2009
Member
Simon Kaegi wrote:
> I looged a bug for this here --
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=227215
> -Simon
>

Thanks. I'd just come back to do it, remembering I'd forgotten :)
Previous Topic:Axis2 in Equinox
Next Topic:Relation between plugin activation and enabling/disabling Eclipse Feature
Goto Forum:
  


Current Time: Mon Oct 25 11:43:16 GMT 2021

Powered by FUDForum. Page generated in 0.02354 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top