Bug 750224
Summary: | Attempting to update configuration throws NullPointerException | ||
---|---|---|---|
Product: | [Other] RHQ Project | Reporter: | Nabeel Saad <nsaad> |
Component: | CLI | Assignee: | John Mazzitelli <mazz> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Mike Foley <mfoley> |
Severity: | high | Docs Contact: | |
Priority: | urgent | ||
Version: | 3.0.0 Beta1 | CC: | gcooper, hrupp, mazz |
Target Milestone: | --- | ||
Target Release: | JON 3.0.0, RHQ 4.3.0 | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 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: | 745494 |
Description
Nabeel Saad
2011-10-31 11:44:35 UTC
do you really want to set the RESOURCE configuration? Sounds like you want to set the JNP URL used by the plugin to connect to your resource. This is PLUGIN configuration. Different configuration and its a different API to set. That said, we should still check for the NPE. Still, I think you are trying to set the wrong configuration. I assume you want to set the plugin configuration, not the resource configuration. for the record, the fix to check for the null pointer would be to wrap a null check around the line: return ConfigurationFormat.STRUCTURED_AND_RAW == configDef.getConfigurationFormat(); since it appears configDef is null in this case. This is in ConfigurationManagerBean. To be clear, I think you want to call this API to set the plugin configuration: org.rhq.enterprise.server.configuration.ConfigurationManagerBean.updatePluginConfiguration(Subject, int, Configuration) added NPE check. if there is no resource config def, we return false in that method rather than throw a null pointer exception since clearly, if there is a null config def, we don't support raw or structured config. master commit: d3c98cad366e38d11e78a692a31c3dc434fc87b3 release_jon3.x commit: fc4ac3fb4e0e754fb634e105fc396d5e9b80d934 Hello John, Thanks a lot for all this follow up. I'm glad I caught this NPE regardless of what I was trying to do. Yes, I am trying to set the JNP URL, so I will try out the "updatePluginConfiguration" method that you suggested. Cheers. verified the original issue with the NPE marking VERIFIED JON 3 bugs to CLOSED/CURRENTRELEASE changing status of VERIFIED BZs for JON 2.4.2 and JON 3.0 to CLOSED/CURRENTRELEASE |