db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rick Hillegas (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-4949) Backward, confusing error message when you use the wrong ResultSet.getXXX() method in the client driver
Date Thu, 23 Dec 2010 18:26:49 GMT

    [ https://issues.apache.org/jira/browse/DERBY-4949?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12974686#action_12974686
] 

Rick Hillegas commented on DERBY-4949:
--------------------------------------

Tests passed cleanly except for a heisenbug in NetworkServerMBeanTest. Committed at subversion
revision 1052350.

> Backward, confusing error message when you use the wrong ResultSet.getXXX() method in
the client driver
> -------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-4949
>                 URL: https://issues.apache.org/jira/browse/DERBY-4949
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Client
>    Affects Versions: 10.8.0.0
>            Reporter: Rick Hillegas
>            Assignee: Rick Hillegas
>         Attachments: derby-4949-01-aa-fixCursor.diff, zz.java
>
>
> If you try to get a Time value out of an INTEGER column, the client driver gives this
error. I believe that similar nonsense comes back when you try other mismatched getters on
other datatypes:
>     "An attempt was made to get a data value of type 'java.sql.Types 4' from a data value
of type 'java.sql.Time'."
> The exception is a java.sql.SQLDataException with SQLState 22005. The embedded driver
returns a better message:
>     "An attempt was made to get a data value of type 'java.sql.Time' from a data value
of type INTEGER'."
> I recommend two improvements to the utility method which generates these exceptions:
> 1) Flip the order of the type names.
> 2) Use the ResultSetMetaData to look up the source data type name.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message