[3.0.0] NoClassDefFoundError in AbstractJPAQuery static initializer (Hibernate stuff) #343
The static initializer is written as:
Class<?> clazz = Class.forName("com.mysema.query.jpa.impl.HibernateQueryTransformation");
I don't have Hibernate on the classpath, so HibernateQueryTransformation fails to initialize. Since HibernateQueryTransformation is itself present on the classpath but its dependencies aren't, it throws NoClassDefFoundError, which is not caught by the static initializer.
One way to fix this would be to create HibernateQueryTransformation statically (without reflection), but check for Hibernate dependencies via reflection inside the HibernateQueryTransformation constructor.
The text was updated successfully, but these errors were encountered: