mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Frédéric Brégier <fred.breg...@free.fr>
Subject CompressionFilter returns error -5 (Z_BUF_ERROR) from jzlib in MINA 1.0
Date Wed, 04 Oct 2006 06:24:00 GMT
Hi,
In my switch from MINA 0.9.4 to 1.0,
for one of my project, I have one new problem
that does not occured with MINA 0.9.4
with the CompressionFilter using jdk 1.5.

The example is quite simple :
- the first Filter is the compression filter

I remove everything that could be a possible
error from my project. I don't set any threadpool
at all, letting MINA sets its own way.
My protocol is in TCP (socket).
I was using jdk 1.5 before also.

I get for each try to send a compress packet
the following error :

java.io.IOException: Compression failed with return value : -5
 at org.apache.mina.filter.support.Zlib.deflate(Zlib.java:181)
 at 
org.apache.mina.filter.CompressionFilter.filterWrite(CompressionFilter.java:198)
 at 
org.apache.mina.common.support.AbstractIoFilterChain.callPreviousFilterWrite(AbstractIoFilterChain.java:573)
 at 
org.apache.mina.common.support.AbstractIoFilterChain.access$7(AbstractIoFilterChain.java:567)
 at 
org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.filterWrite(AbstractIoFilterChain.java:789)
 at 
org.apache.mina.filter.codec.ProtocolCodecFilter.filterWrite(ProtocolCodecFilter.java:221)
 at 
org.apache.mina.common.support.AbstractIoFilterChain.callPreviousFilterWrite(AbstractIoFilterChain.java:573)
 at 
org.apache.mina.common.support.AbstractIoFilterChain.access$7(AbstractIoFilterChain.java:567)
 at 
org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.filterWrite(AbstractIoFilterChain.java:789)
 at 
org.apache.mina.common.support.AbstractIoFilterChain$2.filterWrite(AbstractIoFilterChain.java:213)
 at 
org.apache.mina.common.support.AbstractIoFilterChain.callPreviousFilterWrite(AbstractIoFilterChain.java:573)
 at 
org.apache.mina.common.support.AbstractIoFilterChain.fireFilterWrite(AbstractIoFilterChain.java:564)
 at 
org.apache.mina.transport.socket.nio.SocketSessionImpl.write0(SocketSessionImpl.java:186)
 at 
org.apache.mina.common.support.BaseIoSession.write(BaseIoSession.java:146)
 at 
org.apache.mina.common.support.BaseIoSession.write(BaseIoSession.java:132)
 ...

When not using the compression filter, everything is ok.
I try to remove the inFilter.release but it didn't change anything (recent 
patch
that I proposed). So it is not the cause.
I was suspecting in the beginning that it could be relative to the 
threadPool
(cachedThreadPool) since one thread could end and so release all 
informations
necessary for jzlib (persistent data), but when I remove every threadPool
that I set manually, nothing change.
I did try using backported version of MINA also and it did the same error.

Any idea ?
Frederic 


Mime
View raw message