cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mschaefer <>
Subject Re: Concurrency issue
Date Tue, 16 Mar 2010 17:27:25 GMT


It seems the culprit is a LinkedList that was unintentionally shared between

I made a copy of our project and stripped it down to the SessionService. The
class was a singleton (I guess for the sake of performance and because its
operations are conceptually
stateless). However, it inherited from a abstract superclass that has an
instance field that was
overwritten on each method invocation with a new instance of ServiceResult,
which in turn contained
a LinkedList instance. I haven't founnd any evidence of that field being
re-used (the subclass methods
use an own reference to the ServiceResult they create), but there is some
probability it is involved.

After removing the dependency on the abstract superclass, unmarshalling
exceptions stopped to be
thrown, but we kept seeing the NPE in
createSoapBinding( These, too,
vanished after I changed the code to create a new instance of SessionService
on each invocation.

Although not all reasons are perfectly clear to me, I consider the problem
solved as far as I am
concerned. On the other hand, it seems such errors can produce weird
effects, so they could
possibly be handled a better in order to isolate them from errors that have
their principal cause
in the framework code.

As a side effect, we'll migrate from 2.1.3 to 2.2.6.

I hope I haven't caused you to much trouble,

thanks a lot for your friendly support,


dkulp wrote:
> Interesting.   In the first case, the line in question is just:
> getBus().getExtension(WSDLManager.class).getExtensionRegistry();
> Thus, either the Bus is null (would be strange) or the WSDLMananger is
> null, 
> which also be bizarre.   If changed the code to split that into three
> lines.  
> Tomorrows snapshot will have that (or, if you could checkout the code and 
> build yourself to test, that would be great).    I'd like to know which
> line 
> would now have the NPE so I can try and figure out if it's the bus or the 
> wsdlmanager which is null.    That would at least give me a clue where to 
> look.   
> The second stack trace is also a bit strange.   It's an NPE in LinkedList 
> which is very strange.   Normally, JAXB uses ArrayLists for pretty much 
> everything so I'm not sure why a LInkedList is there.   Do you have some 
> custom JAXB beans or something there that would be using LinkedList
> instead?
> Dan

View this message in context:
Sent from the cxf-user mailing list archive at

View raw message