NullPointerException in MessageIdCorrelator under multithreaded load
--------------------------------------------------------------------

                 Key: XFIRE-1130
                 URL: http://jira.codehaus.org/browse/XFIRE-1130
             Project: XFire
          Issue Type: Bug
          Components: Core
    Affects Versions: 1.2-RC
            Reporter: Alexey Yudichev
            Assignee: Dan Diephouse


I am using XFire client in an 10-threaded environment and I am getting sporadic 
NPEs:

org.codehaus.xfire.XFireRuntimeException: Could not invoke service.. Nested 
exception is org.codehaus.xfire.fault.XFireFault: Fault: 
java.lang.NullPointerException
org.codehaus.xfire.fault.XFireFault: Fault: java.lang.NullPointerException
        at org.codehaus.xfire.fault.XFireFault.createFault(XFireFault.java:89)
        at org.codehaus.xfire.client.Client.onReceive(Client.java:386)
        at 
org.codehaus.xfire.transport.http.HttpChannel.sendViaClient(HttpChannel.java:134)
        at 
org.codehaus.xfire.transport.http.HttpChannel.send(HttpChannel.java:48)
        at 
org.codehaus.xfire.handler.OutMessageSender.invoke(OutMessageSender.java:26)
        at 
org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:130)
        at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:75)
        at org.codehaus.xfire.client.Client.invoke(Client.java:335)
        at 
org.codehaus.xfire.client.XFireProxy.handleRequest(XFireProxy.java:77)
        at org.codehaus.xfire.client.XFireProxy.invoke(XFireProxy.java:57)
        at $Proxy11.addTenorAndRoll(Unknown Source)
[...higher levels stripped...]
Caused by: java.lang.NullPointerException
        at 
org.codehaus.xfire.client.MessageIdCorrelator.correlate(MessageIdCorrelator.java:25)
        at 
org.codehaus.xfire.client.CorrelatorHandler.invoke(CorrelatorHandler.java:34)
        at 
org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:130)
        at org.codehaus.xfire.client.Client.onReceive(Client.java:382)
        ... 64 more

I tried placing a breakpoint on MessageIdCorrelator.java:25 with the condition 
"call == null || call.getContext() == null" and I managed to get it to stop on 
that breakpoint however evaluating call and call.getContext() did not give null 
any more. So I believe this is a synchronisation issue -can the invocations 
collections be updated by other threads that do not synchronize on the 
collection itself? Because Collections$SynchronizedSet does not synchronize on 
this, but rather on some separate mutex.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to