Bug 812902 - ContentSourceManagerBean fails to log exceptions that occur when streaming content to agent
Summary: ContentSourceManagerBean fails to log exceptions that occur when streaming c...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RHQ Project
Classification: Other
Component: Core Server
Version: 4.4
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: ---
Assignee: RHQ Project Maintainer
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-04-16 14:13 UTC by John Sanda
Modified: 2013-09-01 19:22 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-09-01 19:22:31 UTC
Embargoed:


Attachments (Terms of Use)

Description John Sanda 2012-04-16 14:13:36 UTC
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 15:49:27 UTC
Logging changes have been added.

master commit hash: cf1dbb2c1d8606d249b5b88d7f5e7264d42820d0

Comment 2 Heiko W. Rupp 2013-09-01 19:22:31 UTC
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.