Did you try to debug to see what actually becomes null? You don't serialize the continuations - do you?
cheers -- Torsten On Wed, Nov 12, 2008 at 7:17 AM, Avinash Lakshman <[EMAIL PROTECTED]> wrote: > I have a continuation based setup where I am trying to do asynchronous I/O. > I submit a read request and then suspend() the continuation. Later a > callback is invoked on read completion and the continuation is resumed. > However when I resume the continuation I get a NullPointerException stack > trace shown below: > > Exception in thread "DISK-IO-POOL:1" java.lang.NullPointerException > at java.nio.ByteBuffer.wrap(ByteBuffer.java:392) > at > com.facebook.infrastructure.io.AIORandomAccessFile.doWrite(AIORandomAccessFile.java:400) > at > com.facebook.infrastructure.io.AIORandomAccessFile.flushBuffer(AIORandomAccessFile.java:368) > at > com.facebook.infrastructure.io.AIORandomAccessFile.seek(AIORandomAccessFile.java:509) > at > com.facebook.infrastructure.io.AIORandomAccessFile.read(AIORandomAccessFile.java:562) > at java.io.RandomAccessFile.readInt(RandomAccessFile.java:771) > at > com.facebook.infrastructure.io.ReadImpl.run(AIORandomAccessFile.java:727) > at > org.apache.commons.javaflow.bytecode.StackRecorder.execute(StackRecorder.java:94) > at > org.apache.commons.javaflow.Continuation.execute(Continuation.java:172) > at > org.apache.commons.javaflow.Continuation.continueWith(Continuation.java:168) > at > com.facebook.infrastructure.io.AIORandomAccessFile$ReadCompletionHandler.completed(AIORandomAccessFile.java:132) > at > com.facebook.infrastructure.io.AIORandomAccessFile$ReadCompletionHandler.completed(AIORandomAccessFile.java:114) > at sun.nio.ch.Invoker.invokeDirect(Invoker.java:114) > at > sun.nio.ch.SimpleAsynchronousFileChannelImpl$3.run(SimpleAsynchronousFileChannelImpl.java:363) > at > org.apache.commons.javaflow.bytecode.StackRecorder.execute(StackRecorder.java:94) > at > org.apache.commons.javaflow.Continuation.execute(Continuation.java:172) > at > org.apache.commons.javaflow.Continuation.continueWith(Continuation.java:168) > at > com.facebook.infrastructure.concurrent.ContinuationsExecutor.runWorker(ContinuationsExecutor.java:1193) > at > com.facebook.infrastructure.concurrent.ContinuationsExecutor$Worker.run(ContinuationsExecutor.java:608) > at java.lang.Thread.run(Thread.java:713) > > Here is the call stack before the suspend(): > > java.lang.Thread.run/ > com.facebook.infrastructure.concurrent.ContinuationsExecutor$Worker.run/ > com.facebook.infrastructure.concurrent.ContinuationsExecutor.runWorker/ > org.apache.commons.javaflow.Continuation.continueWith/ > org.apache.commons.javaflow.Continuation.execute/ > org.apache.commons.javaflow.bytecode.StackRecorder.execute/ > com.facebook.infrastructure.io.ReadImpl.run/ > java.io.RandomAccessFile.readInt/ > com.facebook.infrastructure.io.AIORandomAccessFile.read/ > com.facebook.infrastructure.io.AIORandomAccessFile.seek/ > com.facebook.infrastructure.io.AIORandomAccessFile.fillBuffer2 > > Could someone please advice as to what might be going on over here? > > Thanks > A > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
