Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

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


Copy link

@Maia-Everett Maia-Everett commented Feb 14, 2013

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.

Copy link

@timowest timowest commented Feb 14, 2013

Thanks for the bug report. Should be safe now.

Copy link

@timowest 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
None yet
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants