The same exception but somewhat in different case.<br/> I am just trying to explore the examples. Among the examples. in the ChatProtocol Example, i could see something like session.write(message) where messge is just a String object without any casts, and when I did the same in my application it generated the same exception saying you must write ByteBuffer to the session. <br/> <br/> Why is this so? I went almost throughout the example, but could not actually find, if something else has been done there. <br/> <br/> Please help.<br/> <br/> ACP<br/>
tehehe wrote: > > > > Trustin Lee wrote: >> >> On 9/28/07, tehehe <[EMAIL PROTECTED]> wrote: >>> >>> I get the following exceptions: >>> >>> java.lang.IllegalStateException: Already released buffer. You released >>> the >>> buffer too many times. >>> at >>> org.apache.mina.common.PooledByteBufferAllocator$PooledByteBuffer.release(PooledByteBufferAllocator.java:310) >>> at >>> org.apache.mina.common.ByteBufferProxy.release(ByteBufferProxy.java:69) >>> at >>> org.apache.mina.transport.socket.nio.SocketIoProcessor.releaseWriteBuffers(SocketIoProcessor.java:392) >>> at >>> org.apache.mina.transport.socket.nio.SocketIoProcessor.doRemove(SocketIoProcessor.java:209) >>> at >>> org.apache.mina.transport.socket.nio.SocketIoProcessor.access$700(SocketIoProcessor.java:44) >>> at >>> org.apache.mina.transport.socket.nio.SocketIoProcessor$Worker.run(SocketIoProcessor.java:528) >>> at >>> org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:39) >>> at java.lang.Thread.run(Thread.java:595) >>> >>> when running application in jboss clustered environment. Mina-core >>> version >>> 1.0.5. >> >> Do you mean your application doesn't get the exception when running >> outside of JBossAS? The exception literally is thrown when you called >> ByteBuffer.release() unnecessary. Otherwise, you might not have >> duplicated the buffer where you should. For example: >> >> * You might have sent the same ByteBuffer instance to multiple sessions. >> * You might have sent the ByteBuffer instance received from >> messageReceived() method. >> >> Trustin >>> -- >>> View this message in context: >>> http://www.nabble.com/java.lang.IllegalStateException%3A-Already-released-buffer.--You-released-the-buffer-too-many-times.-tf4534734s16868.html#a12941234 >>> Sent from the Apache MINA Support Forum mailing list archive at >>> Nabble.com. >>> >>> >> >> >> -- >> what we call human nature is actually human habit >> -- >> http://gleamynode.net/ >> -- >> PGP Key ID: 0x0255ECA6 >> >> > > Thanks for your reply and sorry for being ambiguous. Application can only > work in application server so thats why I specifically wrote that. > I will look into application code and try to make use of your hints :) > Thanks again! > > -- View this message in context: http://www.nabble.com/java.lang.IllegalStateException%3A-Already-released-buffer.--You-released-the-buffer-too-many-times.-tf4534734s16868.html#a13562545 Sent from the Apache MINA Support Forum mailing list archive at Nabble.com.
