Hibernate Annotation的一个错误

来源:互联网 发布:淘宝上,货返是什么意思 编辑:程序博客网 时间:2024/05/01 02:34
2013-02-26 23:09:02.285::WARN:  Failed startup ofcontextorg.mortbay.jetty.webapp.WebAppContext@1f9b804{/smartmeeting,D:\workspace\smartmeeting\src\main\webapp}
org.springframework.beans.factory.BeanCreationException: Errorcreating bean with name 'documentContr': Injection of autowireddependencies failed; nested exception isorg.springframework.beans.factory.BeanCreationException: Could notautowire field: privatecom.wushi.smartmeeting.service.DocumentServiceImplcom.wushi.smartmeeting.controller.DocumentContr.documentService;nested exception isorg.springframework.beans.factory.BeanCreationException: Errorcreating bean with name 'docService': Injection of autowireddependencies failed; nested exception isorg.springframework.beans.factory.BeanCreationException: Could notautowire field: private com.wushi.smartmeeting.dao.DocumentDAOcom.wushi.smartmeeting.service.DocumentServiceImpl.docDao; nestedexception isorg.springframework.beans.factory.BeanCreationException: Errorcreating bean with name 'documentDAO': Injection of autowireddependencies failed; nested exception isorg.springframework.beans.factory.BeanCreationException: Could notautowire field: private org.hibernate.SessionFactorycom.wushi.smartmeeting.dao.DocumentDAO.sessionFactory; nestedexception isorg.springframework.beans.factory.BeanCreationException: Errorcreating bean with name 'sessionFactory' defined in class pathresource [applicationContext.xml]: Invocation of init methodfailed; nested exception is org.hibernate.AnnotationException:@OneToOne or @ManyToOne oncom.wushi.smartmeeting.model.MeetingDocument.meeting references anunknown entity: com.wushi.smartmeeting.model.Meeting
    atorg.springframe


==================

解决办法:

在Meeting class 中增加 @Entity
                      @Table("MEETING")
0 0
原创粉丝点击