• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

InputStream null when recursively transferring files. Jakarta FTP

 
Ranch Hand
Posts: 30
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Having an issue and cannot seem to find the resolution. I was unable to find a method for copying a directory recursively to another ftp server or to another folder on the same server.
I have thrown together the following code to do so and it works fine if you create only the directories and not transfer any files.

If you transfer files the InputStream becomes NULL after the first file transfers and kills the program. I have had it check to make sure the FTP connection is still love and even know it is I always result in the same issue.

You can see from the following Output that the Stream always transfers one file successfully.
Under the output is the code I am using.

Any help would be appreciated or a better method, but it has to be able to be done using only Jakarta Libraries and java.io





06-26 21:53:25.049: INFO/System.out(1152): Creating Directoy>>>>test/
06-26 21:53:25.139: INFO/System.out(1152): Directory Created>>>>test/
06-26 21:53:25.619: INFO/System.out(1152): Sending Src and Dst>>>>test/.>>>>>>>test/.
06-26 21:53:25.619: INFO/System.out(1152): Omitting>>>test/. <<<
06-26 21:53:25.619: INFO/System.out(1152): Finished Sending Src and Dst>>>>test/.>>>>>>>test/.
06-26 21:53:25.619: INFO/System.out(1152): Sending Src and Dst>>>>test/..>>>>>>>test/..
06-26 21:53:25.619: INFO/System.out(1152): Omitting>>>test/.. <<<
06-26 21:53:25.619: INFO/System.out(1152): Finished Sending Src and Dst>>>>test/..>>>>>>>test/..
06-26 21:53:25.619: INFO/System.out(1152): Sending Src and Dst>>>>test/ArtistSetList.php>>>>>>>test/ArtistSetList.php
06-26 21:53:25.619: INFO/System.out(1152): Begin Input Output>>>>test/ArtistSetList.php>>>>>>>test/ArtistSetList.php
06-26 21:53:26.339: INFO/System.out(1152): Completed Input Output>>>>test/ArtistSetList.php>>>>>>>test/ArtistSetList.php

06-26 21:53:26.339: INFO/System.out(1152): Finished Sending Src and Dst>>>>test/ArtistSetList.php>>>>>>>test/ArtistSetList.php
06-26 21:53:26.339: INFO/System.out(1152): Sending Src and Dst>>>>test/BandSelection.php>>>>>>>test/BandSelection.php
06-26 21:53:26.339: INFO/System.out(1152): Begin Input Output>>>>test/BandSelection.php>>>>>>>test/BandSelection.php
06-26 21:53:26.439: INFO/System.out(1152): InputStream is Null

06-26 21:53:26.439: INFO/System.out(1152): Finished Sending Src and Dst>>>>test/BandSelection.php>>>>>>>test/BandSelection.php
06-26 21:53:26.439: INFO/System.out(1152): Sending Src and Dst>>>>test/Copy of check2.php>>>>>>>test/Copy of check2.php
06-26 21:53:26.439: INFO/System.out(1152): Begin Input Output>>>>test/Copy of check2.php>>>>>>>test/Copy of check2.php
06-26 21:53:26.624: INFO/System.out(1152): InputStream is Null

06-26 21:53:26.624: INFO/System.out(1152): Finished Sending Src and Dst>>>>test/Copy of check2.php>>>>>>>test/Copy of check2.php
06-26 21:53:26.624: INFO/System.out(1152): Sending Src and Dst>>>>test/check.php>>>>>>>test/check.php
06-26 21:53:26.624: INFO/System.out(1152): Begin Input Output>>>>test/check.php>>>>>>>test/check.php
06-26 21:53:26.750: INFO/System.out(1152): InputStream is Null

06-26 21:53:26.750: INFO/System.out(1152): Finished Sending Src and Dst>>>>test/check.php>>>>>>>test/check.php
06-26 21:53:26.750: INFO/System.out(1152): Sending Src and Dst>>>>test/check2.php>>>>>>>test/check2.php
06-26 21:53:26.750: INFO/System.out(1152): Begin Input Output>>>>test/check2.php>>>>>>>test/check2.php
06-26 21:53:26.930: INFO/System.out(1152): InputStream is Null

06-26 21:53:26.930: INFO/System.out(1152): Finished Sending Src and Dst>>>>test/check2.php>>>>>>>test/check2.php
06-26 21:53:26.930: INFO/System.out(1152): Sending Src and Dst>>>>test/crawler.php>>>>>>>test/crawler.php
06-26 21:53:26.930: INFO/System.out(1152): Begin Input Output>>>>test/crawler.php>>>>>>>test/crawler.php
06-26 21:53:27.069: INFO/System.out(1152): InputStream is Null

06-26 21:53:27.069: INFO/System.out(1152): Finished Sending Src and Dst>>>>test/crawler.php>>>>>>>test/crawler.php








 
Squanch that. And squanch this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic