You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by Yigal Rachman <yi...@uvic.ca> on 2008/02/25 23:51:57 UTC

Mina 2 problem - InvalidMarkException in java.nio.Buffer

Hi, Folks:

I am biting the bullet and porting to Mina 2.0.0-M1.  Thus far, I seem 
to have resolved all the changes without much pain.  I love the look of 
the revised Mina - elegant and even simpler to use - wow!

I have, however, run into a problem which appears to come from the 
bowels of Mina.  Here is the exception I am seeing:

java.nio.InvalidMarkException
    at java.nio.Buffer.reset(Unknown Source)
    at 
org.apache.mina.common.AbstractIoBuffer.reset(AbstractIoBuffer.java:321)
    at 
org.apache.mina.common.AbstractPollingIoProcessor.writeBuffer(AbstractPollingIoProcessor.java:577)
    at 
org.apache.mina.common.AbstractPollingIoProcessor.flushNow(AbstractPollingIoProcessor.java:528)
    at 
org.apache.mina.common.AbstractPollingIoProcessor.flush(AbstractPollingIoProcessor.java:469)
    at 
org.apache.mina.common.AbstractPollingIoProcessor.access$500(AbstractPollingIoProcessor.java:43)
    at 
org.apache.mina.common.AbstractPollingIoProcessor$Worker.run(AbstractPollingIoProcessor.java:681)
    at 
org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:51)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown 
Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

The message is clear enough: no mark has been set on the buffer, so a 
reset is not possible.  But it does look fishy.. perhaps a thread that 
is not properly synchronized?  Ideas, anyone?

Thank you all for your continuing help.

Yigal Rachman