[3.0.0] NoClassDefFoundError in AbstractJPAQuery static initializer (Hibernate stuff) #343

Closed
Maia-Everett opened this Issue Feb 14, 2013 · 2 comments

Comments

Projects
None yet
2 participants
@Maia-Everett

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.

@timowest

This comment has been minimized.

Show comment
Hide comment
@timowest

timowest Feb 14, 2013

Member

Thanks for the bug report. Should be safe now.

Member

timowest commented Feb 14, 2013

Thanks for the bug report. Should be safe now.

@timowest

This comment has been minimized.

Show comment
Hide comment
@timowest

timowest Feb 20, 2013

Member

Released in 3.0.0.BETA2

Member

timowest commented Feb 20, 2013

Released in 3.0.0.BETA2

@timowest timowest closed this Feb 20, 2013

@timowest timowest added this to the 3.0.0 milestone Apr 14, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment