Red Hat Bugzilla – Bug 734881
Failed to generate Drift Diff
Last modified: 2012-02-07 14:28:55 EST
Created attachment 520873 [details]
image of error
Description of problem: Failed to generate Drift Diff
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Drift, History, View Diff
error, see attached.
Created attachment 520874 [details]
Created attachment 520875 [details]
server-side log (see the end of this file)
I am able to generate and view a diff without error. I need more details and steps to reproduce.
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
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
verified RHQ 4.1 release candidate.
changing status of VERIFIED BZs for JON 2.4.2 and JON 3.0 to CLOSED/CURRENTRELEASE