Menu

FTP Scanner

Help
Bob C
2005-02-10
2013-04-16
  • Bob C

    Bob C - 2005-02-10

    Can someone give me a tip on how to set up a simple FTP scanner? I have read the user guide and have also successfully run the file scanner example. I then decided to try out the FTP scanner. I created a new folder under examples called ftpscanner. I then created a config file with the following propertirs:

    scanner.type=ftp
    scanner.period=60000
    scanner.ftpHost=10.x.x.x
    scanner.ftpUsername=username
    scanner.ftpPassword=password
    scanner.ftpFolder=in
    scanner.includeSubfolders=false
    scanner.localBackupFolder=c:\\ftpBackup
    scanner.binary=true

    I wasn't sure what to write for the key prefix, e.g. scanner.

    Anyway, I received the following error when I tried to run it:

    C:\babeldoc\examples\ftpscanner>babeldoc scanner -s config.properties
    <2005-02-10 11:40:00,234> INFO  [main] :  Initializing workers:
    <2005-02-10 11:40:00,265> ERROR [main] :  [ScannerFactory.configureWorkers] null

    com.babeldoc.scanner.ScannerConfigurationException: com.babeldoc.core.service.Se
    rviceException: ScannerWorker.ftp
            at com.babeldoc.scanner.ScannerFactory.configureWorker(Unknown Source)
            at com.babeldoc.scanner.ScannerFactory.configureWorkers(Unknown Source)
            at com.babeldoc.scanner.ScannerFactory.getWorkers(Unknown Source)
            at com.babeldoc.scanner.Scanner.start(Unknown Source)
            at com.babeldoc.scanner.Scanner.execute(Unknown Source)
            at com.babeldoc.core.BabeldocCommand.executeCommand(Unknown Source)
            at com.babeldoc.core.BabeldocCommand.<init>(Unknown Source)
            at com.babeldoc.scanner.Scanner.<init>(Unknown Source)
            at com.babeldoc.scanner.Scanner.main(Unknown Source)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:324)
            at com.babeldoc.core.Main.handleCommand(Unknown Source)
            at com.babeldoc.core.Main.main(Unknown Source)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:324)
            at com.babeldoc.init.Main.runBabeldocMain(Unknown Source)
            at com.babeldoc.init.Main.main(Unknown Source)
    Caused by: com.babeldoc.core.service.ServiceException: ScannerWorker.ftp
            at com.babeldoc.core.service.ServiceFactory.getService(Unknown Source)
            at com.babeldoc.core.Type.getTypeInstance(Unknown Source)
            ... 21 more
    Caused by: com.babeldoc.core.service.ServiceException: Service: ScannerWorker.ft
    p  not found
            at com.babeldoc.core.service.ServiceFactory.getServiceClass(Unknown Sour
    ce)
            ... 23 more
    <2005-02-10 11:40:00,328> INFO  [main] :  No configured workers found!
    <2005-02-10 11:40:00,343> INFO  [main] :  Stopping feeder
    <2005-02-10 11:40:00,812> INFO  [shutdown] :  Stopping feeder

    I'm sure that I did not configure the scanner correctly, but I am a complete newbie to babeldoc. I am coming from a BizTalk perspective, so I do understand pipeline concepts, FTP adapters, etc.

    Thanks,
    Bob

     
    • maxdaros

      maxdaros - 2005-02-10

      Hi,

      try to make a batch file that before to run babeldoc scanner, change the working directory into the directory where you has the config.properties file of your scanner

      for example, in a .bat file:

      cd C:\myScanner

      babeldoc scanner -s ./config.properties

      Where C:\myScanner contains the config.properties file.

      Bye.
      Massimo

       
    • Bob C

      Bob C - 2005-02-10

      Hi Massimo,

      I tried your suggestion, but I get the same result.

      Can you provide an example of a line in the configuration file? For example, one of the lines in my file is:
      scanner.type=ftp 

      I just guessed at the 'scanner' part.

      Thanks,
      Bob

       
    • maxdaros

      maxdaros - 2005-02-11

      Hi Bob,

      here is my FtpScanner config file:

      scanner.type              = ftp
      scanner.period            = 10000
      scanner.ftpHost           = ftp.mySite.com
      scanner.ftpUsername       = myUser
      scanner.ftpPassword       = myPwd
      scanner.ftpFolder         = /myFolder
      scanner.filter            = .*.zip
      scanner.localBackupFolder = D:/DRG/Zipped
      scanner.pipeline          = MTLdbloader

      this config.properties file is in the directory D:\DRG\Scanner

      and in the directory D:\DRG I have a batch file like this:

      set CLASSPATH=D:\DRG\MTLdbloader

      cd D:\DRG\Scanner

      babeldoc scanner -s ./config.properties

      I think that in your case, babeldoc can't find the config.properties file of your ftp scanner.

      Bye,
      Massimo

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.