camel-quickfix: NullPointerException when SOCKS4 proxy is used with TLS, but without a username
Issue
When using camel-quickfix
with a SOCKS4 proxy, using TLS and without a username, communication fails with the following exception.
2021-06-10 12:25:51,574 | ERROR | NioProcessor-54 | AbstractProxyLogicHandler | 158 - org.apache.mina.core - 2.0.13 | Unable to send Socks request:
java.lang.NullPointerException
at org.apache.mina.proxy.handlers.socks.Socks4LogicHandler.writeRequest(Socks4LogicHandler.java:72)[158:org.apache.mina.core:2.0.13]
at org.apache.mina.proxy.handlers.socks.Socks4LogicHandler.doHandshake(Socks4LogicHandler.java:59)[158:org.apache.mina.core:2.0.13]
at org.apache.mina.proxy.filter.ProxyFilter.sessionCreated(ProxyFilter.java:291)[158:org.apache.mina.core:2.0.13]
at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextSessionCreated(DefaultIoFilterChain.java:459)[158:org.apache.mina.core:2.0.13]
at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$700(DefaultIoFilterChain.java:48)[158:org.apache.mina.core:2.0.13]
at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.sessionCreated(DefaultIoFilterChain.java:913)[158:org.apache.mina.core:2.0.13]
at org.apache.mina.core.filterchain.IoFilterAdapter.sessionCreated(IoFilterAdapter.java:74)[158:org.apache.mina.core:2.0.13]
at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextSessionCreated(DefaultIoFilterChain.java:459)[158:org.apache.mina.core:2.0.13]
at org.apache.mina.core.filterchain.DefaultIoFilterChain.fireSessionCreated(DefaultIoFilterChain.java:452)[158:org.apache.mina.core:2.0.13]
at org.apache.mina.core.service.IoServiceListenerSupport.fireSessionCreated(IoServiceListenerSupport.java:212)[158:org.apache.mina.core:2.0.13]
at org.apache.mina.core.polling.AbstractPollingIoProcessor.addNow(AbstractPollingIoProcessor.java:510)[158:org.apache.mina.core:2.0.13]
at org.apache.mina.core.polling.AbstractPollingIoProcessor.handleNewSessions(AbstractPollingIoProcessor.java:479)[158:org.apache.mina.core:2.0.13]
at org.apache.mina.core.polling.AbstractPollingIoProcessor.access$400(AbstractPollingIoProcessor.java:68)[158:org.apache.mina.core:2.0.13]
at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:1088)[158:org.apache.mina.core:2.0.13]
at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64)[158:org.apache.mina.core:2.0.13]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1160)[:1.8.0]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)[:1.8.0]
at java.lang.Thread.run(Thread.java:818)[:2.9 (08-02-2019)]
Environment
- Red Hat JBoss Fuse
- 6.3
camel-quickfix
- SOCKS4 proxy with no username
- TLS communication
It is likely that other versions of Fuse, including later versions, are affected.
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.