Search code examples
installationinstall4j

install4j: compilation failed. Reason: java.io.IOException. The requested operation cannot be performed on a file with a user-mapped section open


We have a installer project written in install4j 6.1. When the installer is getting build either manually or through Jenkins pipeline we are getting compilation error as : "install4j: compilation failed. Reason: java.io.IOException. The requested operation cannot be performed on a file with a user-mapped section open"

The stack trace also gives below error: Caused by: java.io.IOException: The requested operation cannot be performed on a file with a user-mapped section open at java.io.RandomAccessFile.setLength(Native Method)

We tried restarting the system also tried cleaning up user temp directories. Also tried disabling the anti-virus and killed the explorer.exe processes. Even the process explorer was not giving any hint related to any file lock. Does anyone has any idea how to resolve this issue.


Solution

  • There were some settings which were made recently by the antivirus program due to which the file was getting locked. After updating the settings the builds are working fine now.