Hi,
I'm developing a web page to monitor the movements of a stepper motor, using Phidgets, which uses a native library. I'm running
Tomcat 10 on a Raspberry Pi.
When I first boot the pi and start the server, it all works. But if I update the war file and upload it to the pi, I get an unsatisfied link error:
java.lang.ExceptionInInitializerError: Native Library /usr/lib/libphidget22java.so.0.0.0 already loaded in another classloader
So it looks like in the process of updating the war file, libphidget22java.so isn't being unloaded and so isn't free to be reloaded.
I can get round it by rebooting the pi every time I want to upload a new war file, but I have a lot of development to do! Is there a way to release the libphidget22java.so from the classloader?
Thanks,
John