[hibernate-issues] [Hibernate-JIRA] Updated: (HHH-5826) org.hibernate.util.SerializationHelper#resolveClass never tries loader3

Gail Badner (JIRA) noreply at atlassian.com
Tue Jan 11 19:05:05 EST 2011


     [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-5826?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gail Badner updated HHH-5826:
-----------------------------

         Assignee: Gail Badner
    Fix Version/s: 4.0.0.Alpha1
                   3.6.1

> org.hibernate.util.SerializationHelper#resolveClass never tries loader3
> -----------------------------------------------------------------------
>
>                 Key: HHH-5826
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5826
>             Project: Hibernate Core
>          Issue Type: Bug
>    Affects Versions: 3.6.0
>            Reporter: Stian Thorgersen
>            Assignee: Gail Badner
>             Fix For: 3.6.1, 4.0.0.Alpha1
>
>
> In my application SerializationHelper throws a ClassNotFoundException when I try to retrieve a entity with a blob type from the database. This is caused by what looks like a copy/paste mistake in {{org.hibernate.util.SerializationHelper#resolveClass}}.
> In the below code (extract from org.hibernate.util.SerializationHelper#resolveClass), {{loader2}} is tried twice and {{loader3}} is never tried.
> {code}
> if ( different( loader1, loader2 ) ) {
> 				try {
> 					return Class.forName( className, false, loader2 );
> 				}
> 				catch ( ClassNotFoundException e ) {
> 					log.trace( "Unable to locate class using given classloader" );
> 				}
> 			}
> 			if ( different( loader1, loader3 ) && different( loader2, loader3 ) ) {
> 				try {
> 					return Class.forName( className, false, loader2 );
> 				}
> 				catch ( ClassNotFoundException e ) {
> 					log.trace( "Unable to locate class using given classloader" );
> 				}
> 			}
> {code}

-- 
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