Camel
  1. Camel
  2. CAMEL-5684

possible null pointer exception for FTP endpoint

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Cannot Reproduce
    • Affects Version/s: 2.10.1
    • Fix Version/s: 2.9.5, 2.10.3, 2.11.0
    • Component/s: camel-ftp
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      If for source endpoint you specify directory name without trailing slash and place there file, which name starts like the directory name, you'll get null pointer exception.

      ftp://[username@]hostname[:port]/directoryname[?options]

      For example:
      <endpoint id="ftpSource" uri="ftp://192.168.0.81:21/input?fileName= ...
      File with name "input" will give exception, file with name "bla" will be processed normally.

      This will work fine:
      <endpoint id="ftpSource" uri="ftp://192.168.0.81:21/input/?fileName= ...

      Part of stack trace:
      java.lang.NullPointerException
      ...
      org.apache.camel.impl.BridgeExceptionHandlerToErrorHandler.handleException(BridgeExceptionHandlerToErrorHandler.java:53)
      org.apache.camel.impl.DefaultConsumer.handleException(DefaultConsumer.java:112)
      org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:303)
      org.apache.camel.component.file.remote.RemoteFileConsumer.processExchange(RemoteFileConsumer.java:94)
      org.apache.camel.component.file.GenericFileConsumer.processBatch(GenericFileConsumer.java:189)
      org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:155)
      org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:139)
      ...

      Thanks.

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Claus Ibsen
            Reporter:
            KaterynaDanyliuk
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development