Hello!

I am working on a proxy server resting upon the example in the package. If I
send small files through the proxy (tested with 100 1MB files, 0 - 2 seconds
between each sended file), everything works fine.
If I send large files through the proxy (tested with 7 50MB files, 1 - 10
seconds between each sended file), I can log the following exception:

java.lang.IllegalStateException: Already released buffer.  You released the
buffer too many times.
        at
org.apache.mina.common.SimpleByteBufferAllocator$SimpleByteBuffer.release(SimpleByteBufferAllocator.java:81)
        at
org.apache.mina.util.ByteBufferUtil.releaseIfPossible(ByteBufferUtil.java:39)
        at
org.apache.mina.common.support.AbstractIoFilterChain$TailFilter.messageSent(AbstractIoFilterChain.java:581)
        at
org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageSent(AbstractIoFilterChain.java:320)
        at
org.apache.mina.common.support.AbstractIoFilterChain.access$1200(AbstractIoFilterChain.java:53)
        at
org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageSent(AbstractIoFilterChain.java:653)
        at
org.apache.mina.common.IoFilterAdapter.messageSent(IoFilterAdapter.java:85)
        at
org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageSent(AbstractIoFilterChain.java:320)
        at
org.apache.mina.common.support.AbstractIoFilterChain.access$1200(AbstractIoFilterChain.java:53)
        at
org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageSent(AbstractIoFilterChain.java:653)
        at
org.apache.mina.common.IoFilterAdapter.messageSent(IoFilterAdapter.java:85)
        at
org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageSent(AbstractIoFilterChain.java:320)
        at
org.apache.mina.common.support.AbstractIoFilterChain.access$1200(AbstractIoFilterChain.java:53)
        at
org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageSent(AbstractIoFilterChain.java:653)
        at
org.apache.mina.filter.executor.ExecutorFilter.processEvent(ExecutorFilter.java:222)
        at
org.apache.mina.filter.executor.ExecutorFilter$ProcessEventsRunnable.run(ExecutorFilter.java:264)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
        at
org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:51)
        at java.lang.Thread.run(Thread.java:619)

The exception occurs in the ServerToProxyIoHandler part of the connection.
Now the question arises, what can I do to prevent this exception?

For your information: I use Mina 1.1.5

Thanks in advance and sorry for my suboptimal english ;-)
TK
-- 
View this message in context: 
http://www.nabble.com/IllegalStateException-according-to-ByteBuffer-tp15084321s16868p15084321.html
Sent from the Apache MINA Support Forum mailing list archive at Nabble.com.

Reply via email to