I am using ant to run emma instrumentation under Eclipse(Actually it is IBM Rational Application Developer 7.0) When I set instrument option merge = "fasle", the first run works fine. But the second time fails. It gives me "[OUT_IO_FAILURE] exception occurred while writing output file [C:\Build\server\metadata.emma]" error message in the build console. I know it is because the file is locked by emma. And I can only delete the metadata file after I restart RAD. Any idea about how I can unlock the file so that I can run the instrumentation repeatedly without restarting RAD?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Make sure you execute the Ant script in a separate VM (Extenal Tools > JRE >Separate JRE). Then the lock should be released after the script terminates. If the file is still locked, you can find the lock owner with tools like the Process Explorer:
Thanks Marc. Your information is very valuable.
RAD has custom ant build task like ProjectBuild, EjbDeploy which forces workspace JRE to be used.
I did use Process Explorer to find out eclipse javaw.exe holds the metadata file handle.
Is it a bug in emma that the file is not closed properly?
another question, why the metadata file keeps increaing if I use default "Merge = true" when doing instrumentation? I thought Emma should only update the file with new changes.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am using ant to run emma instrumentation under Eclipse(Actually it is IBM Rational Application Developer 7.0) When I set instrument option merge = "fasle", the first run works fine. But the second time fails. It gives me "[OUT_IO_FAILURE] exception occurred while writing output file [C:\Build\server\metadata.emma]" error message in the build console. I know it is because the file is locked by emma. And I can only delete the metadata file after I restart RAD. Any idea about how I can unlock the file so that I can run the instrumentation repeatedly without restarting RAD?
Make sure you execute the Ant script in a separate VM (Extenal Tools > JRE >Separate JRE). Then the lock should be released after the script terminates. If the file is still locked, you can find the lock owner with tools like the Process Explorer:
http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx
Best regards,
-marc
Thanks Marc. Your information is very valuable.
RAD has custom ant build task like ProjectBuild, EjbDeploy which forces workspace JRE to be used.
I did use Process Explorer to find out eclipse javaw.exe holds the metadata file handle.
Is it a bug in emma that the file is not closed properly?
another question, why the metadata file keeps increaing if I use default "Merge = true" when doing instrumentation? I thought Emma should only update the file with new changes.