Skip to content

Commit ea82d09

Browse files
committed
HHH-9885 The default ClassLoaderService implementation should handle java.lang.LinkageError
1 parent 96d6365 commit ea82d09

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

hibernate-core/src/main/java/org/hibernate/boot/registry/classloading/internal/ClassLoaderServiceImpl.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,8 @@ protected Class<?> findClass(String name) throws ClassNotFoundException {
210210
}
211211
catch (Exception ignore) {
212212
}
213+
catch (LinkageError ignore) {
214+
}
213215
}
214216

215217
throw new ClassNotFoundException( "Could not load requested class : " + name );
@@ -226,6 +228,9 @@ public <T> Class<T> classForName(String className) {
226228
catch (Exception e) {
227229
throw new ClassLoadingException( "Unable to load class [" + className + "]", e );
228230
}
231+
catch (LinkageError e) {
232+
throw new ClassLoadingException( "Unable to load class [" + className + "]", e );
233+
}
229234
}
230235

231236
@Override

0 commit comments

Comments
 (0)