Bug 734881 - Failed to generate Drift Diff
Summary: Failed to generate Drift Diff
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RHQ Project
Classification: Other
Component: drift
Version: 4.1
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: RHQ Project Maintainer
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On:
Blocks: 707225
TreeView+ depends on / blocked
 
Reported: 2011-08-31 18:19 UTC by Mike Foley
Modified: 2012-02-07 19:28 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2012-02-07 19:28:55 UTC
Embargoed:


Attachments (Terms of Use)
image of error (47.00 KB, image/png)
2011-08-31 18:19 UTC, Mike Foley
no flags Details
client-side error (47.16 KB, image/png)
2011-08-31 18:19 UTC, Mike Foley
no flags Details
server-side log (see the end of this file) (397.15 KB, application/octet-stream)
2011-08-31 18:20 UTC, Mike Foley
no flags Details

Description Mike Foley 2011-08-31 18:19:12 UTC
Created attachment 520873 [details]
image of error

Description of problem:  Failed to generate Drift Diff


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


How reproducible:
100%


Steps to Reproduce:
1.  Drift, History, View Diff

  
Actual results:
error, see attached.  

Expected results:


Additional info:

Comment 1 Mike Foley 2011-08-31 18:19:37 UTC
Created attachment 520874 [details]
client-side error

Comment 2 Mike Foley 2011-08-31 18:20:09 UTC
Created attachment 520875 [details]
server-side log (see the end of this file)

Comment 3 John Sanda 2011-08-31 19:29:25 UTC
I am able to generate and view a diff without error. I need more details and steps to reproduce.

Comment 4 Mike Foley 2011-08-31 19:49:01 UTC
Steps to reproduce:
click on Inventory top-level menu
<mfoley_> click on Platforms on the right side under Resources
<mfoley_> click on my Linux box ... which is the only platform ... which is named foleymonsterbox1
<mfoley_> click on the Drift tab
<mfoley_> click on History
<mfoley_> there is only 1 item in Drift History ... click on it
<mfoley_> and then click View Diff

Comment 5 John Sanda 2011-09-01 02:49:47 UTC
After working on this with Mike, we discovered that this appears to be oracle specific. If generate drift on an empty file, the blob field in the rhq_drift_file table where the bits are stored is null. When you try to open and read an input stream from the blob with oracle, it results in the NPE originally reported. This however does not happen with postgresql. 

To work around this, we now check the file/content size before accessing the blob. If the size is zero, an empty string is returned. It also should be noted that before this fix, we were not storing the size, but we are now. There is a column for it in rhq_drift_file.

commit hash: b6125949237abceab2abd2fcee70f339f12c4fa6

Comment 6 Mike Foley 2011-09-02 14:47:36 UTC
verified RHQ 4.1 release candidate.

Comment 7 Mike Foley 2012-02-07 19:28:55 UTC
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.