实体未映射

时间:2013-05-17 12:02:30

标签: spring hibernate spring-mvc jsf-2 myfaces

我有一个应用程序工作正常,我必须更改我的数据库结构,当我更改它,我生成我的模型类与hibernate我有这个例外:

SEVERE: Servlet.service() for servlet [facesServlet] in context with path [/firstapp] threw exception [javax.el.ELException: Error reading 'listpersonnel' on type service.personnelBean] with root cause
org.hibernate.AnnotationException: @OneToOne or @ManyToOne on model.Formation.ville references an unknown entity: model.Ville
    at org.hibernate.cfg.ToOneFkSecondPass.doSecondPass(ToOneFkSecondPass.java:109)
    at org.hibernate.cfg.Configuration.processEndOfQueue(Configuration.java:1514)
    at org.hibernate.cfg.Configuration.processFkSecondPassInOrder(Configuration.java:1437)
    at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1355)
    at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1724)
    at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1775)
    at dao.HibernateUtil.getSession(HibernateUtil.java:58)
    at dao.personnelServ.getListPersonne(personnelServ.java:116)
    at service.personnelBean.getListpersonnel(personnelBean.java:137)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at javax.el.BeanELResolver.getValue(BeanELResolver.java:87)
    at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:67)
    at org.apache.myfaces.el.unified.resolver.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:179)
    at org.apache.el.parser.AstValue.getValue(AstValue.java:183)
    at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:185)
    at org.apache.myfaces.view.facelets.el.ContextAwareTagValueExpression.getValue(ContextAwareTagValueExpression.java:96)
    at javax.faces.component._DeltaStateHelper.eval(_DeltaStateHelper.java:249)
    at javax.faces.component.UIData.getValue(UIData.java:2031)
    at org.primefaces.component.datatable.DataTable.getValue(DataTable.java:867)
    at org.primefaces.component.api.UIData.getDataModel(UIData.java:579)
    at org.primefaces.component.api.UIData.setRowModel(UIData.java:409)
    at org.primefaces.component.api.UIData.setRowIndex(UIData.java:401)
    at javax.faces.component.UIData.encodeEnd(UIData.java:1693)
    at javax.faces.component.UIComponentBase.encodeAll(UIComponentBase.java:545)
    at javax.faces.component.UIComponentBase.encodeAll(UIComponentBase.java:541)
    at javax.faces.component.UIComponentBase.encodeAll(UIComponentBase.java:541)
    at javax.faces.component.UIComponentBase.encodeAll(UIComponentBase.java:541)
    at org.apache.myfaces.view.facelets.FaceletViewDeclarationLanguage.renderView(FaceletViewDeclarationLanguage.java:1981)
    at org.apache.myfaces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:285)
    at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:116)
    at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:241)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:199)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

0 个答案:

没有答案