[QFJ-333] A filter chain cannot contain more than one ProtocolCodecFilter Created: 11/Aug/08  Updated: 08/Sep/08  Resolved: 08/Sep/08

Status: Closed
Project: QuickFIX/J
Component/s: Engine
Affects Version/s: 1.2.1
Fix Version/s: None

Type: Other Priority: Blocker
Reporter: Serife Kapukaya Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Environment:

Windows XP



 Description   

We have an inhouse FIX engine developed using Quickfix Engine. We are trying to connect with a client as an acceptor. But we have this error while attempting to create a session. I couldn't understand why we have this error. Because we had successful tests with different clients before. What should I do to pass over this problem?

org.apache.mina.common.IoFilterLifeCycleException: onPreAdd(): protocolCodecFilter:org.apache.mina.filter.codec.ProtocolCodecFilter@bc917c in (SOCKET, R: /194.75.231.194:52928, L: /213.143.244.124:2000, S: /213.143.244.124:2000)
at org.apache.mina.common.support.AbstractIoFilterChain.register(AbstractIoFilterChain.java:179)
at org.apache.mina.common.support.AbstractIoFilterChain.addFirst(AbstractIoFilterChain.java:124)
at quickfix.mina.AbstractIoHandler.sessionCreated(AbstractIoHandler.java:96)
at quickfix.mina.acceptor.AcceptorIoHandler.sessionCreated(AcceptorIoHandler.java:52)
at org.apache.mina.common.support.AbstractIoFilterChain$TailFilter.sessionCreated(AbstractIoFilterChain.java:652)
at org.apache.mina.common.support.AbstractIoFilterChain.callNextSessionCreated(AbstractIoFilterChain.java:272)
at org.apache.mina.common.support.AbstractIoFilterChain.access$700(AbstractIoFilterChain.java
Ağu 07 14:56:56 2008: :54)
at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.sessionCreated(AbstractIoFilterChain.java:769)
at org.apache.mina.common.IoFilterAdapter.sessionCreated(IoFilterAdapter.java:58)
at org.apache.mina.common.support.AbstractIoFilterChain.callNextSessionCreated(AbstractIoFilterChain.java:272)
at org.apache.mina.common.support.AbstractIoFilterChain.access$700(AbstractIoFilterChain.java:54)
at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.sessionCreated(AbstractIoFilterChain.java:769)
at org.apache.mina.common.support.AbstractIoFilterChain$HeadFilter.sessionCreated(AbstractIoFilterChain.java:589)
at org.apache.mina.common.support.AbstractIoFilterChain.callNextSessionCreated(AbstractIoFilterChain.java:272)
at org.apache.mina.common.support.AbstractIoFilterChain.fireSessionCreated(AbstractIoFilterChain.java:265)
at org.apache.mina.common.support.IoServiceListenerSupport.fireSessionCreated(IoServiceListenerSupport.java:226)
at org.apache.mina.transport.sock
Ağu 07 14:56:56 2008: et.nio.SocketIoProcessor.doAddNew(SocketIoProcessor.java:170)
at org.apache.mina.transport.socket.nio.SocketIoProcessor.access$300(SocketIoProcessor.java:44)
at org.apache.mina.transport.socket.nio.SocketIoProcessor$Worker.run(SocketIoProcessor.java:554)
at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:43)
at java.lang.Thread.run(Thread.java:534)
Caused by: java.lang.IllegalStateException: A filter chain cannot contain more than one ProtocolCodecFilter.
at org.apache.mina.filter.codec.ProtocolCodecFilter.onPreAdd(ProtocolCodecFilter.java:139)
at org.apache.mina.common.support.AbstractIoFilterChain.register(AbstractIoFilterChain.java:175)
... 20 more



 Comments   
Comment by Steve Bate [ 11/Aug/08 ]

I've never seen this and nobody else has reported this type issue. The QFJ code does very little during MINA's session creation callback. Almost all of the stack trace above is in MINA code. Are you using the version of MINA included with QFJ? If so, you'll need to narrow the problem down a bit before I can help much.

Comment by Serife Kapukaya [ 13/Aug/08 ]

Yes, I am using the version of MINA included with QFJ which is 1.0.1. More than one ProtocolCodecFilter causes the problem. But the weird thing is I didn't modified either quickfix code or MINA code. And also I had successful connections with former clients.

Generated at Tue Jul 01 07:59:04 UTC 2025 using JIRA 7.5.2#75007-sha1:9f5725bb824792b3230a5d8716f0c13e296a3cae.