Uploaded image for project: 'Red Hat Build of Apache Camel for Quarkus'
  1. Red Hat Build of Apache Camel for Quarkus
  2. CEQ-10383

camel-smb does not work if path != "/"

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 3.15.0.GA
    • 3.8.0.GA
    • Camel Quarkus
    • None
    • False
    • Hide

      None

      Show
      None
    • False
    • Important
    • 0

      Consider this trivial camel-smb route:

      <from uri="smb:192.168.1.10:445/temp?path=/test&amp;username=kevin&amp;password=***&amp;searchPattern=*.text"/>
          <to uri="log://foo"/>  

      The remote share `temp` contains a directory `test`, in which there is a file `test.text`.

      This route fails, with the following exception:

       024-11-07 13:20:20,068 WARN  [org.apa.cam.com.smb.SmbConsumer] (Camel (camel-1) thread #1 - smb://192.168.1.10:445/temp) Failed polling endpoint: smb://192.168.1.10:445/temp?password=xxxxxx&path=%2Ftest&searchPattern=*.text&username=xxxxxx. Will try again at next poll. Caused by: [com.hierynomus.mssmb2.SMBApiException - STATUS_OBJECT_NAME_NOT_FOUND (0xc0000034): Create failed for \\192.168.1.10\temp\test.text]: com.hierynomus.mssmb2.SMBApiException: STATUS_OBJECT_NAME_NOT_FOUND (0xc0000034): Create failed for \\192.168.1.10\temp\test.text
          at com.hierynomus.smbj.share.Share.receive(Share.java:380)
          at com.hierynomus.smbj.share.Share.sendReceive(Share.java:359)
      

       

      camel-smb has correctly detected that there is a file `test.text` in the directory `temp`. But when it goes to read the file, it actually looks for `
      test.text` in the share `temp`. That is, it seems to be ignoring the path when reading the file, that it correctly used when scanning for files.

      This means that camel-smb does not work for values of `path` other than `/`, the top-level directory of the share.

      As an aside, I note that the camel-smb component writes an INFO log message every time it polls, which makes the log very noisy. In addition, although the documentation says that the default value of `searchPattern` is `*.txt`, this does not appear to be the case.

       

       

          There are no Sub-Tasks for this issue.

              jondruse@redhat.com Jiri Ondrusek
              rhn-support-kboone Kevin Boone
              Lukas Lowinger Lukas Lowinger
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: