Hide Forgot
Description of problem: Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
*argh* I <censored> BZ Null pointer exception in plugin update - perhaps having to do with making an property required which was not before javax.ejb.EJBTransactionRolledbackException: java.lang.NullPointerException at $Proxy333.updatePluginConfigurationDefinition(Unknown Source) at org.rhq.enterprise.server.resource.metadata.ResourceMetadataManagerBean.mergeExistingType(ResourceMetadataManagerBean.java:394) at org.rhq.enterprise.server.resource.metadata.ResourceMetadataManagerBean.updateType(ResourceMetadataManagerBean.java:375) at org.rhq.enterprise.server.resource.metadata.ResourceMetadataManagerBean.updateTypes(ResourceMetadataManagerBean.java:141) Caused by: java.lang.NullPointerException at org.rhq.enterprise.server.resource.metadata.PluginConfigurationMetadataManagerBean.updateResourcePluginConfiguration(PluginConfigurationMetadataManagerBean.java:109) at org.rhq.enterprise.server.resource.metadata.PluginConfigurationMetadataManagerBean.updatePluginConfigurationDefinition(PluginConfigurationMetadataManagerBean.java:83)
if (propertyDef.isRequired()) { Property templateProperty = templateConfiguration.get(propertyDef.getName()); TemplateProperty can be null if the entry in the descriptor has no 'default' attribute set. Unfortunately it is close to unclear when to use 'defaultValue' and when 'default' Bad definition: <c:simple-property name="startScript" type="file" defaultValue="bin/standalone.sh" description="Script used to start the server. If the path is not absolute, it is relative to the base directory"/> in the plugin-configuration of a plugin. I am not sure if we should only log a big fat error or throw an exception here (which describes what went wrong).
If the attribute 'default' is not present on a required property, a more descriptive exception is now thrown: 17:20:40,331 ERROR [ProductPluginDeployer] Failed to register RHQ plugin file [file:/im/dev-container/jbossas/server/default/deploy/rhq.ear/rhq-downloads/rhq-plugins/rhq-jboss-as-7-plugin-4.1.0-SNAPSHOT.jar] javax.ejb.EJBTransactionRolledbackException: java.lang.IllegalArgumentException: The property [baseDir] marked as required in the configuration definition of [JBossAS7-Standalone] has no attribute 'default' This will help the developer fix his plugin. As production will only use plugins that are correct, is not applicable there anyway. Logging would have been an option, but this way it is more clear that the developer needs to fix his code. d84b67b on as7plugin branch
ae90811cb on master