[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-5826?page=c...
]
Stian Thorgersen commented on HHH-5826:
---------------------------------------
Thanks - Just a side comment, I was wondering if there is a particular reason why the
loaders are tried in the order they are? In my application at least loader3 is the loader
that is used by my classes + it's the threads context loader, so it seems that it
would make sense to use that loader first?
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....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira