0

I have a test case that tests all the DAOs in my project. It uses openpojo to get the list of all DAO classes. The test case then iterates over the list of DAO classes and invokes all methods in them using reflection. This worked fine till I upgraded from hibernate 5.6.5 to hibernate 6.6.23. Now one of the DAO fails as it tries to execute an HQL query. It seems it cannot find the entity in the HQL.

org.hibernate.query.sqm.UnknownEntityException: Could not resolve entity class

That entity is in a different module and I think the error makes sense because during hibernate configuration in the test case, it finds 3 hibernate configuration files (one from the same module, 2 others coming from dependencies) in the classpath and loads the entities defined in them. Since that entity's configuration file is in a different module, it will not be available in the classpath.

So, the error seems to make sense but question is how was it working before with hibernate 5.6.5?

New contributor
siddhant is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.