求解决HHH000142: Javassist Enhancement failed:

org.springframework.orm.hibernate5.HibernateSystemException: HHH000142: Javassist Enhancement failed: test.demo1.entity.Customer; nested exception is org.hibernate.HibernateException: HHH000142: Javassist Enhancement failed: test.demo1.entity.Customer
org.springframework.orm.hibernate5.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:219)
org.springframework.orm.hibernate5.HibernateTemplate.doExecute(HibernateTemplate.java:344)
org.springframework.orm.hibernate5.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:309)
org.springframework.orm.hibernate5.HibernateTemplate.find(HibernateTemplate.java:863)
test.demo1.dao.LinkManDaoImpl.list(LinkManDaoImpl.java:20)
test.demo1.service.LinkManService.listLinkMan(LinkManService.java:23)
test.demo1.service.LinkManService$$FastClassBySpringCGLIB$$1891cb2a.invoke(<generated>)
org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:720)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:655)
test.demo1.service.LinkManService$$EnhancerBySpringCGLIB$$a50eaf95.listLinkMan(<generated>)
test.demo1.action.LinkManAction.list(LinkManAction.java:44)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:498)
ognl.OgnlRuntime.invokeMethod(OgnlRuntime.java:870)
ognl.OgnlRuntime.callAppropriateMethod(OgnlRuntime.java:1293)
ognl.ObjectMethodAccessor.callMethod(ObjectMethodAccessor.java:68)
com.opensymphony.xwork2.ognl.accessor.XWorkMethodAccessor.callMethodWithDebugInfo(XWorkMethodAccessor.java:117)

慕粉4214826
浏览 3609回答 1
1回答

呦呦米

struts里面是否多了一个Javassist的包,Struts2的jar包与Hibernate的jar包重复。 删除javassist.jar
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Java