Bug 693700

Summary: NPE when deploying updated plugin
Product: [Other] RHQ Project Reporter: Heiko W. Rupp <hrupp>
Component: Core ServerAssignee: Heiko W. Rupp <hrupp>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: unspecified Docs Contact:
Priority: medium    
Version: 4.0.0.Beta2CC: hrupp, skondkar
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 4.1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-02 03:20:57 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Attachments:
Description Flags
Possible Patch none

Description Heiko W. Rupp 2011-04-05 07:27:16 EDT
While deploying my updated as7plugin server shows this NPE

Caused by: java.lang.NullPointerException
        at org.rhq.enterprise.server.configuration.metadata.ConfigurationMetadataManagerBean.replaceListProperty(ConfigurationMetadataManagerBean.java:460)
        at org.rhq.enterprise.server.configuration.metadata.ConfigurationMetadataManagerBean.updatePropertyDefinition(ConfigurationMetadataManagerBean.java:360)
        at org.rhq.enterprise.server.configuration.metadata.ConfigurationMetadataManagerBean.updateConfigurationDefinition(ConfigurationMetadataManagerBean.java:76)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
        at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
Comment 1 Heiko W. Rupp 2011-04-05 07:56:20 EDT
The bad guy is this resource config definition:

            <resource-configuration>
                <c:list-property name="server-config" />
            </resource-configuration>


so we need to:

a) prevent the NPEs
b) enhance the schema in a way that list-properties can not be empty.
Comment 2 Heiko W. Rupp 2011-04-06 07:59:11 EDT
Created attachment 490245 [details]
Possible Patch

THis patch prevents the NPE on empt <c:list-property/> tags. Now the schema would allow such empty tags, but I doubt that they are used in practice, as this would have bombed every time and we would have been notified before.
Comment 3 Heiko W. Rupp 2011-04-13 07:21:59 EDT
NPE prevention is 7660aec86b71f0c90945bfacf8f9831af4de11dd in as7plugin
and
cherry-picked as e9639a9b7f4cb834a5485fd66c8cd980d6c1fbe0 on master.
Comment 4 Sunil Kondkar 2011-07-19 04:52:08 EDT
Verified on build#207 (Version: 4.1.0-SNAPSHOT Build Number: a9d262f)

NPE is not observed in the server log while deploying the as7 plugin.

Marking as verified.
Comment 5 Heiko W. Rupp 2013-09-02 03:20:57 EDT
Bulk closing of issues that were VERIFIED, had no target release and where the status changed more than a year ago.