SFTP Camel Route failing with IndexOutOfBoundsException from jsch library

Solution Unverified - Updated -

Issue

  • We have a Camel route polling an SFTP endpoint. The route was working fine for several days, then started printing an exception to the logs
Caused by: java.lang.IndexOutOfBoundsException
    at java.io.PipedInputStream.read(PipedInputStream.java:372)[:1.7.0_85]
    at com.jcraft.jsch.ChannelSftp.fill(ChannelSftp.java:2882)[50:org.apache.servicemix.bundles.jsch:0.1.51.1]
    at com.jcraft.jsch.ChannelSftp.fill(ChannelSftp.java:2874)[50:org.apache.servicemix.bundles.jsch:0.1.51.1]
    at com.jcraft.jsch.ChannelSftp._realpath(ChannelSftp.java:2332)[50:org.apache.servicemix.bundles.jsch:0.1.51.1]
    at com.jcraft.jsch.ChannelSftp.cd(ChannelSftp.java:342)[50:org.apache.servicemix.bundles.jsch:0.1.51.1]
  • At this point, although the route shows as working in the console, no further files are consumed.
  • The container was restarted and the route started consuming files again as expected.

Environment

  • Red Hat JBoss Fuse
    • 6.2.0

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content