Hi,
I have a new Mac and the project moved to Java 21, and since then I can’t seem to get Hotswap to work.
Both " Debug with Hotswap agent" from the Vaadin plugin and just doing Debug with the hotswap flags set, doesn’t work.
I see that the Vaadin plugin uses Hotswap Agent 2.0.2, while I’ve picked 2.0.1 from the Hotswap Github page and installed it in my JBR libs/hotswap folder as documented.
When I run using Hotswap 2.0.2 (from the Vaadin Intellij plugin) I get
java.nio.file.FileSystemException: /<path-to>/out/production/resources/hotswap-agent.properties: Too many open files
Immediately followed by a bunch of NoClassDefFoundErrors.
To try and fixed this, I played with setting ulimit -n, I also try to add the -XX:-MaxFDLimit flag.
I tried overriding the limit on OS level in different ways (adding ulimit cmd in .zshrc) but also adding a file limit.maxfiles.plist in /Library/LaunchDaemons.
Although ulimit -n returns 65536, I see that my app crashes when it reaches about 12500 open files.
As a side note: on JBR 17 this worked just fine, since migrating to 21 and can’t get around this issue.
When I use Hotswap Agent 2.0.1, I don’t get the " Too Many Files" error. It immediately shows me the ClassDefNotFoundErrors. So I guess 2.0.2 just outputs a bit more logging.
I’ve been messing around with this for 2 days now, and I’m tired of it.
I think by now on my team the Vaadin / Hotswap plugin has cost us more than it has saved.
Is there someone with some experience with this?
Any help is appreciated.
Kind regards,
Kristof.