Bug 693700 - NPE when deploying updated plugin
NPE when deploying updated plugin
Status: CLOSED CURRENTRELEASE
Product: RHQ Project
Classification: Other
Component: Core Server (Show other bugs)
4.0.0.Beta2
Unspecified Unspecified
medium Severity unspecified (vote)
: ---
: ---
Assigned To: Heiko W. Rupp
Mike Foley
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2011-04-05 07:27 EDT by Heiko W. Rupp
Modified: 2013-09-02 03:20 EDT (History)
2 users (show)

See Also:
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:


Attachments (Terms of Use)
Possible Patch (1.88 KB, patch)
2011-04-06 07:59 EDT, Heiko W. Rupp
no flags Details | Diff

  None (edit)
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.

Note You need to log in before you can comment on or make changes to this bug.