[ 
https://issues.apache.org/jira/browse/GEODE-2452?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15862120#comment-15862120
 ] 

Darrel Schneider commented on GEODE-2452:
-----------------------------------------

I could not get the line numbers to match up to my code but I think the NPE is 
coming from this line:
      getMessage().addBytesPart(event.getEventId().calcBytes());

Code inspection shows that when the EntryEventImpl is created that the eventId 
is never set so the above line would result in an NPE.
This makes me think that client "invalidateRegion" has been broken for a long 
time.

I also wonder if its attempted implementation is correct. It attempts to only 
invalidate server region entries that exist on the client. I think it would be 
more correct for the client to just send a single message to the server telling 
it to invalidate the entire region. That is how the p2p invalidateRegion is 
implemented.


> invalidateRegion on a CACHING_PROXY region throws NPE
> -----------------------------------------------------
>
>                 Key: GEODE-2452
>                 URL: https://issues.apache.org/jira/browse/GEODE-2452
>             Project: Geode
>          Issue Type: Bug
>          Components: regions
>            Reporter: Swapnil Bawaskar
>
> Calling invalidateRegion on a CACHING_PROXY threw the following Exception:
> {noformat}
> Exception in thread "main" java.lang.NullPointerException
>       at 
> org.apache.geode.cache.client.internal.InvalidateOp$InvalidateOpImpl.<init>(InvalidateOp.java:67)
>       at 
> org.apache.geode.cache.client.internal.InvalidateOp.execute(InvalidateOp.java:47)
>       at 
> org.apache.geode.cache.client.internal.ServerRegionProxy.invalidate(ServerRegionProxy.java:221)
>       at 
> org.apache.geode.internal.cache.LocalRegion.serverInvalidate(LocalRegion.java:3149)
>       at 
> org.apache.geode.internal.cache.AbstractRegionMap.invalidate(AbstractRegionMap.java:2134)
>       at 
> org.apache.geode.internal.cache.LocalRegionDataView.invalidateExistingEntry(LocalRegionDataView.java:67)
>       at 
> org.apache.geode.internal.cache.LocalRegion.basicInvalidate(LocalRegion.java:5223)
>       at 
> org.apache.geode.internal.cache.LocalRegion.basicInvalidate(LocalRegion.java:5187)
>       at 
> org.apache.geode.internal.cache.LocalRegion.invalidateAllEntries(LocalRegion.java:8045)
>       at 
> org.apache.geode.internal.cache.LocalRegion.basicInvalidateRegion(LocalRegion.java:7398)
>       at 
> org.apache.geode.internal.cache.LocalRegion.invalidateRegion(LocalRegion.java:1647)
>       at 
> org.apache.geode.internal.cache.AbstractRegion.invalidateRegion(AbstractRegion.java:342)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to