Uploaded image for project: 'CloverDX'
  1. CloverDX
  2. CLO-11313

Event listener - special chars in EVENT_FILE_URLS used as graph (FlatFileReader) parameter

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • rel-4-6-1
    • None
    • Server
    • Security Level: Users (General product issues)
    • None
    • Windows10, server CloverETLServer.4.6.1.Tomcat-8.0.30 - ver 4.6.1.5
      tested with free SolarWinds SFTP/SCP Server

    • UNDECIDED
    • Hide
      • create graph with FlatFileReader component, input file as parameter - FILE_URL
      • create server event listener with SFTP check location,
        with Type of check "File added" and "wildcards filename match" e.g. *data.txt
      • as graph parameter FILE_URL use EVENT_FILE_URLS variable
      • test different filenames
      Show
      create graph with FlatFileReader component, input file as parameter - FILE_URL create server event listener with SFTP check location, with Type of check "File added" and "wildcards filename match" e.g. *data.txt as graph parameter FILE_URL use EVENT_FILE_URLS variable test different filenames

    Description

      Check steps to reproduce first.

      Test results:
      sftp://localhost:2222/mydata/x170719_data.txt
      sftp://localhost:2222/mydata/170719_a-b-data.txt
      sftp://localhost:2222/mydata/[email protected]
      sftp://localhost:2222/mydata/170719_a-b-$-data.txt
      sftp://localhost:2222/mydata/170719_a-b-&-data.txt
      sftp://localhost:2222/mydata/170719_a-b-%-data.txt
      sftp://localhost:2222/mydata/170719_a-b-()-data.txt
      sftp://localhost:2222/mydata/170719_a-b-'-data.txt

      sftp://localhost:2222/mydata/170719_a-b-#-data.txt
      sftp://localhost:2222/mydata/170719_a-b-;-data.txt

      For filenames with characted # or ; in filename we get:

      org.jetel.exception.JetelRuntimeException: Component [FlatFileReader:FLAT_FILE_READER] finished with status ERROR. (Out0: 0 recs)
              at org.jetel.graph.Node.createNodeException(Node.java:633)
              at org.jetel.graph.Node.run(Node.java:600)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
              at java.lang.Thread.run(Thread.java:748)
      Caused by: Element [FLAT_FILE_READER:FlatFileReader]-Component pre-execute initialization failed.
              at org.jetel.graph.Node.run(Node.java:552)
              ... 3 more
      Caused by: [attribute = fileURL]-org.jetel.exception.JetelException: File is unreachable: sftp://test%3B%40%23%24%25%26:***@localhost:2222/mydata/[email protected]#-data.txt
              at org.jetel.util.MultiFileReader.preExecute(MultiFileReader.java:585)
              at org.jetel.component.DataReader.preExecute(DataReader.java:243)
              at org.jetel.graph.Node.run(Node.java:550)
              ... 3 more
      Caused by: org.jetel.exception.JetelException: File is unreachable: sftp://test%3B%40%23%24%25%26:***@localhost:2222/mydata/[email protected]#-data.txt
              at org.jetel.util.ReadableChannelIterator.next(ReadableChannelIterator.java:382)
              at org.jetel.util.MultiFileReader.nextSource(MultiFileReader.java:286)
              at org.jetel.util.MultiFileReader.preExecute(MultiFileReader.java:580)
              ... 5 more
      Caused by: java.io.IOException: Cannot obtain connection input stream for URL 'sftp://test%3B%40%23%24%25%26:***@localhost:2222/mydata/[email protected]#-data.txt'. Make sure the URL is valid.
              at org.jetel.util.file.FileUtils.getInputStream(FileUtils.java:642)
              at org.jetel.util.file.FileUtils.getReadableChannel(FileUtils.java:505)
              at org.jetel.util.file.stream.URLInput.getPreferredInput(URLInput.java:53)
              at org.jetel.util.ReadableChannelIterator.next(ReadableChannelIterator.java:374)
              ... 7 more
      Caused by: java.io.IOException
              at org.jetel.util.ExceptionUtils.getIOException(ExceptionUtils.java:581)
              at org.jetel.component.fileoperation.pool.AbstractPoolableConnection.getIOException(AbstractPoolableConnection.java:46)
              at org.jetel.component.fileoperation.pool.PooledSFTPConnection.getInputStream(PooledSFTPConnection.java:421)
              at org.jetel.util.protocols.sftp.SFTPConnection.getInputStream(SFTPConnection.java:127)
              at org.jetel.util.file.FileUtils.getInputStream(FileUtils.java:639)
              ... 10 more
      Caused by: 2: No such file
              at com.jcraft.jsch.ChannelSftp.throwStatusError(ChannelSftp.java:2873)
              at com.jcraft.jsch.ChannelSftp._stat(ChannelSftp.java:2225)
              at com.jcraft.jsch.ChannelSftp.get(ChannelSftp.java:1318)
              at com.jcraft.jsch.ChannelSftp.get(ChannelSftp.java:1290)
              at org.jetel.component.fileoperation.pool.PooledSFTPConnection.getInputStream(PooledSFTPConnection.java:350)
              ... 12 more
      

      Attachments

        Issue Links

          Activity

            People

              urbanj Jaroslav Urban (Inactive)
              zachl Lukas Zach
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: