aspose file tools*
The moose likes Spring and the fly likes Hibernate Spring Integration+sessionFactory issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Hibernate Spring Integration+sessionFactory issue" Watch "Hibernate Spring Integration+sessionFactory issue" New topic
Author

Hibernate Spring Integration+sessionFactory issue

Aruna Ponaka
Greenhorn

Joined: Dec 08, 2009
Posts: 8
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

Joined: Mar 07, 2010
Posts: 1632
    
    7

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.


[How To Ask Questions][Read before you PM me]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Hibernate Spring Integration+sessionFactory issue
 
Similar Threads
Conflict with <mvc:annotation-driven/>
Exception while running the Spring example
Spring 3 not calling .html and servlet is not available
hibernate 4 and spring 3.1.2 issue with LocalSessionFactoryBuilder
Autowiring Problem - NullPointerException.