Community
Participate
Working Groups
On line 201 of HttpListener, is this code: HttpThread thread = configuration.pool.getThread(); I get an intermittent NPE from this, especially when I try to run in debug mode. This makes me suspect some sort of (gasp!) start level dependency problem. Anyone seen anything like this or have a clue how to work around it? org.eclipse.equinox.http (1.0.0.v20060206)
Paul, can you cut and paste your exception to this bug?
Here is the stack trace. This is as deep as it goes. Exception in thread "Thread-1" java.lang.NullPointerException at org.eclipse.equinox.http.HttpListener.run(HttpListener.java:201)
Created attachment 36902 [details] httplistener patch Just some ideas... There's possibility for trouble during start and stop of the HttpConfiguration. In initialize() there's a comment... /* Create configured listeners before thread pool * in case we exceed the number of threads */ I think we _have to_ initialize the thread pool before-hand because the listener will try to use the pool if it get's a request. Even if there are more listeners than threads it's not optimal but also not catastrophic as the listener will just block until a thread is available. In close() we shouldn't explicitly set the pool=null (just helps GC) as a listener may still be live. In this case the pool.getThread() will return null which is handled in the listener.
Jennifer, any progress here? Please investigate for 3.2.
Created attachment 38827 [details] proposed fix for 130028 and 130443 The proposed patch also includes fixes for HttpService build warnings (see bug #130443).
Hi Jennifer, Would you mind if we did this in two separate pieces. It's hard for me to see what's changed for this particular fix. Is it just my patch? Also, I think your global "org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess" setting is over-riding the project's settings. I've had it in my local workspace for ages, so I'll submit an updated "warning cleanup" patch in bug 130443 that cleans according to the project settings.
ok, fair enough, I've applied Simon's patch and will apply the warnings fixup patch separately. [contributed patch applied]
adding "contributed" keyword to patches contributed by the community.