慕慕2096226
2018-11-07 16:17
严重: Servlet.service() for servlet [SpringMVC] in context with path [/SSH2] threw exception [Request processing failed; nested exception is org.hibernate.MappingException: Unknown entity: Person.class] with root cause
org.hibernate.MappingException: Unknown entity: Person.class
at org.hibernate.internal.SessionFactoryImpl.getEntityPersister(SessionFactoryImpl.java:1096)
at org.hibernate.internal.SessionImpl.getOuterJoinLoadable(SessionImpl.java:1758)
at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1663)
at org.hibernate.internal.CriteriaImpl.list(CriteriaImpl.java:380)
at com.imooc.ssh.dao.PersonDao.getPerson(PersonDao.java:30)
at com.imooc.ssh.service.PersonService.getPerson(PersonService.java:21)
at com.imooc.ssh.service.PersonService$$FastClassBySpringCGLIB$$e55347e5.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:720)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:655)
at com.imooc.ssh.service.PersonService$$EnhancerBySpringCGLIB$$cd70b298.getPerson(<generated>)
at com.imooc.ssh.controller.PersonController.getPerson(PersonController.java:27)
这是什么错呀,包也没引错
或许忘记写注解了?
PersonService.java:21 这个类的21行有错,去看一下
使用SpringMVC+Spring+Hibernate开发人员信息管理功能
64963 学习 · 86 问题
相似问题