In Verastream Host Integrator (VHI) Design Tool, when re-building Java event handlers, the build may fail with an error when attempting to delete tmp\vhi_model.jar. This technical note explains how to resolve this issue.
This issue is identified by the following symptoms:
- You have a model with Java event handler custom scripting code.
- Your event handler was created in VHI version 6.6, and the model is opened in Design Tool version 6.6 or higher.
- Every other (alternating) time you click Events > Rebuild, you see a build failure message similar to the following:
[delete] Deleting directory C:\Program Files (x86)\Attachmate\Verastream\HostIntegrator\models\mymodel\scripts\build
[delete] Deleting: C:\Program Files (x86)\Attachmate\Verastream\HostIntegrator\models\mymodel\scripts\lib\vhi_model.jar
[delete] Deleting: C:\Program Files (x86)\Attachmate\Verastream\HostIntegrator\models\mymodel\scripts\tmp\vhi_model.jar
C:\Program Files (x86)\Attachmate\Verastream\HostIntegrator\models\mymodel\scripts\build.xml:76: Unable to delete file C:\Program Files (x86)\Attachmate\Verastream\HostIntegrator\models\mymodel\scripts\tmp\vhi_model.jar
Total time: 0 seconds
To resolve this issue, modify the build.xml file as follows:
- In a text editor, open the build.xml file located in your HostIntegrator\models\<model name>\scripts folder.
- Locate the existing clean target node:
- Insert lines as shown below:
After completing the above steps, the clean during rebuild will only delete the temporary vhi_model.jar file if it exists.