Bug 1446072

Summary: JBoss ON Server fails to start after upgrade from update 05 to 08 due to deprecated system config fields: PARTITION_EVENT_PURGE and RESOURCE_CONFIG_HISTORY_PURGE
Product: [JBoss] JBoss Operations Network Reporter: bkramer <bkramer>
Component: UpgradeAssignee: Michael Burman <miburman>
Status: CLOSED ERRATA QA Contact: Filip Brychta <fbrychta>
Severity: medium Docs Contact:
Priority: urgent    
Version: JON 3.3.8CC: fbrychta, spinder
Target Milestone: DR01Keywords: Triaged
Target Release: JON 3.3.9   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-10-02 17:21:51 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:

Description bkramer 2017-04-27 08:15:59 UTC
Description of problem:

After running update 08 on JBoss ON 3.3.5 server fails to start with the message:

*********************************************
ERROR [org.jboss.as.ejb3] (pool-6-thread-1) JBAS014268: Failure in caller transaction.: java.lang.NullPointerException
at org.rhq.enterprise.server.system.SystemManagerBean.transformSystemConfigurationPropertyFromDb(SystemManagerBean.java:523) [rhq-server.jar:4.12.0.JON330GA-redhat-8]
at org.rhq.enterprise.server.system.SystemManagerBean.fillCache(SystemManagerBean.java:956) [rhq-server.jar:4.12.0.JON330GA-redhat-8]
at org.rhq.enterprise.server.system.SystemManagerBean.loadSystemConfigurationCache(SystemManagerBean.java:482) [rhq-server.jar:4.12.0.JON330GA-redhat-8]
at org.rhq.enterprise.server.system.SystemManagerBean.getCachedObfuscatedSettings(SystemManagerBean.java:927) [rhq-server.jar:4.12.0.JON330GA-redhat-8]
at org.rhq.enterprise.server.system.SystemManagerBean.getObfuscatedSystemSettings(SystemManagerBean.java:252) [rhq-server.jar:4.12.0.JON330GA-redhat-8]
...
*********************************************

Version-Release number of selected component (if applicable):
Upgrade from JBoss ON 3.3.5 to 3.3.8

How reproducible:
Always

Steps to Reproduce:
Red Hat JBoss Operations Network (ON) 3.3.5;
1. Make any change in the System Configuration page in JBoss ON UI by following instructions in the Red Hat knowledge solution: It is not possible to save changes in the system settings of the JBoss ON UI (https://access.redhat.com/solutions/2165051);
2. Apply update 08;
3. Start JBoss ON;


Actual results:
Server fails to start and above error is logged in the server.log file.


Expected results:
No error is logged and server is properly started.

Additional info:

It seems that SystemSetting.getByInternalName(configKey) [1] method returns null for properties PARTITION_EVENT_PURGE and RESOURCE_CONFIG_HISTORY_PURGE. Looking at the SystemSetting.java [2], properties PARTITION_EVENT_PURGE and RESOURCE_CONFIG_HISTORY_PURGE are not found and because of that "null" is returned.


[1] https://github.com/rhq-project/rhq/blob/RHQ_4_12_0_JON338GA/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/system/SystemManagerBean.java#L941
[2] https://github.com/rhq-project/rhq/blob/RHQ_4_12_0_JON338GA/modules//core/domain/src/main/java/org/rhq/core/domain/common/composite/SystemSetting.java

Comment 1 Michael Burman 2017-08-03 10:23:27 UTC
Fixed in the master:

commit 5e8cd03d7e5be01f4373624c9cf36664d810cea2
Author: Michael Burman <miburman>
Date:   Thu Aug 3 13:23:00 2017 +0300

    [BZ 1446072] Fix NPE when encountering obsolete config property

Comment 3 Simeon Pinder 2017-09-01 15:34:15 UTC
Moving to ON_QA as available for test with the following binary:
http://download.eng.bos.redhat.com/brewroot/packages/org.jboss.on-jboss-on-parent/3.3.0.GA/133/maven/org/jboss/on/jon-server-patch/3.3.0.GA/jon-server-patch-3.3.0.GA.zip

*NOTE Build represents JON 3.3.9 DR01 build.

Please report issues as you encounter them.

Comment 6 errata-xmlrpc 2017-10-02 17:21:51 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://access.redhat.com/errata/RHEA-2017:2846