[QFJ-635] Null Pointer Exception when starting a session with Apache Synapse Created: 26/Sep/11  Updated: 01/Dec/11  Resolved: 01/Dec/11

Status: Closed
Project: QuickFIX/J
Component/s: Engine
Affects Version/s: 1.5.0, 1.5.1
Fix Version/s: 1.5.2

Type: Bug Priority: Critical
Reporter: Mark Curtis Assignee: Christoph John
Resolution: Fixed Votes: 0
Labels: QuickfixJ, session
Environment:

Linux, JBoss 5.1.GA, Apache Synapse 2.0


Attachments: File patch    

 Description   

QuickFIX/J versions greater than 1.4.0 do not work with Apache Synapse. See following stack trace for more details:

java.lang.NullPointerException
at quickfix.Session.<init>(Session.java:455)
at quickfix.DefaultSessionFactory.create(DefaultSessionFactory.java:179)
at quickfix.mina.acceptor.AbstractSocketAcceptor.createSessions(AbstractSocketAcceptor.java:246)
at quickfix.mina.acceptor.AbstractSocketAcceptor.<init>(AbstractSocketAcceptor.java:81)
at quickfix.mina.acceptor.AbstractSocketAcceptor.<init>(AbstractSocketAcceptor.java:97)
at quickfix.SocketAcceptor.<init>(SocketAcceptor.java:37)
at org.apache.synapse.transport.fix.FIXSessionFactory.createFIXAcceptor(FIXSessionFactory.java:124)
at org.apache.synapse.transport.fix.FIXTransportListener.startListeningForService(FIXTransportListener.java:76)
at org.apache.axis2.transport.base.AbstractTransportListener.internalStartListeningForService(AbstractTransportListener.java:213)
at org.apache.axis2.transport.base.AbstractTransportListener$2.serviceAdded(AbstractTransportListener.java:126)
at org.apache.axis2.transport.base.tracker.AxisServiceTracker.serviceAdded(AxisServiceTracker.java:212)
at org.apache.axis2.transport.base.tracker.AxisServiceTracker.start(AxisServiceTracker.java:188)
at org.apache.axis2.transport.base.AbstractTransportListener.start(AbstractTransportListener.java:178)
at org.apache.axis2.engine.ListenerManager.start(ListenerManager.java:148)
at org.apache.synapse.Axis2SynapseController.start(Axis2SynapseController.java:244)
at org.apache.synapse.ServerManager.start(ServerManager.java:185)
at org.apache.synapse.core.axis2.SynapseStartUpServlet.init(SynapseStartUpServlet.java:58)



 Comments   
Comment by Mark Curtis [ 26/Sep/11 ]

Attached patch fixes issue and has been tested with banzi, executor + synapse.

Comment by Christoph John [ 01/Dec/11 ]

I just also stumbled upon this when working on the Session class. The logFactory is dereferenced although it is null-checked some lines below.
Thanks for the patch suggestion.

Generated at Sat Nov 23 09:02:35 UTC 2024 using JIRA 7.5.2#75007-sha1:9f5725bb824792b3230a5d8716f0c13e296a3cae.