Bug 1320478 - NPE in server.log Error persisting trait data
Summary: NPE in server.log Error persisting trait data
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: JBoss Operations Network
Classification: JBoss
Component: Core Server
Version: JON 3.3.5
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ER01
: JON 3.3.6
Assignee: Josejulio Martínez
QA Contact: Prachi
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-03-23 10:19 UTC by Filip Brychta
Modified: 2016-07-27 15:33 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-07-27 15:33:28 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
exception (31.59 KB, text/plain)
2016-03-23 10:19 UTC, Filip Brychta
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2016:1519 0 normal SHIPPED_LIVE Critical: Red Hat JBoss Operations Network 3.3.6 update 2016-08-26 00:44:36 UTC

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


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