Hi,
Just to confirm. We just upgraded from 4.2.7.SP1 to 4.3.0.CR1 and I notice that my container (JBoss Fuse 6) suddenly don't like Hibernate anymore. The reason seems to be a new dependency to Java 7. Is this intentional?
The code in question that breaks Java 6 is in org.hibernate.osgi.OsgiClassLoader. The method "getClassLoadingLock" is not available in Java 6, but it is in Java 7.
ClassLoader Java6: http://docs.oracle.com/javase/6/docs/api/java/lang/ClassLoader.html
ClassLoader Java7: http://docs.oracle.com/javase/7/docs/api/java/lang/ClassLoader.html
org.hibernate.osgi.OsgiClassLoader from 4.3.0.CR1:
Code:
@Override
@SuppressWarnings("rawtypes")
protected Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException {
synchronized (getClassLoadingLock(name)) {
if ( classCache.containsKey( name ) ) {
return classCache.get( name );
}