-
Notifications
You must be signed in to change notification settings - Fork 303
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
CriteriaQuery: not an entity class in db-examplejpa #46
Comments
Could be a problem with the annotation classes not being available or being different. |
What do you mean by "annotation classes not being available or being different"? I didn't change anything in your example except the getAll() mehod. I have no jar embedded into my bundle (I didn't change the maven-bundle-plugin configuration). The package for Criteria API seems to be loaded:
|
Hi, I have checked the dependencies of my bundle but I don't see anything wrong :-( |
The package imports look correct indeed. Maybe it is a hibernate issue. You could ask on the hibernate user list. It seems like hibernate criteria query support does not see the persistence annotations on Person. This can happen if it uses a different classloader for these packages. |
Hello @cschneider ,
I tried your project db-examplejpa which works fine (I have just link this example with a Oracle DB instead of H2 DB). I can add, list and delete persons.
For the "list" action, I tried to rewrite the query to use the Criteria API as follow:
But I have the following error:
Do you have an idea why?
I am using Karaf 4.0.9.
Thanks a lot.
The text was updated successfully, but these errors were encountered: