Bug 1320478

Summary: NPE in server.log Error persisting trait data
Product: [JBoss] JBoss Operations Network Reporter: Filip Brychta <fbrychta>
Component: Core ServerAssignee: Josejulio Martínez <jmartine>
Status: CLOSED ERRATA QA Contact: Prachi <pyadav>
Severity: low Docs Contact:
Priority: low    
Version: JON 3.3.5CC: jmartine, pyadav, spinder
Target Milestone: ER01Keywords: Triaged
Target Release: JON 3.3.6   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-27 15:33:28 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
exception none

Description Filip Brychta 2016-03-23 10:19:45 UTC
Created attachment 1139480 [details]
exception

Description of problem:
This is just random exception found in server.log -> no clear repro steps.

Any advice when this can happen will help to find repro steps.
Log is attached.

Version-Release number of selected component (if applicable):
JON 3.3.5 with eap plugin pack update04-DR01

Comment 1 Josejulio Martínez 2016-06-01 16:18:41 UTC
After taking a peek on the code, it seems that it could happen when trying to add a MeasurementDataTrait that has null on its 'value' attribute.

Do you know if is it possible to happen?

If that's the case, it will skip the whole batch of trait data on this NPE.

Comment 2 Josejulio Martínez 2016-06-01 20:52:51 UTC
It seems that it can be null [1][2].

Made a PR, Test if value is not null before using it.
https://github.com/rhq-project/rhq/pull/263

[1] gaYak: Yea, I think traits can have null if it's not available on the destination
[2] https://github.com/josejulio/rhq/blob/db260b10b1918b73dc0de213f6cbd000fb4f1dac/modules/plugins/wfly-10/src/main/java/org/rhq/modules/plugins/wildfly10/BaseServerComponent.java#L1006-L1011

Comment 3 Josejulio Martínez 2016-06-04 03:46:53 UTC
commit 471fe45983d3be68aa0e618c486ecc352fc27476
Merge: c7014c2 bc3d7ec
Author: Michael Burman <yak>
Date:   Fri Jun 3 15:29:06 2016 +0300

    Merge pull request #263 from josejulio/bugs/1320478
    
    Bug 1320478 - NPE in server.log Error persisting trait data

commit bc3d7ecad06d18655c2fd9e4827c9bb3c0195c4d
Author: Josejulio Martínez <jmartine>
Date:   Wed Jun 1 15:25:19 2016 -0500

    Bug 1320478 - NPE in server.log Error persisting trait data
    
     Test if value is not null before using it.

Comment 5 Simeon Pinder 2016-07-07 08:22:47 UTC
Moving to ON_QA as available to test with the following build:
https://brewweb.engineering.redhat.com/brew/buildinfo?buildID=502442

Note: 	jon-server-patch-3.3.0.GA.zip maps to JON 3.3.6(jon-server-3.3.0.GA-update-06.zip)

Comment 6 Prachi 2016-07-14 15:31:37 UTC
 verified in JON 3.3.6 ER01

 performed added a MeasurementDataTrait that has null on its 'value' attribute but did not find NPE in server.log

Comment 7 errata-xmlrpc 2016-07-27 15:33:28 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2016-1519.html