[teiid-issues] [JBoss JIRA] (TEIID-2007) JDBC warnings are not properly handled
Steven Hawkins (JIRA)
jira-events at lists.jboss.org
Thu Apr 19 13:47:17 EDT 2012
[ https://issues.jboss.org/browse/TEIID-2007?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Steven Hawkins resolved TEIID-2007.
-----------------------------------
Resolution: Done
Update the ExceptionHolder to better preserve SQLException chains and corrected the JDBC handling of warnings.
> 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: 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
More information about the teiid-issues
mailing list