0

次のエラーが表示されます。

ERROR org.springframework.web.context.ContextLoader - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager' defined in file [C:\Users\Tecnico1\Documents\workspace-sts-3.2.0.RELEASE\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\marshall\WEB-INF\classes\META-INF\spring\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 file [C:\Users\Tecnico1\Documents\workspace-sts-3.2.0.RELEASE\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\marshall\WEB-INF\classes\META-INF\spring\applicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.AnnotationException: @OneToOne or @ManyToOne on 
………
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in file [C:\Users\Tecnico1\Documents\workspace-sts-3.2.0.RELEASE\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\marshall\WEB-INF\classes\META-INF\spring\applicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.AnnotationException: @OneToOne or @ManyToOne on
….….
Caused by: org.hibernate.AnnotationException: @OneToOne or @ManyToOne on com.springsource.marshall.domain.DocumentoReservaHabitacion.reservaHabitacionId references an unknown entity: com.springsource.marshall.domain.ReservaHabitacion
…………

私は初心者ですが、間違いが見つかりません... jarが重複している可能性があります...その場合...どのjarを削除する必要がありますか??

ありがとう!!

4

1 に答える 1

0

エンティティがファイルcom.springsource.marshall.domain.ReservaHabitacionにマップされていないか、そのクラスに注釈がありません。hibernate.cfg.xml@Entity

于 2013-05-02T11:17:22.997 に答える