I have not encountered that or noticed that before, but I don't do much work on Windows.
A workaround could be to not use that Restart Agent operation on the RHQ Agent resource itself - use the launcher restart operation instead.
If you read the description of that operation that you used, it specifically says it doesn't restart the VM:
"Shuts down the agent's comm layer and plugin container and starts them up again. This does *not* restart the agent's VM - use the launcher services to do that."
As per the link you posted - if you don't restart the VM, Windows will have problems reloading that DLL. So don't use that operation to restart.
Instead, the workaround may be to use the child launcher resource to do the restart (which WOULD restart the VM and presumably avoid this problem you see).
Since you are on Windows, I think you'd want to restart your agent using the agent's child service of the type "Java Service Wrapper Launcher" which has an operation "Restart". The description is "Restarts the Java Service Wrapper and the agent it contains. This will completely kill the agent VM process (if it is running as this service) and then attempt to restart it. If the agent executing this operation will quickly die, no confirmation will be available as to the success or failure of this operation."
----- Original Message -----
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 Eclipse . This 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
rhq-users mailing list rhq-users@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/rhq-users