Quantcast
Channel: Gigaspaces XAP forum - RSS feed
Viewing all articles
Browse latest Browse all 1486

NullPointerException in distributed task

$
0
0
With stacktrace: Caused by: java.util.concurrent.ExecutionException: java.lang.NullPointerException at com.gigaspaces.internal.remoting.RemoteOperationFutureListener.onOperationCompletion(RemoteOperationFutureListener.java:168) at com.gigaspaces.internal.remoting.routing.clustered.ClusterRemoteOperationRouter$AsyncOperationExecutor.onOperationCompletion(ClusterRemoteOperationRouter.java:337) at com.gigaspaces.internal.remoting.routing.clustered.ClusterRemoteOperationRouter$AsyncOperationExecutor.onResult(ClusterRemoteOperationRouter.java:318) at com.gigaspaces.lrmi.nio.async.LRMIFuture.sendEvent(LRMIFuture.java:270) at com.gigaspaces.lrmi.nio.async.LRMIFuture.setResultPacketInternal(LRMIFuture.java:248) at com.gigaspaces.lrmi.nio.async.LRMIFuture.setResultPacket(LRMIFuture.java:193) at com.gigaspaces.lrmi.nio.async.AsyncContext.finishExecution(AsyncContext.java:299) at com.gigaspaces.lrmi.nio.async.AsyncContext.access$1000(AsyncContext.java:62) at com.gigaspaces.lrmi.nio.async.AsyncContext$1.execute(AsyncContext.java:200) at com.gigaspaces.internal.utils.concurrent.ContextClassLoaderRunnable.run(ContextClassLoaderRunnable.java:41) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) ... 1 more Caused by: java.lang.NullPointerException at com.gigaspaces.lrmi.nio.Pivot.consumeAndHandleRequest(Pivot.java:572) at com.gigaspaces.lrmi.nio.Pivot.handleRequest(Pivot.java:669) at com.gigaspaces.lrmi.nio.Pivot$ChannelEntryTask.run(Pivot.java:196) ... 3 more Caused by: java.lang.NullPointerException ... 6 more Distributed task: public class MyTask implements DistributedTask, List> { private static final long serialVersionUID = 1L; @TaskGigaSpace transient GigaSpace taskGigaSpace; @Override public List reduce(final List>> asyncResults) throws Exception { final List ids = Lists.newArrayList(); for (final AsyncResult> asyncResult : asyncResults) { if (asyncResult.getException() != null) { throw asyncResult.getException(); } ids.addAll(asyncResult.getResult()); } return ids; } @Override public ArrayList execute() throws Exception { return query(); } private ArrayList query() { // query with projection and parameters } } Probably useful information. We have PU in GS0 which has connection to GS1. PU listening events and run distributed task in GS1

Viewing all articles
Browse latest Browse all 1486

Trending Articles