Bug 928971
Summary: | No *Manager or ProxyFactory works in CLI alert scripts | ||
---|---|---|---|
Product: | [Other] RHQ Project | Reporter: | Lukas Krejci <lkrejci> |
Component: | Alerts, CLI | Assignee: | Nobody <nobody> |
Status: | ON_QA --- | QA Contact: | |
Severity: | urgent | Docs Contact: | |
Priority: | unspecified | ||
Version: | 4.6 | CC: | hrupp |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | Type: | Bug | |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Lukas Krejci
2013-03-28 21:37:54 UTC
Actually this is unbelievably more serious than the description - no *Manager can't be used either, making CLI alert scripts completely unusable. Updating the title of the bug to reflect that. http://git.fedorahosted.org/cgit/rhq/rhq.git/commit/?id=fe8952cf9631c2d839f9e37d53f8c1aa1bb04b83 master fe8952cf9631c2d839f9e37d53f8c1aa1bb04b83 Author: Lukas Krejci <lkrejci> Date: Fri Mar 29 16:06:45 2013 +0100 Fix classloading issues when defining objects in the std script context. It seems that the change of the container to AS7 has caused a regression in the CLI alert scripts that were no longer able to properly define the standard context provided to scripts by RHQ. This is fixed by using a differently configured Javassist's ClassPool during the various class modifications we use to prepare the *Manager objects and when generating a resource proxy in ProxyFactory. Also, the errors that can happen during the various stages of this setup are now thrown up the chain instead of merely logged so that errors like this are apparent - it is not something the user should be expected to deal with. http://git.fedorahosted.org/cgit/rhq/rhq.git/commit/?id=99bbd52d13b16fe57c80c6dab7230942cfd49560 commit 99bbd52d13b16fe57c80c6dab7230942cfd49560 Author: Lukas Krejci <lkrejci> Date: Fri Mar 29 17:04:21 2013 +0100 [BZ 928971] - ClassPoolFactory is now resilient against context classloader changes The instance must not be cached because it could be using a wrong context classloader if that changed between invocations. Also made changes to lower the numbder of instances of the ClassPool in the created while using the ConfigurationClassBuilder. This, in addition to commit fe8952cf9631c2d839f9e37d53f8c1aa1bb04b83 (which I failed to annotate with the BZ number), should fix the bug. http://git.fedorahosted.org/cgit/rhq/rhq.git/commit/?id=1d605edf14fde97c3986fd376e5f41d7e6194bae commit 1d605edf14fde97c3986fd376e5f41d7e6194bae Author: Lukas Krejci <lkrejci> Date: Wed Apr 3 14:28:57 2013 +0200 [BZ 928971] - Return the same class pool for the same context classloader so that the class cache of the class pool is consistent with what has been defined using given classloader. This should prevent the possible linkage errors when trying to define a single class multiple times in the same classloader which could have happened before this change. http://git.fedorahosted.org/cgit/rhq/rhq.git/commit/?id=014545b4e2ac3ac07413ffae42a2b06e0e5926ed commit 014545b4e2ac3ac07413ffae42a2b06e0e5926ed Author: Lukas Krejci <lkrejci> Date: Wed Apr 3 20:17:49 2013 +0200 [BZ 928971] - Set the correct classloader for the dynamically created resource proxy classes. |