Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Ant, Maven and Other Build Tools and the fly likes Trouble configuring Hibernate in Maven Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Trouble configuring Hibernate in Maven" Watch "Trouble configuring Hibernate in Maven" New topic
Author

Trouble configuring Hibernate in Maven

Aakash Chandel
Greenhorn

Joined: Aug 31, 2010
Posts: 27
I am using maven for the first time and currently trying to configure Hibernate using maven with spring web application. My web application is very simple. It just tries to connect to MySQL DB and fetches the number of records in a table and displays it using System.out on the index page. While building the application I get the error mentioned below. My assumption is that it is missing some dependency. I have following questions.
1) Since I am creating a web app I think I might be needing more than just Hibernate core module? Not sure what all I need. Is there a way to figure out what all jars I need for a web application that uses Hibernate with Spring?
2) How can I found out what all dependencies are there for a specific jar? Is there any web page which shows all the dependencies?
3) In Maven, is there any way to download a jar with all it's dependencies is a single shot through pom.xml?


pom.xml
========


While building the application I am getting the following error.
Error Log:
============


Please guide.
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30085
    
149

Aakash Chandel wrote:1) Since I am creating a web app I think I might be needing more than just Hibernate core module? Not sure what all I need. Is there a way to figure out what all jars I need for a web application that uses Hibernate with Spring?

When creating a new project, the easiest way is to use a Spring archetype. This ensures you get the Maven configuration right. (The ones from appfuse on top do that.

Aakash Chandel wrote:2) How can I found out what all dependencies are there for a specific jar? Is there any web page which shows all the dependencies?

Run this at the command line:


Aakash Chandel wrote:3) In Maven, is there any way to download a jar with all it's dependencies is a single shot through pom.xml?

That's how the pom works. It downloads any dependencies required for the jars in the pom.

As far as your actual error, that looks like a Hibernate 3 class. Does this address your issue?


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Aakash Chandel
Greenhorn

Joined: Aug 31, 2010
Posts: 27
This will help. Thanks for the reply.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Trouble configuring Hibernate in Maven
 
Similar Threads
org.springframework.beans.factory.BeanCreationException
java.lang.NoClassDefFoundError: oracle/toplink/essentials/ejb/cmp3/EntityManagerFactoryProvider
java.lang.ClassNotFoundException: Controller.tradingController
No mapping found for HTTP request with URI [/springmvc/login.do] in DispatcherServlet
issue with Spring OXM integartion with Spring MVC