Bug 849779 - CLI retrieveBackingContent is failling for 10 minutes after resource was imported
Summary: CLI retrieveBackingContent is failling for 10 minutes after resource was impo...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RHQ Project
Classification: Other
Component: CLI
Version: 4.4
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: ---
: JON 3.1.1
Assignee: Stefan Negrea
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On: 830841
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-08-20 20:20 UTC by Stefan Negrea
Modified: 2013-09-03 15:11 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 830841
Environment:
Last Closed: 2013-09-03 15:11:17 UTC
Embargoed:


Attachments (Terms of Use)

Description Stefan Negrea 2012-08-20 20:20:19 UTC
+++ This bug was initially created as a clone of Bug #830841 +++

Description of problem:
CLI retrieveBackingContent gives a nullPointerException for 10 minutes after resource was imported. Than it's working fine.

Version-Release number of selected component (if applicable):
3.1.0.GA

How reproducible:
Always

Steps to Reproduce:
1.have a clean JON installation with eap plugin, the eap5 is running in default profile
2.import eap5 to JON inventory
3.create a new child resource (web application) in eap5 (eap5 inventory>create child>web application)
4.find id of this web application
5.launch CLI client in interactive mode (/rhq-cli.sh -u rhqadmin -p rhqadmin)
6.execute following commands:
var webApp = ProxyFactory.getResource(10062);// put there correct resourceId
webApp.retrieveBackingContent("/tmp/webApp.war");

  
Actual results:
Wrapped java.lang.NullPointerException (<Unknown source>#1)
res.retrieveBackingContent("/tmp/neco.war") 
^

Found no errors in logs.

Expected results:
Content is saved to defined location.

Additional info:
NullPointerException is there approximately for next 10 minutes (probably until some periodical job is launched). 

Different approach to reproduce this error:
1- uninventory eap5
2- inventory eap5
3- follow previous scenario from step 4

--- Additional comment from lzoubek on 2012-07-18 05:20:34 EDT ---

I am having same issue with EAP6 and I am able to reproduce it either using UI:
1. import EAP6
2. create deployment child resource
3. wait till it gets discovered
4. check new resoruce's content tab

Both Deployed and History are empty. If I refresh after 2-3 minutes I get expected values. IMHO Once a new deployment resource is discovered and UP it's backing content should be available.

--- Additional comment from ccrouch on 2012-08-02 19:05:40 EDT ---

We are unlikely to be able to speed the discovery process up as part of jon311 but we should hopefully be able to address the NPE

--- Additional comment from snegrea on 2012-08-20 16:19:49 EDT ---

The error was due to the fact that content was not yet available in the content repository when #retrieveBackingContent() was called. Added a descriptive error message to inform the user about this. Also, the message asks the user to try again in a few minutes since the content for a resource is available only after the deployment and discovery process completes.

There is no way to speed the discovery or to make the content available for users before the deployment and discovery process completes.

Comment 2 Lukas Krejci 2012-08-21 12:26:54 UTC
release/jon3.1.x http://git.fedorahosted.org/cgit/rhq/rhq.git/commit/?h=release/jon3.1.x&id=cad84fc36fb033a3147f160c686d6b90dad4fc45
Author: Lukas Krejci <lkrejci>
Date:   Tue Aug 21 14:25:22 2012 +0200

    [BZ 849779] - Fixing the cherry-pick of the fix of bug 830841 from master
    (fd52d4706ff9f6d9b0048cc171168fc2018a96f7) that introduced an API call
    not present in the release/jon3.1.x codebase.

Comment 3 John Sanda 2012-08-22 05:52:24 UTC
Moving to ON_QA. The JON 3.1.1 ER3 build is available at https://brewweb.devel.redhat.com/buildinfo?buildID=230321.

Comment 4 Filip Brychta 2012-08-23 12:35:24 UTC
Verified on JON 3.1.1 ER3. Instead of NPE a descriptive message is displayed. However behaviour of scenario from Libor's comment is still the same. Resource is discovered but Both Deployed and History from resoruce's content tab are empty for a few minutes.

Comment 5 Heiko W. Rupp 2013-09-03 15:11:17 UTC
Bulk closing of old issues in VERIFIED state.


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