Hi,

I have a plugin that connects to an SQL Database to gather information for some metrics. It works okay until I restart the plugin from the RHQ UI (Agent>Operations>New>Restart Agent>Schedule)

After this, when the plugin tries to connect to the Database I get this error:
java.sql.SQLException: I/O Error: SSO Failed: Native SSPI library not loaded. Check the java.library.path system property

ntlmauth.dll is used by Windows Authentication and exists in the path. I did some research on the web, it seems, Windows and Java hove some issues when it comes to loading DLLs... 

from http://www.eclipsezone.com/articles/eclipse-vms 

"It's worth bearing in mind that Windows and Java have some issues when it comes to loading DLLs. A DLL can only be loaded once in a VM and only associated with one ClassLoader. If you have two ClassLoaders, and they attempt to load the same DLL, then the second one will fail and not be able to execute any native code. As a result of this, you cannot have two bundles that attempt to load the same native code in EclipseThis will also apply if the bundle is updated or restarted, because the old ClassLoader may retain a reference to the DLL whilst the new one starts. This is a Windows-specific problem that doesn't appear to manifest itself on other operating systems." 

Has anyone encountered this problem before? Is there a workaround for this in RHQ?

Thanks,
Mike