Chetan Mehrotra created JCR-3737:
------------------------------------
Summary: ConnectionHelper eating up original exception in execute
Key: JCR-3737
URL: https://issues.apache.org/jira/browse/JCR-3737
Project: Jackrabbit Content Repository
Issue Type: Bug
Components: jackrabbit-core
Affects Versions: 2.7.4
Reporter: Chetan Mehrotra
Priority: Minor
While inserting blob the ConnectionHelper tries to reset the InputStream [1]
{code:java}
} catch (SQLException e) {
//Reset Stream for retry ...
for (int i = 0; params != null && i < params.length; i++) {
Object p = params[i];
if (p instanceof StreamWrapper) {
StreamWrapper wrapper = (StreamWrapper) p;
if(!wrapper.resetStream()) {
wrapper.cleanupResources();
throw new RuntimeException("Unable to reset the Stream.");
}
}
}
throw e;
}
{code}
In above code flow if there is an issue in resetting the StreamWrapper then
original exception would be lost.
[1]
https://github.com/apache/jackrabbit/blob/trunk/jackrabbit-data/src/main/java/org/apache/jackrabbit/core/util/db/ConnectionHelper.java#L519
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)