Hello,
I am using UniversalDataReader for reading files from FTP server. I am giving url in the form
ftp://username:password@192.145.125.200 … leFile.txt. I am getting exception as file is unreachable
Reason: FileURL attribute (ftp://username:password@192.145.125.200/amit/sampleFile.txt) doesn't contain valid file url.
at org.jetel.graph.Phase.init(Phase.java:159)
at org.jetel.graph.runtime.WatchDog.executePhase(WatchDog.java:423)
at org.jetel.graph.runtime.WatchDog.call(WatchDog.java:177)
at org.jetel.graph.runtime.WatchDog.call(WatchDog.java:62)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.lang.Thread.run(Thread.java:619)
Caused by: [attribute = fileURL]-FileURL attribute (ftp://username:password@192.145.125.200/amit/sampleFile.txt) doesn't contain valid file url.
at org.jetel.util.MultiFileReader.init(MultiFileReader.java:117)
at org.jetel.component.DataReader.init(DataReader.java:267)
at org.jetel.graph.Phase.init(Phase.java:154)
... 6 more
Caused by: org.jetel.exception.JetelException: File is unreachable: ftp://username:password@192.145.125.200/amit/sampleFile.txt caused by: java.io.FileNotFoundException: amit/inventory-bro.txt
at org.jetel.util.ReadableChannelIterator.createReadableByteChannel(ReadableChannelIterator.java:418)
at org.jetel.util.ReadableChannelIterator.next(ReadableChannelIterator.java:275)
at org.jetel.util.MultiFileReader.nextSource(MultiFileReader.java:219)
at org.jetel.util.MultiFileReader.init(MultiFileReader.java:111)
... 8 more
Caused by: java.io.FileNotFoundException: amit/inventory-bro.txt
at sun.net.www.protocol.ftp.FtpURLConnection.getInputStream(FtpURLConnection.java:441)
at org.jetel.util.file.FileUtils.getAuthorizedStream(FileUtils.java:493)
at org.jetel.util.file.FileUtils.getInputStream(FileUtils.java:259)
at org.jetel.util.file.FileUtils.getReadableChannel(FileUtils.java:205)
at org.jetel.util.ReadableChannelIterator.createReadableByteChannel(ReadableChannelIterator.java:414)
... 11 more
Please provide some solution to this problem. I am also reading xml files using XMLExtract and I want to read those also from FTP location. Will XMLExtract works for reading xml files from ftp authorized locations , if not then is there any way to read it from ftp.
Thanks
Pushpendra