Custom plugin re-initilize automatically on delete

Hi,

I just coded a custom plugin for openfire and it works fine but when i delete it from Admin console. It acts in a very strange way. The admin panel shows a success message but it does not actually remove the plugin from the admin console. When i check logs i see the messages from the initilizeplugin function, i have written. So it basically start unloading jar files and at the end it just execute the initilize function of my plugin and reloads the plugin.

I am not able to figure put what’s actually causing this issue? when i remove the folder and jar files manually from /opt/openfire/plugins folder, it works but can someone guide me why it does not delete the plugin from the admin panel?

Moreover i see this issue on CentOS 7. On my local windows setup it works fine but i am not sure because on CentOS server it is running for some time and has a lot of active openfire sessions, so this might be causing the issue with the plugin

How are you installing the plugin into Openfire? Are you certain that the Linux process owner of Openfire has full read/write permissions on that plugin folder to properly delete it from disk?

In the past there were problems with plugin file having uppercase letters, e.g. Plugin.jar vs plugin.jar. Linux is case sensitive. If Admin Console tries to delete plugin.jar and it’s named Plugin.jar, it will fail.