[QFJ-625] Intermittent File Handle Issues While Generating Code Created: 29/Jul/11  Updated: 29/Jul/11

Status: Open
Project: QuickFIX/J
Component/s: Build
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Default
Reporter: Francois Auger Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: QuickfixJ, ant
Environment:

Windows 7 Professional x64 (latest updates)
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02, mixed mode)



 Description   

Intermittently, we're having the following error while running the default ant task:

[java] SEVERE: error during code generation
[java] quickfix.codegen.CodeGenerationException: java.io.FileNotFoundException: target\generated-sources\messages\quickfix\fix50\component\UnderlyingInstrument.java (The requested operation cannot be performed on a file with a user-mapped section open)

The following patch has worked so far:

Index: quickfixj-local/core/src/main/java/quickfix/codegen/MessageCodeGenerator.java
===================================================================
— quickfixj-local/core/src/main/java/quickfix/codegen/MessageCodeGenerator.java (revision xyz)
+++ quickfixj-local/core/src/main/java/quickfix/codegen/MessageCodeGenerator.java (working copy)
@@ -269,8 +269,11 @@
}

File outputFile = new File(outputFileName);

  • if (!task.isOverwrite() && outputFile.exists()) {
  • return;
    + if (outputFile.exists())
    Unknown macro: {+ if (!task.isOverwrite()) { + return; + }+ outputFile.delete(); }

DOMSource source = new DOMSource(document);

Thanks,
François


Generated at Sat Apr 20 06:06:02 UTC 2024 using JIRA 7.5.2#75007-sha1:9f5725bb824792b3230a5d8716f0c13e296a3cae.