Red Hat Bugzilla – Bug 812902
ContentSourceManagerBean fails to log exceptions that occur when streaming content to agent
Last modified: 2013-09-01 15:22:31 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):
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.
Logging changes have been added.
master commit hash: cf1dbb2c1d8606d249b5b88d7f5e7264d42820d0
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.