[
https://issues.jboss.org/browse/TEIID-2007?page=com.atlassian.jira.plugin...
]
Steven Hawkins updated TEIID-2007:
----------------------------------
Fix Version/s: 7.7.1
Also addressed in 7.7.1, but made the fix optional based upon the vm property setting
org.teiid.addEachJDBCWarning. When set to false the fix will add only the root warning
and the warning chain should be read as shown in this JIRA.
JDBC warnings are not properly handled
--------------------------------------
Key: TEIID-2007
URL:
https://issues.jboss.org/browse/TEIID-2007
Project: Teiid
Issue Type: Bug
Components: JDBC Connector
Affects Versions: 7.7
Reporter: Steven Hawkins
Assignee: Steven Hawkins
Fix For: 7.7.1, 8.0
Adding warnings individually results in redundant exceptions. See also TEIID-1829
This is a behavior change though since the resulting warnings on the client side will be
held by the cause. Proper access would be:
//warning will be an instanceof TeiidSQLWarning to convey model/source information
SQLWarning warning = stmt.getWarnings();
while (warning != null) {
Exception e = warning.getCause();
if (cause instanceof SQLWarning) {
//childWarning should now be the head of the source warning chain
SQLWarning childWarning = (SQLWarning)cause;
while (childWarning != null) {
//do something with childWarning
childWarning = childWarning.getNextWarning();
}
}
warning = warning.getNextWarning();
}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira