Forums Register Login

Problem with Criteria and NamedQuery

+Pie Number of slices to send: Send
Hello.

I am using Netbeans with Hibernate. When I do a basic CRUD I do not have any error messages.

But when I want do a findAll (by Criteria or namedQuerie) I got an strange error message.

Can someone help me?

Bellow, the errors:

getEntityManager().createNamedQuery(namedQuery, obj) = >Exception occurred in target VM: org.hibernate.ejb.EntityManagerImpl.createNamedQuery(Ljava/lang/String;Ljava/lang/Class;)Ljavax/persistence/TypedQuery;<

getEntityManager().getCriteriaBuilder() = >Exception occurred in target VM: org.hibernate.ejb.EntityManagerImpl.getCriteriaBuilder()Ljavax/persistence/criteria/CriteriaBuilder;<



ps.: The stacktrace do not tell me anything more then above. =/
+Pie Number of slices to send: Send
 

Hebert Coelho wrote:Hello.

I am using Netbeans with Hibernate. When I do a basic CRUD I do not have any error messages.

But when I want do a findAll (by Criteria or namedQuerie) I got an strange error message.

Can someone help me?

Bellow, the errors:

getEntityManager().createNamedQuery(namedQuery, obj) = >Exception occurred in target VM: org.hibernate.ejb.EntityManagerImpl.createNamedQuery(Ljava/lang/String;Ljava/lang/Class;)Ljavax/persistence/TypedQuery;<

getEntityManager().getCriteriaBuilder() = >Exception occurred in target VM: org.hibernate.ejb.EntityManagerImpl.getCriteriaBuilder()Ljavax/persistence/criteria/CriteriaBuilder;<



ps.: The stacktrace do not tell me anything more than the message above. =/

 
+Pie Number of slices to send: Send
 


ps.: The stacktrace do not tell me anything more then above. =/


They should at the very least tell you which exception is being thrown and where from. Chan you post the stack trace?
+Pie Number of slices to send: Send
Thanks for the reply. The stack trace did not have any message more than that one. Thats why I could not find any solution searching in the internet.

BUT

I just found the solution.

I am using netbeans 6.9.1 but it was offering me a really old hibernate version.

I removed the hibernate libraries that the netbeans was offering me and added hibernate that I just downloaded.

It worked!

Thanks for your time.
+Pie Number of slices to send: Send
 


The stack trace did not have any message more than that one. Thats why I could not find any solution searching in the internet.


Something is restricting your exception logging. What you say is not how stack traces work.
This cake looks terrible, but it tastes great! Now take a bite out of this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 3644 times.
Similar Threads
Error accessing application in Tomcat 5
Problem with calling constructor from JNI code
Javascript validation XML
servlet.jar location
Can't get Struts to work with Resin
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 03:01:14.