On 29/11/2013 11:12, Sergey Beryozkin wrote:
Hi Jim,

Thanks for the update,

I was concerned about

 >> java.lang.NullPointerException: null
 >>      at
 >>
org.apache.cxf.jaxrs.impl.tl.ThreadLocalProviders.getContextResolver(ThreadLocalProviders.java:50)


should we still investigate it ? I'm just not exactly sure how a thread
local cache can be affected such that NPE is thrown, even though there
were issues with Bus references before your fix.

May the following sequence can explain: the thread creates a context,
two tests are started, the thread finishes one test, clears a context,
and now finishes the 2nd test, but the context has gone. This can
explain it. If you think it does not then please create a test project
for me to investigate it further

Thanks, Sergey

It has to be something like that, but I'm not sure what Spring/JUnit/CXF would have cleared. The other thing that still confuses me is that I would have expected the BusFactory.setDefault to affect things on the thread on which it is run, but the exception comes from the server thread (which should have an independent bus).

Anyway, I'm happy that the fix works and, whilst I think it would be good for you to document any limitation here, I can't quite think how you could have done that in a way that I would have found - so the existence of this email thread is probably as good as anything.

If I get the chance I will produce a test case, but it's not a priority.

Thanks.

Jim

Reply via email to