Bug 712311 - NPE in server, when a current res config can not be obtained
NPE in server, when a current res config can not be obtained
Status: CLOSED CURRENTRELEASE
Product: RHQ Project
Classification: Other
Component: Core Server (Show other bugs)
4.1
Unspecified Unspecified
medium Severity unspecified (vote)
: ---
: ---
Assigned To: Heiko W. Rupp
Mike Foley
:
Depends On:
Blocks: jon3-sprint1 715334
  Show dependency treegraph
 
Reported: 2011-06-10 05:26 EDT by Heiko W. Rupp
Modified: 2012-02-07 14:19 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-02-07 14:19:22 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Heiko W. Rupp 2011-06-10 05:26:31 EDT
Start a server with no agents running, go into inventory for a resource with config.
See the red bar showing up and the server log showning

Caused by: java.lang.NullPointerException
        at org.rhq.enterprise.server.configuration.ConfigurationManagerBean.getLatestResourceConfigurationUpdate(ConfigurationManagerBean.java:419)
        at org.rhq.enterprise.server.configuration.ConfigurationManagerBean.getLatestResourceConfigurationUpdate(ConfigurationManagerBean.java:431)

This comes from the fact that we 


        } catch (NoResultException nre) {
            // The Resource hasn't been successfully configured yet - return null.
            current = null;
        }

earlier in the method, but all the if() that may return from the method, are skipped.
Comment 1 Heiko W. Rupp 2011-06-14 04:15:01 EDT
master: 9c04e5b
Comment 2 Sunil Kondkar 2011-06-16 04:58:51 EDT
Verified on build#140 (Version: 4.1.0-SNAPSHOT Build Number: 5905b70)

Navigated to the configuration tab of a RHQ Agent when the agent was not running.
The sever log does not display any exception. It displays the configuration details and the server log displays below:

2011-06-16 14:15:59,977 WARN  [org.rhq.enterprise.server.configuration.ConfigurationManagerBean] Agent is unreachable [Agent[id=10001,name=suniltest,address=10.65.201.124,port=16163,remote-endpoint=socket://10.65.201.124:16163/?rhq.communications.connector.rhqtype=agent&numAcceptThreads=1&maxPoolSize=303&clientMaxPoolSize=304&socketTimeout=60000&enableTcpNoDelay=true&backlog=200,last-availability-report=1308213761716]] - cannot get live configuration for resource [Resource[id=10002, type=RHQ Agent, key=RHQ Agent, name=RHQ Agent, parent=suniltest, version=4.1.0-SNAPSHOT]]
2011-06-16 14:15:59,978 WARN  [org.rhq.enterprise.server.configuration.ConfigurationManagerBean] Could not get live resource configuration for resource [Resource[id=10002, type=RHQ Agent, key=RHQ Agent, name=RHQ Agent, parent=suniltest, version=4.1.0-SNAPSHOT]]; will assume latest resource configuration update is the current resource configuration.


Marking as verified.
Comment 3 Mike Foley 2012-02-07 14:19:22 EST
changing status of VERIFIED BZs for JON 2.4.2 and JON 3.0 to CLOSED/CURRENTRELEASE

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