]
Gail Badner resolved HHH-5826.
------------------------------
Resolution: Fixed
Fixed in master and 3.6.
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: