NullPointer and ConcurrentModification Exceptions involving consumerTemplate
Issue
Noticing these errors randomly in the application when cconsumerTemplate.stop() or ServiceUtil.stopQuietly(consumerTemplate) calls are made (in the methods in the stracktrace, findFile and streamFile)
03:55:13,988 DEBUG [org.apache.camel.util.ServiceHelper] (Camel (camel-2) thread #46 - JmsConsumer[service.routing.jms.broker.dest.process.job]) Caught exception shutting down service: PollingConsumer on Endpoint[ftp://ftpproxy.XXXX.org:21//outbound/fullcxf/asc/aNAstdbk01/bkco_afntind1?binary=true&consumer.bridgeErrorHandler=true&disconnect=true&download=false&ftpClient.bufferSize=1024000&ftpClient.receiveBufferSize=1024000&ftpClient.sendBufferSize=1024000&idempotent=true&idempotentKey=396348-%24%7Bfile%3Aname%7D-%24%7Bfile%3Amodified%7D&idempotentRepository=%23fileStore&inProgressRepository=%23simpleInProgressRepository&include=f_bkco_afntind1%5C.1%5C.asc%5C.zip&maximumReconnectAttempts=0&passiveMode=false&password=xxxxxx&sortBy=reverse%3Afile%3Amodified&stepwise=false&throwExceptionOnConnectFailed=true&timeout=10000&username=XXXX%40ftp.spcompustat.com]: java.lang.NullPointerException
at org.apache.commons.net.ftp.FTP.__send(FTP.java:505) [commons-net-3.3.jar:3.3]
at org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:479) [commons-net-3.3.jar:3.3]
at org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:608) [commons-net-3.3.jar:3.3]
at org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:582) [commons-net-3.3.jar:3.3]
at org.apache.commons.net.ftp.FTP.quit(FTP.java:864) [commons-net-3.3.jar:3.3]
at org.apache.commons.net.ftp.FTPClient.logout(FTPClient.java:1109) [commons-net-3.3.jar:3.3]
at org.apache.camel.component.file.remote.FtpOperations.disconnect(FtpOperations.java:201) [camel-ftp-2.12.0.redhat-610379.jar:2.12.0.redhat-610379]
at org.apache.camel.component.file.remote.RemoteFileConsumer.disconnect(RemoteFileConsumer.java:123) [camel-ftp-2.12.0.redhat-610379.jar:2.12.0.redhat-610379]
at org.apache.camel.component.file.remote.RemoteFileConsumer.doStop(RemoteFileConsumer.java:110) [camel-ftp-2.12.0.redhat-610379.jar:2.12.0.redhat-610379]
at org.apache.camel.support.ServiceSupport.stop(ServiceSupport.java:102) [camel-core-2.12.0.redhat-610379.jar:2.12.0.redhat-610379]
our endpoint configuration looks like this:
String baseUri = String.format("%s://%s:%s/%s?throwExceptionOnConnectFailed=true"
+ "&binary=%s&consumer.bridgeErrorHandler=true"
+ "&inProgressRepository=#simpleInProgressRepository&maximumReconnectAttempts=0&disconnect=true&stepwise=false&username=%s",
uriPrefix, endpoint.getServer(), endpoint.getPort(), searchPath, binary, endpoint.getUsername());
Environment
- Red Hat JBoss Enterprise Application Platform 6.2.0
- JBoss Fuse 6.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
