java.io.FileNotFoundException: output/data/server/FIX.4.2-test-exchange-test-sender.body (No such file or directory)

QuickFIX/J JIRA | Steve Bate | 1 decade ago
  1. 0

    Ok, my apologies for sending an incomplete email earlier. Had an "enter key" malfunction. I'm working on a multi-module project driven by Maven (instead of ant), where couple of the modules use QuickfixJ. The directory layout is as follows: parentModule - childModule - src - test - java *.java files are here I'm noticing a very strange situation: i have a unit test that runs just fine if you run it directly from the <childModule> directory, it initializes the Session correctly which creates the appropriate output/ and store/ directories for FIX.4.2-xxx files. However, if i run the same test from a parent directory (ie one level up) then it fails in to create/locate the output/ directory: java.io.FileNotFoundException: output/data/server/FIX.4.2-test-exchange-test-sender.body (No such file or directory) java.lang.RuntimeException: java.io.FileNotFoundException: output/data/server/FIX.4.2-test-exchange-test-sender.body (No such file or directory) at quickfix.FileStoreFactory.create(FileStoreFactory.java:65) at quickfix.Session.<init>(Session.java:191) at quickfix.DefaultSessionFactory.create(DefaultSessionFactory.java:125) at quickfix.mina.acceptor.AbstractSocketAcceptor.createSessions(AbstractSocketAcceptor.java:129) with the real error coming from here: Caused by: java.io.FileNotFoundException: output/data/server/FIX.4.2-test-exchange-test-sender.body (No such file or directory) at java.io.RandomAccessFile.open(Native Method) at java.io.RandomAccessFile.<init>(Unknown Source) at java.io.RandomAccessFile.<init>(Unknown Source) at quickfix.FileStore.initialize(FileStore.java:97) at quickfix.FileStore.<init>(FileStore.java:87) at quickfix.FileStoreFactory.create(FileStoreFactory.java:63) I've traced the cause of the error itself to a Maven bug (incorrect working dir setup) which i've filed with them: http://jira.codehaus.org/browse/MSUREFIRE-133 In QuickFixJ it gets manifested in quickfix.FileStore class constructor. If the incoming "path" is changed to be an absolute path (instead of relative) the rest of initialization works fine. I understand this a maven bug and not Quickfix, but i was hoping you would incorporate the workaround for it anyway b/c it makes sense regardless: it's just to take the incoming path and to always treat it as an absolute path. That makes the code more defensive. It's a one-line change. all the unit tests pass. I"m attaching a patch for the changes (it's just one line). toli

    QuickFIX/J JIRA | 1 decade ago | Steve Bate
    java.io.FileNotFoundException: output/data/server/FIX.4.2-test-exchange-test-sender.body (No such file or directory)
  2. 0

    TestNG ant task: runs in Windows but not in Mac OS X

    Google Groups | 5 years ago | Omair-Inam Abdul-Matin
    java.io.FileNotFoundException: test-output/testng.css (No such file or directory)
  3. 0

    TestNG ant task: runs in Windows but not in Mac OS X

    Google Groups | 5 years ago | Omair-Inam Abdul-Matin
    java.io.FileNotFoundException: test-output/testng.css (No such file or directory)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    ResilientOutputStreamTest fails on my machine: Running ch.qos.logback.core.recovery.ResilientOutputStreamTest Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.012 sec <<< FAILURE! verifyRecuperationAfterFailure(ch.qos.logback.core.recovery.ResilientOutputStreamTest) Time elapsed: 0.001 sec <<< ERROR! java.io.FileNotFoundException: target/test-output/resilient1783730924.log (No such file or directory) at java.io.FileOutputStream.openAppend(Native Method) at java.io.FileOutputStream.<init>(FileOutputStream.java:207) at ch.qos.logback.core.recovery.ResilientFileOutputStream.<init>(ResilientFileOutputStream.java:28) at ch.qos.logback.core.recovery.ResilientOutputStreamTest.verifyRecuperationAfterFailure(ResilientOutputStreamTest.java:27) 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:616) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222) at org.junit.runners.ParentRunner.run(ParentRunner.java:300) at org.junit.runners.Suite.runChild(Suite.java:128) at org.junit.runners.Suite.runChild(Suite.java:24) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:679) I need to create the directories manually: $ mkdir -p logback-core/target/test-output/

    QOS.ch JIRA | 4 years ago | Gabriel Corona
    java.io.FileNotFoundException: target/test-output/resilient1783730924.log (No such file or directory)
  6. 0

    TestNG ant task: runs in Windows but not in Mac OS X

    Google Groups | 5 years ago | Omair-Inam Abdul-Matin
    java.io.FileNotFoundException: test-output/testng.css (No such file or directory)

    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

      output/data/server/FIX.4.2-test-exchange-test-sender.body (No such file or directory)

      at quickfix.FileStoreFactory.create()
    2. Apache ServiceMix :: Bundles :: ${pkgArtifactId}
      AbstractSocketAcceptor.createSessions
      1. quickfix.FileStoreFactory.create(FileStoreFactory.java:65)
      2. quickfix.Session.<init>(Session.java:191)
      3. quickfix.DefaultSessionFactory.create(DefaultSessionFactory.java:125)
      4. quickfix.mina.acceptor.AbstractSocketAcceptor.createSessions(AbstractSocketAcceptor.java:129)
      4 frames