[hibernate-issues] [Hibernate-JIRA] Created: (HHH-5329) NoClassDefFoundError when using Hibernate 3.5 with J2SE 1.4 because of a wrong catch block
Francesco Poli (JIRA)
noreply at atlassian.com
Tue Jun 22 12:23:08 EDT 2010
NoClassDefFoundError when using Hibernate 3.5 with J2SE 1.4 because of a wrong catch block
------------------------------------------------------------------------------------------
Key: HHH-5329
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5329
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.5.3, 3.5.2, 3.5.1, 3.5.0-Final
Environment: Hibernate 3.5, Java SE 1.4 or J2EE 1.3
Reporter: Francesco Poli
Priority: Blocker
In org.hibernate.impl.SessionFactoryImpl is done this check when looking for concurrent classes during the creation of the SessionFactory:
Statistics concurrentStatistics = null;
try {
Class concurrentStatsClass = ReflectHelper.classForName("org.hibernate.stat.ConcurrentStatisticsImpl");
Constructor constructor = concurrentStatsClass.getConstructor(new Class[]{SessionFactoryImplementor.class});
concurrentStatistics = (Statistics) constructor.newInstance(new Object[]{this});
log.trace("JDK 1.5 concurrent classes present");
} catch (Exception noJava5) {
log.trace("JDK 1.5 concurrent classes missing");
}
But what is thrown is a NoClassDefFoundError, which is not an Exception.
As a consequence, the catch block won't work and the error is propagated to the upper levels of the application.
I suggest to modify the catch arguments to match the correct type of the thrown object.
Thank you.
Bye
Francesco Poli
--
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