db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DERBY-6493) Improve reporting of exceptions wrapped in InvocationTargetException
Date Wed, 05 Mar 2014 11:07:44 GMT

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

ASF subversion and git services commented on DERBY-6493:
--------------------------------------------------------

Commit 1574425 from [~knutanders] in branch 'code/trunk'
[ https://svn.apache.org/r1574425 ]

DERBY-6493: Improve reporting of exceptions wrapped in InvocationTargetException

Unwrap InvocationTargetException and PrivilegedActionException before
reporting them so that it is easier to see what the real error is.

> Improve reporting of exceptions wrapped in InvocationTargetException
> --------------------------------------------------------------------
>
>                 Key: DERBY-6493
>                 URL: https://issues.apache.org/jira/browse/DERBY-6493
>             Project: Derby
>          Issue Type: Improvement
>          Components: JDBC
>    Affects Versions: 10.11.0.0
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>              Labels: backport_reject_10_10
>         Attachments: d6493-1a.diff
>
>
> When Derby encounters an exception in a method that's called via reflection, the actual
problem may be well hidden at the end of a long exception chain. For example:
> ij> create table t(x int);
> 0 rows inserted/updated/deleted
> ij> call syscs_util.syscs_import_table(null, 'T', null, null, null, null, 0);
> ERROR 38000: The exception 'java.sql.SQLException: The exception 'java.lang.reflect.InvocationTargetException'
was thrown while evaluating an expression.' was thrown while evaluating an expression.
> ERROR 38000: The exception 'java.lang.reflect.InvocationTargetException' was thrown while
evaluating an expression.
> ERROR XJ001: Java exception: ': java.lang.reflect.InvocationTargetException'.
> ERROR XIE05: Data file cannot be null. 
> Only the last exception provides any useful information to the user in this case. I think
it would be good to remove the InvocationTargetException from the chain so that it's easier
to spot the actual problem.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message