Bug 712444

Summary: when fatal validation errors occur during agent plugin descriptor parsing, the errors are not logged
Product: [Other] RHQ Project Reporter: Ian Springer <ian.springer>
Component: Core ServerAssignee: Ian Springer <ian.springer>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.0.1CC: ccrouch, 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: 2012-02-07 19:17:56 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 678340    

Description Ian Springer 2011-06-10 16:13:25 UTC
An exception is thrown, but the specific reason(s) validation failed are not logged.

Comment 1 Ian Springer 2011-06-10 16:23:48 UTC
Fixed - [master 11c98ce]. A message is now logged for each validation error found while parsing a plugin descriptor, e.g.:

[ERROR] Validation fatal error while parsing [jopr-jboss-as-plugin-4.1.0-SNAPSHOT.jar:META-INF/rhq-plugin.xml] at line 221, column 94: cvc-minInclusive-valid: Value '20000' is not facet-valid with respect to minInclusive '30000' for type '#AnonType_defaultIntervalmetric'.

Comment 2 Mike Foley 2011-06-23 18:32:25 UTC
verified as follows:  starting with a valid plug-in, i created an invalid plugin.  imported it.  reviewed server log.  confirmed the error is logged properly.  documenting the log message from this verification below:

2011-06-23 14:04:17,726 ERROR [org.rhq.core.clientapi.descriptor.AgentPluginDescriptorUtil] Validation fatal error while parsing [BADpattern-plugin-4.0.0-SNAPSHOT.jar:META-INF/rhq-plugin.xml] at line 17, column 9: Element type "server" must be followed by either attribute specifications, ">" or "/>".
2011-06-23 14:04:17,727 WARN  [org.rhq.enterprise.server.core.plugin.PluginDeploymentScanner] Does not look like [/root/rhq/rhq-server-4.1.0-SNAPSHOT/plugins/BADpattern-plugin-4.0.0-SNAPSHOT.jar.fixme] is a plugin jar -(Cause: java.lang.NullPointerException:no xml descriptor found in jar). It will be ignored. Please fix that file or remove it.
2011-06-23 14:04:45,895 WARN  [org.rhq.enterprise.client.LocalClientProxy] Proxied invocation of method [public abstract org.rhq.core.domain.resource.Resource

Comment 3 Mike Foley 2012-02-07 19:17:56 UTC
changing status of VERIFIED BZs for JON 2.4.2 and JON 3.0 to CLOSED/CURRENTRELEASE