Bug 812902 - ContentSourceManagerBean fails to log exceptions that occur when streaming content to agent
ContentSourceManagerBean fails to log exceptions that occur when streaming c...
Product: RHQ Project
Classification: Other
Component: Core Server (Show other bugs)
Unspecified Unspecified
unspecified Severity medium (vote)
: ---
: ---
Assigned To: RHQ Project Maintainer
Mike Foley
Depends On:
  Show dependency treegraph
Reported: 2012-04-16 10:13 EDT by John Sanda
Modified: 2013-09-01 15:22 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-09-01 15:22:31 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description John Sanda 2012-04-16 10:13:36 EDT
Description of problem:
When content is streamed from server to agent, such as when deploying a new WAR or EAR file, if an exception occurs on the server, we re-throw the exception but fail to log it on the server. This can be problematic for diagnosing errors because the full stack trace may not be available on the agent depending on the exception thrown. I am referring specifically to the try/catch block in the outputPackageVersionBitsRangeHelper method. There are two catch blocks, one for SQLException and one for Exception. The exceptions are wrapped and re-thrown as RuntimeExceptions. We should be logging the exception before re-throwing.

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

How reproducible:
Only if an exception occurs while streaming content.

Steps to Reproduce:
Note that these are not actually steps to reproduce an exception, but steps that will cause the code in question to execute.

1. Import a Tomcat server along with a deployed WAR file into inventory.
2. Go to the resource details view for the WAR file and click on the Content tab.
3. Click on the New subtab.
4. Click the Upload New Package button, then the Upload File button.
5. Proceed through the upload dialog to upload a WAR file.
6. For repository, select None.
7. Click Continue and the Continue again to initiate the streaming to the agent.
Actual results:

Expected results:

Additional info:
Comment 1 John Sanda 2012-04-16 11:49:27 EDT
Logging changes have been added.

master commit hash: cf1dbb2c1d8606d249b5b88d7f5e7264d42820d0
Comment 2 Heiko W. Rupp 2013-09-01 15:22:31 EDT
Bulk closing of BZs that have no target version set, but which are ON_QA for more than a year and thus are in production for a long time.

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