Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hibernate Spring Integration+sessionFactory issue

 
Aruna Ponaka
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have followed http://krams915.blogspot.sg/2011/01/spring-mvc-3-hibernate-annotations.html to create a Spring and hibernate project.

Below is the code:

web.xml


HelloWeb-servlet.xml



applicationContext.xml



hibernate-context.xml


hibernate-cfg.xml



MainController.java




PersonService.java


Below is the error description


below are the jars files i have included
antlr-2.7.7.jar
commons-logging-1.1.1.jar
dom4j-1.6.1.jar
hibernate-commons-annotations-4.0.1.Final.jar
hibernate-core-4.1.2.Final.jar
hibernate-ehcache-4.1.2.Final.jar
hibernate-jpa-2.0-api-1.0.1.Final.jar
javassist-3.15.0-GA.jar
jstl-1.2.jar
jta-1.1.jar
log4j-1.2.17.jar
org.springframework.asm-3.1.4.RELEASE.jar
org.springframework.beans-3.1.4.RELEASE.jar
org.springframework.context-3.1.4.RELEASE.jar
org.springframework.core-3.1.4.RELEASE.jar
org.springframework.expression-3.1.4.RELEASE.jar
org.springframework.jdbc-3.1.4.RELEASE.jar
org.springframework.orm-3.1.4.RELEASE.jar
org.springframework.transaction-3.1.4.RELEASE.jar
org.springframework.web.servlet-3.1.4.RELEASE.jar
org.springframework.web-3.1.4.RELEASE.jar
 
Bill Gorder
Bartender
Posts: 1682
7
Android IntelliJ IDE Linux Mac OS X Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are there any other errors further up the log? Why are you scanning all packages in both your web context and root context? Also since you are using component scan the <context:annotation-config / is redundant, you can remove them. I would scan only your controllers in your web-context and exclude the controllers in your root context scan.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic