• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Trouble configuring Hibernate in Maven

 
Aakash Chandel
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
author & internet detective
Marshal
Posts: 34208
341
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Aakash Chandel
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This will help. Thanks for the reply.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic