aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes Incorrect hibernate version or maven ignore and didn't download hibernate jar file. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Incorrect hibernate version or maven ignore and didn Watch "Incorrect hibernate version or maven ignore and didn New topic
Author

Incorrect hibernate version or maven ignore and didn't download hibernate jar file.

sam White
Ranch Hand

Joined: Feb 18, 2011
Posts: 208
Hi, I have an EAR project, consist of EJB and WAR modules.
When I compiled my ejb module, it could not find a method "getCriteriaBuilder()". Full log is shown as below:



Here is the pom.xml file for the ejb module:



Here is the offending code:



I also found that the command "mvn clean install" under my ejb module didn't actually download hibernate jar file. Is there any problem in my pom.xml file?
And I also want to know what version of hibernate support the method "getCriteriaBuilder()".

Any suggestion is very appreciated.
Thanks
Sam
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5843
    
    7

I double-checked Maven Central and the specific hibernate JAR file your POM references is there. Check your local repository, possibly deleting the ./org/hibernate/hibernate-entitymanager directory; that should force Maven to attempt to download the JAR again (at times I find that a failed download seems to prevent future downloads)

Regarding the getCriteriaBuilder() method, you are calling that on javax.persistence.EntityManager, which is not part of hibernate-entitymanager. Instead, it is part of javax.persistence:persistence-api:1.0, and javax.persistence.EntityManager does not have the getCriteriaBuilder() method


JBoss In Action
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Incorrect hibernate version or maven ignore and didn't download hibernate jar file.