java.io.FileNotFoundException: /tmp/ConstitutionofIreland.pdf (No such file or directory)

Sakai JIRA | Hardy Pottinger | 2 years ago
  1. 0

    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)

    Sakai JIRA | 2 years ago | Hardy Pottinger
    java.io.FileNotFoundException: /tmp/ConstitutionofIreland.pdf (No such file or directory)
  2. 0

    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)

    Sakai JIRA | 2 years ago | Hardy Pottinger
    java.io.FileNotFoundException: /tmp/ConstitutionofIreland.pdf (No such file or directory)
  3. 0

    Dspace in AIP export: (The system can not find the path specified)

    Stack Overflow | 7 months ago | Brendow Adriel
    java.io.FileNotFoundException: C:\dspace\assetstore\40\91\65\40916552143129972874895263919005470063 (O sistema não conseguiu localizar o caminho especificado)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Related Image Field does not work if the asset has an uppercase file extension

    GitHub | 2 years ago | wezell
    java.io.FileNotFoundException: /data/master-2.5/tomcat/webapps/../../dotCMS/assets/6/5/6509472e-310a-4f91-bc75-26a989b666d7/fileAsset/showtime-penny-deadful.png (No such file or directory)
  6. 0

    [0.13.7] FileNotFoundException: /Users/foo/.m2/settings.xml (No such file or directory)

    GitHub | 2 years ago | eed3si9n
    java.io.FileNotFoundException: /Users/foo/.m2/settings.xml (No such file or directory)

  1. gehel 2 times, last 1 week ago
  2. Kialandei 100 times, last 1 week ago
  3. Reich 1 times, last 2 weeks ago
  4. bluebunnty 1 times, last 2 weeks ago
  5. Aria Pahlavan 1 times, last 2 weeks ago
43 more registered users
52 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.io.FileNotFoundException

    /tmp/ConstitutionofIreland.pdf (No such file or directory)

    at java.io.FileInputStream.open()
  2. Java RT
    FileInputStream.<init>
    1. java.io.FileInputStream.open(Native Method)
    2. java.io.FileInputStream.<init>(FileInputStream.java:146)
    2 frames
  3. edu.sdsc.grid
    FileFactory.newFileInputStream
    1. edu.sdsc.grid.io.local.LocalFileInputStream.open(LocalFileInputStream.java:171)
    2. edu.sdsc.grid.io.GeneralFileInputStream.<init>(GeneralFileInputStream.java:145)
    3. edu.sdsc.grid.io.local.LocalFileInputStream.<init>(LocalFileInputStream.java:139)
    4. edu.sdsc.grid.io.FileFactory.newFileInputStream(FileFactory.java:630)
    4 frames
  4. DSpace Kernel :: API and Implementation
    BitstreamTest.testRegister
    1. org.dspace.storage.bitstore.BitstreamStorageManager.register(BitstreamStorageManager.java:413)
    2. org.dspace.content.Bitstream.register(Bitstream.java:238)
    3. org.dspace.content.BitstreamTest.testRegister(BitstreamTest.java:146)
    3 frames