java.io.FileNotFoundException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • When using the bin/dspace import command to import items in SAF, the importer requires the source directory to be specified with the -s flag, but when loading from a .zip file, it incorrectly looks for the zip in a location that duplicates the path specified in the -s flag, resulting in a "file not found" error. The duplication does not occur if the -z flag has not been used (i.e. if the items are located in a regular directory specified in the -s flag, but rather only when -s and -z are both used. A workaround is to invoke the load from the directory where the zip file is located, and specify -s '.' for the source directory. Sample error message is below. ---- $ /apps/mdsoar/bin/dspace import -a -e notreal@notreal.org -s /apps/mdsoar/upload -z item_export_2015_Oct_01_1_34.zip -t -m outputmap.txt -c 11603-STAGE/4784 **Test Run** - not actually importing items. Destination collections: Owning Collection: 20150924 java.io.FileNotFoundException: /apps/mdsoar/upload/apps/mdsoar/upload/item_export_2015_Oct_01_1_34.zip (No such file or directory) at java.util.zip.ZipFile.open(Native Method) at java.util.zip.ZipFile.<init>(ZipFile.java:215) at java.util.zip.ZipFile.<init>(ZipFile.java:145) at java.util.zip.ZipFile.<init>(ZipFile.java:159) at org.dspace.app.itemimport.ItemImport.unzip(ItemImport.java:2022) at org.dspace.app.itemimport.ItemImport.unzip(ItemImport.java:1988) at org.dspace.app.itemimport.ItemImport.unzip(ItemImport.java:2099) at org.dspace.app.itemimport.ItemImport.main(ItemImport.java:490) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.dspace.app.launcher.ScriptLauncher.runOneCommand(ScriptLauncher.java:225) at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:77) java.io.FileNotFoundException: /apps/mdsoar/upload/apps/mdsoar/upload/item_export_2015_Oct_01_1_34.zip (No such file or directory) Deleting temporary zip directory: /apps/mdsoar/imports ***End of Test Run*** Started: 1445520961621 Ended: 1445520962375 Elapsed time: 0 secs (754 msecs)
    via by Joshua Westgard,
  • When using the bin/dspace import command to import items in SAF, the importer requires the source directory to be specified with the -s flag, but when loading from a .zip file, it incorrectly looks for the zip in a location that duplicates the path specified in the -s flag, resulting in a "file not found" error. The duplication does not occur if the -z flag has not been used (i.e. if the items are located in a regular directory specified in the -s flag, but rather only when -s and -z are both used. A workaround is to invoke the load from the directory where the zip file is located, and specify -s '.' for the source directory. Sample error message is below. ---- $ /apps/mdsoar/bin/dspace import -a -e notreal@notreal.org -s /apps/mdsoar/upload -z item_export_2015_Oct_01_1_34.zip -t -m outputmap.txt -c 11603-STAGE/4784 **Test Run** - not actually importing items. Destination collections: Owning Collection: 20150924 java.io.FileNotFoundException: /apps/mdsoar/upload/apps/mdsoar/upload/item_export_2015_Oct_01_1_34.zip (No such file or directory) at java.util.zip.ZipFile.open(Native Method) at java.util.zip.ZipFile.<init>(ZipFile.java:215) at java.util.zip.ZipFile.<init>(ZipFile.java:145) at java.util.zip.ZipFile.<init>(ZipFile.java:159) at org.dspace.app.itemimport.ItemImport.unzip(ItemImport.java:2022) at org.dspace.app.itemimport.ItemImport.unzip(ItemImport.java:1988) at org.dspace.app.itemimport.ItemImport.unzip(ItemImport.java:2099) at org.dspace.app.itemimport.ItemImport.main(ItemImport.java:490) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.dspace.app.launcher.ScriptLauncher.runOneCommand(ScriptLauncher.java:225) at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:77) java.io.FileNotFoundException: /apps/mdsoar/upload/apps/mdsoar/upload/item_export_2015_Oct_01_1_34.zip (No such file or directory) Deleting temporary zip directory: /apps/mdsoar/imports ***End of Test Run*** Started: 1445520961621 Ended: 1445520962375 Elapsed time: 0 secs (754 msecs)
    via by Joshua Westgard,
  • Creating a DEX file from Java source code
    via by Unknown author,
  • SAS 9.4 Installation error during deployment
    via Stack Overflow by T J
    ,
    • java.io.FileNotFoundException: /apps/mdsoar/upload/apps/mdsoar/upload/item_export_2015_Oct_01_1_34.zip (No such file or directory) at java.util.zip.ZipFile.open(Native Method) at java.util.zip.ZipFile.<init>(ZipFile.java:215) at java.util.zip.ZipFile.<init>(ZipFile.java:145) at java.util.zip.ZipFile.<init>(ZipFile.java:159) at org.dspace.app.itemimport.ItemImport.unzip(ItemImport.java:2022) at org.dspace.app.itemimport.ItemImport.unzip(ItemImport.java:1988) at org.dspace.app.itemimport.ItemImport.unzip(ItemImport.java:2099) at org.dspace.app.itemimport.ItemImport.main(ItemImport.java:490) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.dspace.app.launcher.ScriptLauncher.runOneCommand(ScriptLauncher.java:225) at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:77)

    Users with the same issue

    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    kuldeep
    2 times, last one,
    poroszd
    2 times, last one,
    29 more bugmates