This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
I have two tables: user and phone_number. The phone_number id corresponds to the id of the user. A user can have one phone number, and it is optional. I just don't get what I should be doing.
What I get is:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'openEntityInView' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'entityManagerFactory' while setting bean property 'entityManagerFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: org.hibernate.MappingException: Could not determine type for: com.realbusinesses.entity.PhoneNumber, at table: user, for columns: [org.hibernate.mapping.Column(phoneNumber)]
Any help would be appreciated. I am pulling my hair out here. It is probably 'obvious', but I am just not seeing it.
Joined: Oct 18, 2008
Turns out the issues was with where I was putting my annotations. Moving them to the public getters and setters in both cases cleared up the issue.