Spring常见异常笔记(8)

简介: Spring常见异常笔记(8)
java.lang.ClassCastException: top.simba1949.bean.User_$$_javassist_0 cannot be cast to javassist.util.proxy.Proxy  at org.hibernate.proxy.pojo.javassist.JavassistProxyFactory.getProxy(JavassistProxyFactory.java:123)[hibernate-core-5.0.7.Final.jar:5.0.7.Final]  at org.hibernate.tuple.entity.AbstractEntityTuplizer.createProxy(AbstractEntityTuplizer.java:666)[hibernate-core-5.0.7.Final.jar:5.0.7.Final]  at org.hibernate.persister.entity.AbstractEntityPersister.createProxy(AbstractEntityPersister.java:4462)[hibernate-core-5.0.7.Final.jar:5.0.7.Final]  at org.hibernate.event.internal.DefaultLoadEventListener.createProxyIfNecessary(DefaultLoadEventListener.java:359)[hibernate-core-5.0.7.Final.jar:5.0.7.Final]  at org.hibernate.event.internal.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:274)[hibernate-core-5.0.7.Final.jar:5.0.7.Final]  at org.hibernate.event.internal.DefaultLoadEventListener.doOnLoad(DefaultLoadEventListener.java:121)[hibernate-core-5.0.7.Final.jar:5.0.7.Final]  at org.hibernate.event.internal.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:89)[hibernate-core-5.0.7.Final.jar:5.0.7.Final]  at org.hibernate.internal.SessionImpl.fireLoad(SessionImpl.java:1129)[hibernate-core-5.0.7.Final.jar:5.0.7.Final]  at org.hibernate.internal.SessionImpl.access$2600(SessionImpl.java:164)[hibernate-core-5.0.7.Final.jar:5.0.7.Final]  at org.hibernate.internal.SessionImpl$IdentifierLoadAccessImpl.getReference(SessionImpl.java:2669)[hibernate-core-5.0.7.Final.jar:5.0.7.Final]  at org.hibernate.internal.SessionImpl.load(SessionImpl.java:965)[hibernate-core-5.0.7.Final.jar:5.0.7.Final]  at org.springframework.orm.hibernate5.HibernateTemplate$3.doInHibernate(HibernateTemplate.java:470)[spring-orm-4.2.9.RELEASE.jar:4.2.9.RELEASE]  at org.springframework.orm.hibernate5.HibernateTemplate.doExecute(HibernateTemplate.java:341)[spring-orm-4.2.9.RELEASE.jar:4.2.9.RELEASE]  at org.springframework.orm.hibernate5.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:309)[spring-orm-4.2.9.RELEASE.jar:4.2.9.RELEASE]  at org.springframework.orm.hibernate5.HibernateTemplate.load(HibernateTemplate.java:463)[spring-orm-4.2.9.RELEASE.jar:4.2.9.RELEASE]  at org.springframework.orm.hibernate5.HibernateTemplate.load(HibernateTemplate.java:456)[spring-orm-4.2.9.RELEASE.jar:4.2.9.RELEASE]  at top.simba1949.dao.impl.UserDaoImpl.queryByIdLoad(UserDaoImpl.java:71)[UserDaoImpl.class:?]  at top.simba1949.service.impl.UserServiceImpl.queryByIdLoad(UserServiceImpl.java:48)[UserServiceImpl.class:?]  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)~[?:1.8.0_152]  at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)~[?:1.8.0_152]  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)~[?:1.8.0_152]  at java.lang.reflect.Method.invoke(Unknown Source)~[?:1.8.0_152]  at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)[spring-aop-4.2.9.RELEASE.jar:4.2.9.RELEASE]  at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)[spring-aop-4.2.9.RELEASE.jar:4.2.9.RELEASE]  at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)[spring-aop-4.2.9.RELEASE.jar:4.2.9.RELEASE]  at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)[spring-tx-4.2.9.RELEASE.jar:4.2.9.RELEASE]  at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)[spring-tx-4.2.9.RELEASE.jar:4.2.9.RELEASE]  at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)[spring-tx-4.2.9.RELEASE.jar:4.2.9.RELEASE]  at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)[spring-aop-4.2.9.RELEASE.jar:4.2.9.RELEASE]  at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208)[spring-aop-4.2.9.RELEASE.jar:4.2.9.RELEASE]  at com.sun.proxy.$Proxy36.queryByIdLoad(Unknown Source)[?:?]  at top.simba1949.web.action.UserAction.queryByIdLoad(UserAction.java:48)[UserAction.class:?]  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)~[?:1.8.0_152]  at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)~[?:1.8.0_152]  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)~[?:1.8.0_152]  at java.lang.reflect.Method.invoke(Unknown Source)~[?:1.8.0_152]  at ognl.OgnlRuntime.invokeMethod(OgnlRuntime.java:871)[ognl-3.0.19.jar:?]  at ognl.OgnlRuntime.callAppropriateMethod(OgnlRuntime.java:1294)[ognl-3.0.19.jar:?]  at ognl.ObjectMethodAccessor.callMethod(ObjectMethodAccessor.java:68)[ognl-3.0.19.jar:?]  at com.opensymphony.xwork2.ognl.accessor.XWorkMethodAccessor.callMethodWithDebugInfo(XWorkMethodAccessor.java:117)[xwork-core-2.3.32.jar:2.3.32]  at com.opensymphony.xwork2.ognl.accessor.XWorkMethodAccessor.callMethod(XWorkMethodAccessor.java:108)[xwork-core-2.3.32.jar:2.3.32]  at ognl.OgnlRuntime.callMethod(OgnlRuntime.java:1370)[ognl-3.0.19.jar:?]  at ognl.ASTMethod.getValueBody(ASTMethod.java:91)[ognl-3.0.19.jar:?]  at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:212)[ognl-3.0.19.jar:?]  at ognl.SimpleNode.getValue(SimpleNode.java:258)[ognl-3.0.19.jar:?]  at ognl.Ognl.getValue(Ognl.java:467)[ognl-3.0.19.jar:?]  at ognl.Ognl.getValue(Ognl.java:431)[ognl-3.0.19.jar:?]  at com.opensymphony.xwork2.ognl.OgnlUtil$3.execute(OgnlUtil.java:352)[xwork-core-2.3.32.jar:2.3.32]  at com.opensymphony.xwork2.ognl.OgnlUtil.compileAndExecuteMethod(OgnlUtil.java:404)[xwork-core-2.3.32.jar:2.3.32]  at com.opensymphony.xwork2.ognl.OgnlUtil.callMethod(OgnlUtil.java:350)[xwork-core-2.3.32.jar:2.3.32]  at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:430)[xwork-core-2.3.32.jar:2.3.32]  at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:290)[xwork-core-2.3.32.jar:2.3.32]  at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:251)[xwork-core-2.3.32.jar:2.3.32]  at org.apache.struts2.interceptor.DeprecationInterceptor.intercept(DeprecationInterceptor.java:41)[struts2-core-2.3.32.jar:2.3.32]  at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)[xwork-core-2.3.32.jar:2.3.32]  at org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:256)[struts2-core-2.3.32.jar:2.3.32]  at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)[xwork-core-2.3.32.jar:2.3.32]  at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:168)[xwork-core-2.3.32.jar:2.3.32]  at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)[xwork-core-2.3.32.jar:2.3.32]  at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)[xwork-core-2.3.32.jar:2.3.32]  at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:265)[xwork-core-2.3.32.jar:2.3.32]  at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:76)[struts2-core-2.3.32.jar:2.3.32]  at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)[xwork-core-2.3.32.jar:2.3.32]  at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)[xwork-core-2.3.32.jar:2.3.32]  at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:138)[xwork-core-2.3.32.jar:2.3.32]  at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)[xwork-core-2.3.32.jar:2.3.32]  at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:229)[xwork-core-2.3.32.jar:2.3.32]  at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)[xwork-core-2.3.32.jar:2.3.32]  at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)[xwork-core-2.3.32.jar:2.3.32]  at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:229)[xwork-core-2.3.32.jar:2.3.32]  at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)[xwork-core-2.3.32.jar:2.3.32]  at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)[xwork-core-2.3.32.jar:2.3.32]  at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:191)[xwork-core-2.3.32.jar:2.3.32]  at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)[xwork-core-2.3.32.jar:2.3.32]  at org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:73)[struts2-core-2.3.32.jar:2.3.32]  at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)[xwork-core-2.3.32.jar:2.3.32]  at org.apache.struts2.interceptor.DateTextFieldInterceptor.intercept(DateTextFieldInterceptor.java:125)[struts2-core-2.3.32.jar:2.3.32]  at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)[xwork-core-2.3.32.jar:2.3.32]  at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:91)[struts2-core-2.3.32.jar:2.3.32]  at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)[xwork-core-2.3.32.jar:2.3.32]  at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:253)[struts2-core-2.3.32.jar:2.3.32]  at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)[xwork-core-2.3.32.jar:2.3.32]  at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:100)[xwork-core-2.3.32.jar:2.3.32]  at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)[xwork-core-2.3.32.jar:2.3.32]  at com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:141)[xwork-core-2.3.32.jar:2.3.32]  at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)[xwork-core-2.3.32.jar:2.3.32]  at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:145)[xwork-core-2.3.32.jar:2.3.32]  at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)[xwork-core-2.3.32.jar:2.3.32]  at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:171)[xwork-core-2.3.32.jar:2.3.32]  at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)[xwork-core-2.3.32.jar:2.3.32]  at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)[xwork-core-2.3.32.jar:2.3.32]  at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:140)[xwork-core-2.3.32.jar:2.3.32]  at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)[xwork-core-2.3.32.jar:2.3.32]  at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)[struts2-core-2.3.32.jar:2.3.32]  at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)[xwork-core-2.3.32.jar:2.3.32]  at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:193)[xwork-core-2.3.32.jar:2.3.32]  at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)[xwork-core-2.3.32.jar:2.3.32]  at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:189)[xwork-core-2.3.32.jar:2.3.32]  at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)[xwork-core-2.3.32.jar:2.3.32]  at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:54)[struts2-core-2.3.32.jar:2.3.32]  at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:575)[struts2-core-2.3.32.jar:2.3.32]  at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:81)[struts2-core-2.3.32.jar:2.3.32]  at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:99)[struts2-core-2.3.32.jar:2.3.32]  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)[catalina.jar:7.0.52]  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)[catalina.jar:7.0.52]  at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)[catalina.jar:7.0.52]  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)[catalina.jar:7.0.52]  at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)[catalina.jar:7.0.52]  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)[catalina.jar:7.0.52]  at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)[catalina.jar:7.0.52]  at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)[catalina.jar:7.0.52]  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)[catalina.jar:7.0.52]  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)[catalina.jar:7.0.52]  at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)[tomcat-coyote.jar:7.0.52]  at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)[tomcat-coyote.jar:7.0.52]  at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:315)[tomcat-coyote.jar:7.0.52]  at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)[?:1.8.0_152]  at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)[?:1.8.0_152]  at java.lang.Thread.run(Unknown Source)[?:1.8.0_152]2017-12-0320:32:36,296 ERROR DefaultDispatcherErrorHandler:42- Exception occurred during processing request: HHH000142: Javassist Enhancement failed: top.simba1949.bean.User; nested exception is org.hibernate.HibernateException: HHH000142: Javassist Enhancement failed: top.simba1949.bean.Userorg.springframework.orm.hibernate5.HibernateSystemException: HHH000142: Javassist Enhancement failed: top.simba1949.bean.User; nested exception is org.hibernate.HibernateException: HHH000142: Javassist Enhancement failed: top.simba1949.bean.User  at org.springframework.orm.hibernate5.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:219)  at org.springframework.orm.hibernate5.HibernateTemplate.doExecute(HibernateTemplate.java:344)  at org.springframework.orm.hibernate5.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:309)  at org.springframework.orm.hibernate5.HibernateTemplate.load(HibernateTemplate.java:463)  at org.springframework.orm.hibernate5.HibernateTemplate.load(HibernateTemplate.java:456)  at top.simba1949.dao.impl.UserDaoImpl.queryByIdLoad(UserDaoImpl.java:71)  at top.simba1949.service.impl.UserServiceImpl.queryByIdLoad(UserServiceImpl.java:48)  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 org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)  at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)  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.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208)  at com.sun.proxy.$Proxy36.queryByIdLoad(Unknown Source)  at top.simba1949.web.action.UserAction.queryByIdLoad(UserAction.java:48)  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 ognl.OgnlRuntime.invokeMethod(OgnlRuntime.java:871)  at ognl.OgnlRuntime.callAppropriateMethod(OgnlRuntime.java:1294)  at ognl.ObjectMethodAccessor.callMethod(ObjectMethodAccessor.java:68)  at com.opensymphony.xwork2.ognl.accessor.XWorkMethodAccessor.callMethodWithDebugInfo(XWorkMethodAccessor.java:117)  at com.opensymphony.xwork2.ognl.accessor.XWorkMethodAccessor.callMethod(XWorkMethodAccessor.java:108)  at ognl.OgnlRuntime.callMethod(OgnlRuntime.java:1370)  at ognl.ASTMethod.getValueBody(ASTMethod.java:91)  at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:212)  at ognl.SimpleNode.getValue(SimpleNode.java:258)  at ognl.Ognl.getValue(Ognl.java:467)  at ognl.Ognl.getValue(Ognl.java:431)  at com.opensymphony.xwork2.ognl.OgnlUtil$3.execute(OgnlUtil.java:352)  at com.opensymphony.xwork2.ognl.OgnlUtil.compileAndExecuteMethod(OgnlUtil.java:404)  at com.opensymphony.xwork2.ognl.OgnlUtil.callMethod(OgnlUtil.java:350)  at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:430)  at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:290)  at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:251)  at org.apache.struts2.interceptor.DeprecationInterceptor.intercept(DeprecationInterceptor.java:41)  at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)  at org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:256)  at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)  at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:168)  at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)  at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)  at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:265)  at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:76)  at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)  at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)  at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:138)  at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)  at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:229)  at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)  at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)  at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:229)  at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)  at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)  at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:191)  at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)  at org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:73)  at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)  at org.apache.struts2.interceptor.DateTextFieldInterceptor.intercept(DateTextFieldInterceptor.java:125)  at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)  at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:91)  at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)  at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:253)  at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)  at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:100)  at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)  at com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:141)  at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)  at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:145)  at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)  at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:171)  at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)  at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)  at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:140)  at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)  at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)  at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)  at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:193)  at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)  at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:189)  at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)  at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:54)  at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:575)  at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:81)  at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:99)  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)  at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)  at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)  at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)  at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)  at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)  at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)  at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:315)  at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)  at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)  at java.lang.Thread.run(Unknown Source)Caused by: org.hibernate.HibernateException: HHH000142: Javassist Enhancement failed: top.simba1949.bean.User  at org.hibernate.proxy.pojo.javassist.JavassistProxyFactory.getProxy(JavassistProxyFactory.java:130)  at org.hibernate.tuple.entity.AbstractEntityTuplizer.createProxy(AbstractEntityTuplizer.java:666)  at org.hibernate.persister.entity.AbstractEntityPersister.createProxy(AbstractEntityPersister.java:4462)  at org.hibernate.event.internal.DefaultLoadEventListener.createProxyIfNecessary(DefaultLoadEventListener.java:359)  at org.hibernate.event.internal.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:274)  at org.hibernate.event.internal.DefaultLoadEventListener.doOnLoad(DefaultLoadEventListener.java:121)  at org.hibernate.event.internal.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:89)  at org.hibernate.internal.SessionImpl.fireLoad(SessionImpl.java:1129)  at org.hibernate.internal.SessionImpl.access$2600(SessionImpl.java:164)  at org.hibernate.internal.SessionImpl$IdentifierLoadAccessImpl.getReference(SessionImpl.java:2669)  at org.hibernate.internal.SessionImpl.load(SessionImpl.java:965)  at org.springframework.orm.hibernate5.HibernateTemplate$3.doInHibernate(HibernateTemplate.java:470)  at org.springframework.orm.hibernate5.HibernateTemplate.doExecute(HibernateTemplate.java:341)  ... 106 more
Caused by: java.lang.ClassCastException: top.simba1949.bean.User_$$_javassist_0 cannot be cast to javassist.util.proxy.Proxy  at org.hibernate.proxy.pojo.javassist.JavassistProxyFactory.getProxy(JavassistProxyFactory.java:123)  ... 118 more
原因:Struts2的jar包与Hibernate的jar包重复。 
解决方法  删除javassist.jar
目录
相关文章
|
23天前
|
Dubbo Java 应用服务中间件
深入探讨了“dubbo+nacos+springboot3的native打包成功后运行出现异常”的原因及解决方案
本文深入探讨了“dubbo+nacos+springboot3的native打包成功后运行出现异常”的原因及解决方案。通过检查GraalVM版本兼容性、配置反射列表、使用代理类、检查配置文件、禁用不支持的功能、查看日志文件、使用GraalVM诊断工具和调整GraalVM配置等步骤,帮助开发者快速定位并解决问题,确保服务的正常运行。
33 1
|
2月前
|
Java API Spring
springBoot:注解&封装类&异常类&登录实现类 (八)
本文介绍了Spring Boot项目中的一些关键代码片段,包括使用`@PathVariable`绑定路径参数、创建封装类Result和异常处理类GlobalException、定义常量接口Constants、自定义异常ServiceException以及实现用户登录功能。通过这些代码,展示了如何构建RESTful API,处理请求参数,统一返回结果格式,以及全局异常处理等核心功能。
|
2月前
|
Java 数据库连接 Spring
【2021Spring编程实战笔记】Spring开发分享~(下)
【2021Spring编程实战笔记】Spring开发分享~(下)
30 1
|
2月前
|
Java 关系型数据库 数据库连接
SpringBoot项目使用yml文件链接数据库异常
【10月更文挑战第3天】Spring Boot项目中数据库连接问题可能源于配置错误或依赖缺失。YAML配置文件的格式不正确,如缩进错误,会导致解析失败;而数据库驱动不匹配、连接字符串或认证信息错误同样引发连接异常。解决方法包括检查并修正YAML格式,确认配置属性无误,以及添加正确的数据库驱动依赖。利用日志记录和异常信息分析可辅助问题排查。
236 10
|
2月前
|
Java 关系型数据库 MySQL
SpringBoot项目使用yml文件链接数据库异常
【10月更文挑战第4天】本文分析了Spring Boot应用在连接数据库时可能遇到的问题及其解决方案。主要从四个方面探讨:配置文件格式错误、依赖缺失或版本不兼容、数据库服务问题、配置属性未正确注入。针对这些问题,提供了详细的检查方法和调试技巧,如检查YAML格式、验证依赖版本、确认数据库服务状态及用户权限,并通过日志和断点调试定位问题。
|
2月前
|
XML Java 数据库连接
【2020Spring编程实战笔记】Spring开发分享~(上)
【2020Spring编程实战笔记】Spring开发分享~
53 0
|
3月前
|
Java 数据库连接 API
【Java笔记+踩坑】Spring Data JPA
从常用注解、实体类和各层编写方法入手,详细介绍JPA框架在增删改查等方面的基本用法,以及填充用户名日期、分页查询等高级用法。
【Java笔记+踩坑】Spring Data JPA
|
3月前
|
Java 数据库连接 数据格式
【Java笔记+踩坑】Spring基础2——IOC,DI注解开发、整合Mybatis,Junit
IOC/DI配置管理DruidDataSource和properties、核心容器的创建、获取bean的方式、spring注解开发、注解开发管理第三方bean、Spring整合Mybatis和Junit
【Java笔记+踩坑】Spring基础2——IOC,DI注解开发、整合Mybatis,Junit
|
4月前
|
前端开发 小程序 Java
【规范】SpringBoot接口返回结果及异常统一处理,这样封装才优雅
本文详细介绍了如何在SpringBoot项目中统一处理接口返回结果及全局异常。首先,通过封装`ResponseResult`类,实现了接口返回结果的规范化,包括状态码、状态信息、返回信息和数据等字段,提供了多种成功和失败的返回方法。其次,利用`@RestControllerAdvice`和`@ExceptionHandler`注解配置全局异常处理,捕获并友好地处理各种异常信息。
1433 0
【规范】SpringBoot接口返回结果及异常统一处理,这样封装才优雅
|
4月前
|
消息中间件 Java 开发工具
【Azure 事件中心】Spring Cloud Stream Event Hubs Binder 发送Event Hub消息遇见 Spec. Rule 1.3 - onSubscribe, onNext, onError and onComplete signaled to a Subscriber MUST be signaled serially 异常
【Azure 事件中心】Spring Cloud Stream Event Hubs Binder 发送Event Hub消息遇见 Spec. Rule 1.3 - onSubscribe, onNext, onError and onComplete signaled to a Subscriber MUST be signaled serially 异常