powered by Jive Software

Error on Plugin unloading

Hello Folks,

First, thanks for the great open-source product!

Second, my custom plugin is not unloading properly when I try a hot deploy or when I delete the *.jar file by hand. Here is the error:


2006.03.28 14:24:26 [org.jivesoftware.wildfire.container.PluginManager$PluginMonitor.run(PluginMana ger.java:587)

] Error unloading plugin maya-server-jive-plugin-0.1. Will attempt again momentarily.


I traced the error to where the PluginManager attempts to deleteDir the expanded plugin directory. This fails since Windows is still hanging onto this. I also tried by hand, and Windows said the directory was in use.

The key is that this only occurs when I attempt to run Hibernate in my plugin to access the database.

How can I properly unload Hibernate libraries so that the expanded directory can be deleted by Windows?

Wildfire 2.5.1

Windows XP

Thanks folks. This is not a show stopper, since I just stop and restart Wildfire manually when I deploy a new version of the plugin.

Hey bluestars,

Wildfire will be able to unload a plugin when there are no objects dangling in memory that were created by the plugin. So my first recommendation would be to review the code and eventually do a profiling of the memory of your plugin to detect possible objects that are kept in memory forever. Possible reasons could be: object is kept in a static variables or is being referenced by another object that is going to stay in memory for a long time (e.g. register a component and never remove the component), etc. Finally, it may also be possible that all objects were removed but the JVM has not performed a full GC so objects are still having fun in memory thus preventing the plugin to be unloaded.

Hope that helps,


– Gato