camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Willem Jiang <willem.ji...@gmail.com>
Subject Re: camel mina udp throws exception "Already released buffer"
Date Tue, 20 May 2008 15:32:26 GMT
Hi

Did you use the Camel 1.3 release version ?
I am sure we had fix this issue in Camel1.3. You can find more 
information here [1]

[1] https://issues.apache.org/activemq/browse/CAMEL-257

Willem
aruch wrote:
> Hello,
>
> I was trying to get familiar with camel by writing a simple udp example. I
> wanted to read off one port, increment a counter, then write to another
> port. I'm using Java 1.6, Camel 1.3, and Mina 1.1.7. The message is read in
> correctly and forwarded out, but I keep getting the following exception.
>
> May 20, 2008 8:35:20 AM
> org.apache.camel.component.mina.MinaProducer$ResponseHandler exceptionCaught
> SEVERE: Exception on receiving message from address: /10.10.2.1:5555 using
> connector: org.apache.mina.transport.socket.nio.DatagramConnector@39ab89
> 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.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.filter.codec.ProtocolCodecFilter.messageSent(ProtocolCodecFilter.java:193)
> 	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)
> 	
> 	
> 	
> Here is the code.
>
> inIp = "10.10.1.1";
> inPort = "4444";
> outIp = "10.10.2.1";
> outPort = "5555";
>
> context.addRoutes(new RouteBuilder() {
>     public void configure() throws Exception {
>         from("mina:udp://" + inIp + ":" + inPort).process(new Processor(){
>             public void process(Exchange exchange) throws Exception {
>                 msgCount++;
>             }
>         }).to("mina:udp://" + outIp + ":" + outPort);
>     }
> });
>
> System.out.println("Starting context...");
> context.start();
>
>
> Am I doing something wrong? Do I need to configure/customize something? 
>
> Thanks.
>
> aruch2002@go.com
>   


Mime
View raw message