[ 
https://issues.apache.org/jira/browse/GEODE-5198?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Bruce Schuchardt reassigned GEODE-5198:
---------------------------------------

    Assignee: Bruce Schuchardt

> NPE in DataSerializer registration when forming a client/server connection 
> during handshake
> -------------------------------------------------------------------------------------------
>
>                 Key: GEODE-5198
>                 URL: https://issues.apache.org/jira/browse/GEODE-5198
>             Project: Geode
>          Issue Type: Improvement
>          Components: client/server, serialization
>            Reporter: Bruce Schuchardt
>            Assignee: Bruce Schuchardt
>            Priority: Major
>             Fix For: 1.7.0
>
>
> Someone hit an NPE when forming a connection to a server in an application 
> making heavy use of custom DataSerializers.  I wrote a unit test to reproduce 
> the problem (attached) which produces this:
> {noformat}
> java.lang.NullPointerException
>       at 
> java.util.concurrent.ConcurrentHashMap.putVal(ConcurrentHashMap.java:1011)
>       at 
> java.util.concurrent.ConcurrentHashMap.putIfAbsent(ConcurrentHashMap.java:1535)
>       at 
> org.apache.geode.internal.InternalDataSerializer.updateSupportedClassesMap(InternalDataSerializer.java:1079)
>       at 
> org.apache.geode.internal.DataSerializerHolderJUnitTest$1.run(DataSerializerHolderJUnitTest.java:72)
> {noformat}
> The problem is in the idsToHolders map in InternalDataSerializer. This map is 
> initialized with a "holder" object that knows the name and ID of a 
> DataSerializer. During tcp/ip connection formation one of these is created 
> when processing a list of DataSerializers sent to the client by the server as 
> part of the handshake. Then the server sends a map of the names of classes 
> supported by the serializers. It's in this second step that we're hitting the 
> NPE because some other thread has resolved the holder into an actual class 
> and has removed the holder from the idsToHolders map. This can be done in any 
> of three other methods in InternalDataSerializer that are used as a matter of 
> course in serializing/deserializing objects.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to