[hibernate-issues] [Hibernate-JIRA] Updated: (HHH-1986) javassist throws InvocationTargetException instead of original checked Exception

Roel Adriaensens (JIRA) noreply at atlassian.com
Fri Aug 11 03:14:21 EDT 2006


     [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1986?page=all ]

Roel Adriaensens updated HHH-1986:
----------------------------------

    Attachment: patch-HHH-1986

This is a patch for this issue, but you also have to upgrade javassist to version 3.2

> javassist throws InvocationTargetException instead of original checked Exception
> --------------------------------------------------------------------------------
>
>          Key: HHH-1986
>          URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1986
>      Project: Hibernate3
>         Type: Bug

>   Components: core
>     Versions: 3.2.0.cr2
>     Reporter: Anthony Patricio
>  Attachments: javassistTest.zip, patch-HHH-1986
>
>
> The javassist causes a problem if you have a hibernate persisted object which throws checked exceptions in some of his methods. In your code you have a try/catch for the checked exception around the method call. But if it is a proxy enhanced by javassist it won't throw the checked exception but an InvocationTargetException which is wrapped around the checked exception. So actually javassist should catch the InvocationTargetException and rethrown it's cause.
> The same bug was reported for cglib, see HHH-911

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira




More information about the hibernate-issues mailing list