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.

  • It appears that if you change the assetstore.dir setting in dspace.cfg to anything other than the default, a number of tests will fail. Steps to reproduce: do a clean clone of dspace/dspace:master, and then change the assetstore.dir path (I used "/tmp"). Then, run mvn test -Dmaven.test.skip=false. In the excerpt of my test run below, I start off with what I think is a pretty good clue. My annotations are marked with ####. #### First, the clue: I think "fileweaver" is combining dspace.cfg and the testing dspace.cfg. We should see if we can figure out how to tell fileweaver to leave the assetstore path alone, otherwise we're not testing the correct thing. #### Keep reading you'll see the test errors towards the end. The tests are looking in the wrong place, and thus throwing FileNotFoundException. [INFO] --- fileweaver:1.0:weave (edit-dspace-cfg) @ dspace-api --- [INFO] Wove /home/vagrant/dspace-src/dspace-api/target/testing/dspace.cfg.woven from 2 parts. [INFO] 1 files woven. [INFO] [INFO] --- maven-antrun-plugin:1.7:run (default) @ dspace-api --- [INFO] Executing tasks main: [copy] Copying 1 file to /home/vagrant/dspace-src/dspace-api/target/testing/dspace/config [INFO] Executed tasks [INFO] [INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ dspace-api --- [INFO] Nothing to compile - all classes are up to date [INFO] [INFO] --- maven-surefire-plugin:2.17:test (default-test) @ dspace-api --- [INFO] Surefire report directory: /home/vagrant/dspace-src/dspace-api/target/surefire-reports ------------------------------------------------------- T E S T S ------------------------------------------------------- Running org.dspace.authenticate.IPMatcherTest Tests run: 24, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 5.747 sec - in org.dspace.authenticate.IPMatcherTest Running org.dspace.eperson.EPersonTest Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 5.51 sec - in org.dspace.eperson.EPersonTest Running org.dspace.eperson.PasswordHashTest Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.505 sec - in org.dspace.eperson.PasswordHashTest Running org.dspace.statistics.util.TestLocationUtils Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.028 sec - in org.dspace.statistics.util.TestLocationUtils Running org.dspace.statistics.util.SpiderDetectorTest Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.784 sec - in org.dspace.statistics.util.SpiderDetectorTest Running org.dspace.content.MetadataValueTest Tests run: 20, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.883 sec - in org.dspace.content.MetadataValueTest Running org.dspace.content.authority.DSpaceControlledVocabularyTest Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.121 sec - in org.dspace.content.authority.DSpaceControlledVocabularyTest Running org.dspace.content.BitstreamTest Tests run: 38, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.528 sec <<< FAILURE! - in org.dspace.content.BitstreamTest testRegister(org.dspace.content.BitstreamTest) Time elapsed: 0.023 sec <<< ERROR! #### Here it is, the test is looking in the wrong place java.io.FileNotFoundException: /tmp/ConstitutionofIreland.pdf (No such file or directory) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.<init>(FileInputStream.java:146) at edu.sdsc.grid.io.local.LocalFileInputStream.open(LocalFileInputStream.java:171) at edu.sdsc.grid.io.GeneralFileInputStream.<init>(GeneralFileInputStream.java:145) at edu.sdsc.grid.io.local.LocalFileInputStream.<init>(LocalFileInputStream.java:139) at edu.sdsc.grid.io.FileFactory.newFileInputStream(FileFactory.java:630) at org.dspace.storage.bitstore.BitstreamStorageManager.register(BitstreamStorageManager.java:413) at org.dspace.content.Bitstream.register(Bitstream.java:238) at org.dspace.content.BitstreamTest.testRegister(BitstreamTest.java:146) Running org.dspace.content.ItemTest Tests run: 84, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.657 sec - in org.dspace.content.ItemTest Running org.dspace.content.BundleTest Tests run: 34, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.378 sec <<< FAILURE! - in org.dspace.content.BundleTest testRegisterBitstreamAuth(org.dspace.content.BundleTest) Time elapsed: 0.066 sec <<< ERROR! #### and again, looking in the wrong place java.io.FileNotFoundException: /tmp/ConstitutionofIreland.pdf (No such file or directory) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.<init>(FileInputStream.java:146) at edu.sdsc.grid.io.local.LocalFileInputStream.open(LocalFileInputStream.java:171) at edu.sdsc.grid.io.GeneralFileInputStream.<init>(GeneralFileInputStream.java:145) at edu.sdsc.grid.io.local.LocalFileInputStream.<init>(LocalFileInputStream.java:139) at edu.sdsc.grid.io.FileFactory.newFileInputStream(FileFactory.java:630) at org.dspace.storage.bitstore.BitstreamStorageManager.register(BitstreamStorageManager.java:413) at org.dspace.content.Bitstream.register(Bitstream.java:238) at org.dspace.content.Bundle.registerBitstream(Bundle.java:408) at org.dspace.content.BundleTest.testRegisterBitstreamAuth(BundleTest.java:341)
    via by Hardy Pottinger,
  • It appears that if you change the assetstore.dir setting in dspace.cfg to anything other than the default, a number of tests will fail. Steps to reproduce: do a clean clone of dspace/dspace:master, and then change the assetstore.dir path (I used "/tmp"). Then, run mvn test -Dmaven.test.skip=false. In the excerpt of my test run below, I start off with what I think is a pretty good clue. My annotations are marked with ####. #### First, the clue: I think "fileweaver" is combining dspace.cfg and the testing dspace.cfg. We should see if we can figure out how to tell fileweaver to leave the assetstore path alone, otherwise we're not testing the correct thing. #### Keep reading you'll see the test errors towards the end. The tests are looking in the wrong place, and thus throwing FileNotFoundException. [INFO] --- fileweaver:1.0:weave (edit-dspace-cfg) @ dspace-api --- [INFO] Wove /home/vagrant/dspace-src/dspace-api/target/testing/dspace.cfg.woven from 2 parts. [INFO] 1 files woven. [INFO] [INFO] --- maven-antrun-plugin:1.7:run (default) @ dspace-api --- [INFO] Executing tasks main: [copy] Copying 1 file to /home/vagrant/dspace-src/dspace-api/target/testing/dspace/config [INFO] Executed tasks [INFO] [INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ dspace-api --- [INFO] Nothing to compile - all classes are up to date [INFO] [INFO] --- maven-surefire-plugin:2.17:test (default-test) @ dspace-api --- [INFO] Surefire report directory: /home/vagrant/dspace-src/dspace-api/target/surefire-reports ------------------------------------------------------- T E S T S ------------------------------------------------------- Running org.dspace.authenticate.IPMatcherTest Tests run: 24, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 5.747 sec - in org.dspace.authenticate.IPMatcherTest Running org.dspace.eperson.EPersonTest Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 5.51 sec - in org.dspace.eperson.EPersonTest Running org.dspace.eperson.PasswordHashTest Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.505 sec - in org.dspace.eperson.PasswordHashTest Running org.dspace.statistics.util.TestLocationUtils Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.028 sec - in org.dspace.statistics.util.TestLocationUtils Running org.dspace.statistics.util.SpiderDetectorTest Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.784 sec - in org.dspace.statistics.util.SpiderDetectorTest Running org.dspace.content.MetadataValueTest Tests run: 20, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.883 sec - in org.dspace.content.MetadataValueTest Running org.dspace.content.authority.DSpaceControlledVocabularyTest Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.121 sec - in org.dspace.content.authority.DSpaceControlledVocabularyTest Running org.dspace.content.BitstreamTest Tests run: 38, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.528 sec <<< FAILURE! - in org.dspace.content.BitstreamTest testRegister(org.dspace.content.BitstreamTest) Time elapsed: 0.023 sec <<< ERROR! #### Here it is, the test is looking in the wrong place java.io.FileNotFoundException: /tmp/ConstitutionofIreland.pdf (No such file or directory) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.<init>(FileInputStream.java:146) at edu.sdsc.grid.io.local.LocalFileInputStream.open(LocalFileInputStream.java:171) at edu.sdsc.grid.io.GeneralFileInputStream.<init>(GeneralFileInputStream.java:145) at edu.sdsc.grid.io.local.LocalFileInputStream.<init>(LocalFileInputStream.java:139) at edu.sdsc.grid.io.FileFactory.newFileInputStream(FileFactory.java:630) at org.dspace.storage.bitstore.BitstreamStorageManager.register(BitstreamStorageManager.java:413) at org.dspace.content.Bitstream.register(Bitstream.java:238) at org.dspace.content.BitstreamTest.testRegister(BitstreamTest.java:146) Running org.dspace.content.ItemTest Tests run: 84, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.657 sec - in org.dspace.content.ItemTest Running org.dspace.content.BundleTest Tests run: 34, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.378 sec <<< FAILURE! - in org.dspace.content.BundleTest testRegisterBitstreamAuth(org.dspace.content.BundleTest) Time elapsed: 0.066 sec <<< ERROR! #### and again, looking in the wrong place java.io.FileNotFoundException: /tmp/ConstitutionofIreland.pdf (No such file or directory) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.<init>(FileInputStream.java:146) at edu.sdsc.grid.io.local.LocalFileInputStream.open(LocalFileInputStream.java:171) at edu.sdsc.grid.io.GeneralFileInputStream.<init>(GeneralFileInputStream.java:145) at edu.sdsc.grid.io.local.LocalFileInputStream.<init>(LocalFileInputStream.java:139) at edu.sdsc.grid.io.FileFactory.newFileInputStream(FileFactory.java:630) at org.dspace.storage.bitstore.BitstreamStorageManager.register(BitstreamStorageManager.java:413) at org.dspace.content.Bitstream.register(Bitstream.java:238) at org.dspace.content.Bundle.registerBitstream(Bundle.java:408) at org.dspace.content.BundleTest.testRegisterBitstreamAuth(BundleTest.java:341)
    via by Hardy Pottinger,
  • No 1.5.0 repository at cloudbees...
    via by Andreas Furrer,
  • It seems that when using the AccuRev plugin and the build jobs are configured within folders, this plugin creates an ".accurev" directory within the job configuration directory on the master this results in the following or similar message in the jenkins.err.log {noformat} java.io.FileNotFoundException: E:\Jenkins\jobs\Deploy\jobs\SND\jobs\.accurev\config.xml (The system cannot find the file specified) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.<init>(FileInputStream.java:146) at com.wily.introscope.agent.probe.io.ManagedFileInputStream.<init>(ManagedFileInputStream.java:120) at hudson.XmlFile.read(XmlFile.java:141) at hudson.model.Items.load(Items.java:220) at hudson.model.ItemGroupMixIn.loadChildren(ItemGroupMixIn.java:99) at com.cloudbees.hudson.plugins.folder.Folder.onLoad(Folder.java:240) at com.cloudbees.hudson.plugins.modeling.impl.entity.EntityInstance.itemOnLoad(EntityInstance.java:268) at com.cloudbees.hudson.plugins.modeling.impl.entity.EntityInstance.load(EntityInstance.java:246) at com.cloudbees.hudson.plugins.modeling.impl.folder.InstanceFromFolderTemplate.load(InstanceFromFolderTemplate.java:54) at com.cloudbees.hudson.plugins.modeling.impl.folder.InstanceFromFolderTemplate.load(InstanceFromFolderTemplate.java:24) at com.cloudbees.hudson.plugins.modeling.impl.entity.EntityInstance.save(EntityInstance.java:221) at com.cloudbees.hudson.plugins.modeling.impl.folder.InstanceFromFolderTemplate.save(InstanceFromFolderTemplate.java:63) at com.cloudbees.hudson.plugins.modeling.impl.entity.EntityModel.reconfigureInstances(EntityModel.java:223) at com.cloudbees.hudson.plugins.modeling.impl.entity.EntityModel$1.run(EntityModel.java:191) {noformat}
    via by Walter Kacynski,
    • java.io.FileNotFoundException: /tmp/ConstitutionofIreland.pdf (No such file or directory) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.<init>(FileInputStream.java:146) at edu.sdsc.grid.io.local.LocalFileInputStream.open(LocalFileInputStream.java:171) at edu.sdsc.grid.io.GeneralFileInputStream.<init>(GeneralFileInputStream.java:145) at edu.sdsc.grid.io.local.LocalFileInputStream.<init>(LocalFileInputStream.java:139) at edu.sdsc.grid.io.FileFactory.newFileInputStream(FileFactory.java:630) at org.dspace.storage.bitstore.BitstreamStorageManager.register(BitstreamStorageManager.java:413) at org.dspace.content.Bitstream.register(Bitstream.java:238) at org.dspace.content.Bundle.registerBitstream(Bundle.java:408) at org.dspace.content.BundleTest.testRegisterBitstreamAuth(BundleTest.java:341)

    Users with the same issue

    Vikram
    2 times, last one,
    Handemelindo
    3 times, last one,
    linxiaolong
    1 times, last one,
    gehel
    2 times, last one,
    bluebunnty
    1 times, last one,
    180 more bugmates