wood burning stoves 2.0*
The moose likes Spring and the fly likes No unique bean of type  [javax.persistence.EntityManagerFactory] is defined: but found 0 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 » Frameworks » Spring
Bookmark "No unique bean of type  [javax.persistence.EntityManagerFactory] is defined: but found 0" Watch "No unique bean of type  [javax.persistence.EntityManagerFactory] is defined: but found 0" New topic
Author

No unique bean of type [javax.persistence.EntityManagerFactory] is defined: but found 0

sreekanth aleddulla
Greenhorn

Joined: Feb 08, 2011
Posts: 27

Hi am getting the below error



can any body please help me how to fix this.
Rishi Shehrawat
Ranch Hand

Joined: Aug 11, 2010
Posts: 218

You are injecting entity manager using Spring, however entity manager is not defined in your Spring configuration file.
sreekanth aleddulla
Greenhorn

Joined: Feb 08, 2011
Posts: 27

no i have configured EntityManagerFactory in applicationContext.xml

please find the below applicationContext.xml



i am getting the below stack strace error
please help me

 
Consider Paul's rocket mass heater.
 
subject: No unique bean of type [javax.persistence.EntityManagerFactory] is defined: but found 0
 
Similar Threads
Spring + JPA + Hibernate and multiple Database connection
Problem using EclipseLink -> org.springframework.dao.InvalidDataAccessApiUsageException
Error Message: Filter [applicationContextMapFilter]: could not be initialized
Problem in using multiple persistence units
No unique bean of type [javax.persistence.EntityManagerFactory] is defined: expected single bean but