[hibernate-issues] [Hibernate-JIRA] Created: (HHH-5826) org.hibernate.util.SerializationHelper#resolveClass never tries loader3
Stian Thorgersen (JIRA)
noreply at atlassian.com
Fri Jan 7 10:55:05 EST 2011
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
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