[teiid-issues] [JBoss JIRA] (TEIID-2007) JDBC warnings are not properly handled

Steven Hawkins (JIRA) jira-events at lists.jboss.org
Tue Nov 20 08:55:22 EST 2012


     [ https://issues.jboss.org/browse/TEIID-2007?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Steven Hawkins closed TEIID-2007.
---------------------------------


    
> 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
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the teiid-issues mailing list