DO NOT SUBMIT HELP REQUESTS TO JIRA.  INSTEAD USE THE MAILING LIST TO ASK FOR HELP.

QuickFIX/J

Intermittent File Handle Issues While Generating Code

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Default Default
  • Resolution: Unresolved
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: Build
  • Labels:
  • 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()) {
+ if (!task.isOverwrite()) {
+ return;
+ }
+ outputFile.delete();
         }
 
         DOMSource source = new DOMSource(document);

Thanks,
François

Activity

There are no comments yet on this issue.

People

Vote (0)
Watch (1)

Dates

  • Created:
    29/Jul/11 8:11 PM
    Updated:
    29/Jul/11 8:11 PM