We're updating the issue view to help you get more done. 

AggregateEntriesSpaceOperationResult is null in rear condition

Description

As far as we know this issue occurred only once, we do not have an explanation for it. NPE happened on an object we have no control over so I think the problem is in xap code base. Due to the async nature of the aggregate job and not having debug logging enabled we can not tell the exact where clause which was executed. It most likely looked similar to this:

"sessionIds[]=? AND terminationReason IN AND communicationCategory.name IN AND historyEntryViews[](operator.sessionId = ? AND directions[*] IN ) AND tenantId=?"

Code snippet of aggregate call:

private AggregationResult aggregateResultUsingTenantId(final SQLQuery<HistoryEntry> sqlQuery, final AggregationSet aggregationSet) {
SQLQuery<HistoryEntry> sqlQueryWithTenantId = tenantSqlQueryEnhancer.enhanceSQLQueryWithTenantId(sqlQuery);
LOG.debug(EXECUTING_QUERY_WITH_PARAMETERS, sqlQueryWithTenantId.toString(), sqlQueryWithTenantId.getParameters());
return clusterRepository.aggregate(sqlQueryWithTenantId, aggregationSet);
}

Log file with complete stacktrace is attached.
HistoryEntry and its base class SpaceObject are attached. Also most relevant code which executes the aggregate (SpaceHistoryEntryRepository) is attached. But we think it is not directly related to our code, because query worked every time except once.

at java.lang.Thread.run(Thread.java:748)Caused by: java.lang.NullPointerException
at com.gigaspaces.internal.client.spaceproxy.operations.AggregateEntriesSpaceOperationRequest.processPartitionResult(AggregateEntriesSpaceOperationRequest.java:111)
at com.gigaspaces.internal.client.spaceproxy.operations.AggregateEntriesSpaceOperationRequest.processPartitionResult(AggregateEntriesSpaceOperationRequest.java:49)
at com.gigaspaces.internal.remoting.routing.partitioned.BroadcastOperationFutureListener.onOperationResultArrival(BroadcastOperationFutureListener.java:50)
at com.gigaspaces.internal.remoting.RemoteOperationFutureListener.onOperationCompletion(RemoteOperationFutureListener.java:146)
at com.gigaspaces.internal.remoting.routing.clustered.ClusterRemoteOperationRouter$AsyncOperationExecutor.onOperationCompletion(ClusterRemoteOperationRouter.java:296)
at com.gigaspaces.internal.remoting.routing.clustered.ClusterRemoteOperationRouter$AsyncOperationExecutor.onResult(ClusterRemoteOperationRouter.java:280)
at com.gigaspaces.lrmi.nio.async.LRMIFuture.sendEvent(LRMIFuture.java:252)
at com.gigaspaces.lrmi.nio.async.LRMIFuture.setResultPacketInternal(LRMIFuture.java:230)
at com.gigaspaces.lrmi.nio.async.LRMIFuture.setResultPacket(LRMIFuture.java:183)
at com.gigaspaces.lrmi.nio.async.AsyncContext.finishExecution(AsyncContext.java:285)
at com.gigaspaces.lrmi.nio.async.AsyncContext.access$1000(AsyncContext.java:71)
at com.gigaspaces.lrmi.nio.async.AsyncContext$1.execute(AsyncContext.java:195)
at com.gigaspaces.internal.utils.concurrent.ContextClassLoaderRunnable.run(ContextClassLoaderRunnable.java:45)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)

I asked the customer for a reproduction..

Workaround

None

Acceptance Test

None

Status

Assignee

Unassigned

Reporter

Yuval Dori

Labels

None

Priority

Medium

SalesForce Case ID

None

Fix versions

None

Commitment Version/s

None

Due date

None

Product

XAP

Edition

Premium

Platform

All