I'm really hoping that the following rings a bell with someone as we're running out of ideas. Answers or suggestions on how to further diagnose would be much appreciated.
We have a Java app that has been running with no problems for 18 months. It is now moving to a new platform running Windows Server 2019 Standard as a VM. On first install everything runs correctly, but periodically the application fails to start and can then only be fixed by re-copying all the jar files. This is temporary as eventually it fails again.
After a lot of monitoring we noticed that there is a Windows process that periodically sets the "L" file attribute on all the files and also creates reparse data. This should not be an issue but once this has happened, the JVM is unable to start the application. (any Windows-whizzes have an idea on what does this?)
A key point is that the app is started by specifying JPMS parameters such as:
java -p MyApp.jar;MyApp_mods -m mymodule/mypackage.StartGUI
This runs well unit the "L" attribute is set on the jar files and then fails with message:
Error occurred during initialization of boot layer
java.lang.module.FindException: Module format not recognized: MyApp.jar
Renaming MyApp.jar to something else and then copying it back to MyApp.jar fixes the problem as it creates a file without the L attribute and the reparse data (until the process re-applies it)
This behaviour does not just apply to this one operation, but to any where the module system is used such as:
java --list-modules any-jar-in-the-app.jar
Interestingly(!) if we try a simpler, non-modular app and run as:
java -jar MySimpleApp.jar
then the app runs correctly even with the L attribute set.
Clearly we don't fully understand, but it looks as if running via the module system somehow means that files with the L attribute/reparse data cannot be read (?)
We've tried both the OpenJDK hotspot and OpenJ9 JVMs in various versions but with the same result. Any ideas?