求救,这是什么错误??

问题描述

11:32:04,424ERRORAbstractFlushingEventListener:301-Couldnotsynchronizedatabasestatewithsessionorg.hibernate.exception.ConstraintViolationException:couldnotinsert:[com.edabao.member.business.bargainlog.model.BargainLog]atorg.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:71)atorg.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)atorg.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2267)atorg.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2660)atorg.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:56)atorg.hibernate.engine.ActionQueue.execute(ActionQueue.java:250)atorg.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:234)atorg.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:141)atorg.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298)atorg.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)atorg.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)atcom.edabao.member.business.bargainlog.service.BargainLogServiceBase.insert(BargainLogServiceBase.java:36)atcom.edabao.member.business.bargainlog.service.BargainLogService.insertMember(BargainLogService.java:44)atcom.edabao.member.business.bargainlog.service.BargainLogService$$FastClassByCGLIB$$d007a35b.invoke(<generated>)atnet.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)atorg.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:692)atorg.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)atorg.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)atorg.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)atorg.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)atorg.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)atorg.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:625)atcom.edabao.member.business.bargainlog.service.BargainLogService$$EnhancerByCGLIB$$d0516b60.insertMember(<generated>)atcom.edabao.member.business.bargainlog.action.BargainLogAction.member(BargainLogAction.java:25)atsun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)atsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)atsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)atjava.lang.reflect.Method.invoke(Method.java:585)atcom.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:441)atcom.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:280)atcom.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:243)atcom.framework.web.interceptor.ExceptionInterceptor.intercept(ExceptionInterceptor.java:27)atcom.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)atcom.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:165)atcom.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)atcom.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)atcom.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:252)atorg.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)atcom.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)atcom.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)atcom.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:122)atcom.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)atcom.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)atcom.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)atcom.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)atcom.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)atcom.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)atcom.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)atcom.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:179)atcom.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)atorg.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75)atcom.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)atorg.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:94)atcom.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)atorg.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:235)atcom.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)atcom.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:89)atcom.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)atcom.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:130)atcom.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)atorg.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:267)atcom.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)atcom.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:126)atcom.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)atcom.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:138)atcom.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)atcom.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)atcom.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:165)atcom.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)atorg.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)atcom.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)atcom.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:179)atcom.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)atcom.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:176)atcom.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)atcom.framework.web.interceptor.LogInterceptor.intercept(LogInterceptor.java:50)atcom.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)atcom.framework.web.interceptor.UserInterceptor.intercept(UserInterceptor.java:102)atcom.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)atorg.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)atorg.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:488)atorg.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)atorg.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter

解决方案

解决方案二:
配置文件出错了
解决方案三:
尽量将源码、异常一起贴上!!!org.hibernate.exception.ConstraintViolationException:couldnotinsert:[com.edabao.member.business.bargainlog.model.BargainLog]不能insert你上一记录没有提交(commit);外键与主键值不等
解决方案四:
Couldnotsynchronizedatabasestatewithsession这个异常引发的原因就很明显了,当企图更新一个不存在的id实体时,便发生了这样的异常。
解决方案五:
是不是同时保存了多张表例如表2在保存对象数据时有一部分要保存的数据是表一对象的,但是表一这个对象还没保存不知道说明白了没?
解决方案六:
org.hibernate.exception.ConstraintViolationException:couldnotinsert:[com.edabao.member.business.bargainlog.model.BargainLog]你插入的时候报错了,看看是不是插入的代码那里写的列不对称

时间: 2024-10-01 15:58:21

求救,这是什么错误??的相关文章

求救 ssh项目错误-求救- -!SSH项目错误

问题描述 求救- -!SSH项目错误 问题描述:1这个错误是用户登录后,点击某个功能时出现的2奇怪的是只有一部分用户出现这个问题,其他用户使用这个功能无问题3该项目在2台机器上部署的,其中一台完全没问题,而另一台却出现上述问题4试过用无问题的那台机器连接有问题的机器上的数据库,并无出现错误,排除数据出错原因 错误提示java.lang.reflect.InvocationTargetException at sun.reflect.GeneratedMethodAccessor977.invok

高分求救:.net runtime 错误

问题描述 Windows服务程序,平常都是正常的,但是每隔几个月会报错程序会有停止响应的情况,然后查看事件查看器,发现每次都会有一个netruntime的错误,然后重启这个服务程序就正常了.不知为何,这种情况最近几天每天都出现一次.盼高手指点应该怎样去查找到底是哪里出现问题.下面的时间的详细信息:事件类型:错误事件来源:.NETRuntime事件种类:无事件ID:1024日期:2016-6-1事件:14:42:58用户:N/A计算机:iZ23m8swb06Z描述:.NETRuntimeversi

eclipse3.6.1 tomcat7.0 jdk6.0开发jsp web出现HTTP Status 404

问题描述 安装jdk6.0设置java_home环境变量eclipse配置jdkeclipserunenvironment配置apachetomcat7.0路径新建web项目,新建jsp页面runonserver后tomcat也出现成功启动的标志浏览器自动打开后出现HTTPStatus404在浏览器地址栏中输入:http://localhost:8080后也是HTTPStatus404只有在tomcatbin目录下启动tomcathttp://localhost:8080出现成功标志将新建项目放

python 期末作业,用graphics写贪吃蛇,运行时出现了这样的错误(初学者,求救)

问题描述 python 期末作业,用graphics写贪吃蛇,运行时出现了这样的错误(初学者,求救) TclstackFree: incorrect freePtr. Call out of sequence? This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more imformation

android sdk 错误,不知道怎么回事,菜鸟求救!!!

问题描述 android sdk 错误,不知道怎么回事,菜鸟求救!!! 解决方案 在preferences-android,里面配置一下你自己的sdk路径试试. 解决方案二: 先卸载重新安装一下sdk排除一下错误不行再从路径和环境变量找问题 解决方案三: 重新配置SDK的路径.

net 2 0故障-紧急求救,打开页面出现未能加载文件或程序集“System.web.services……“错误

问题描述 紧急求救,打开页面出现未能加载文件或程序集"System.web.services--"错误 单位的一个系统,五一假期前一直都是正常使用的,假期回来打开页面突然出现错误,提示"未能加载文件或程序集='System.web.servicesversion=2.0.0.0culture=neutralpublickeyToken=b03f5f7f11d50a3a'"该系统使用的是.net 2.0,如果换成.net 4.0,页面可以显示,但只能浏览已有的信息,不

mysql-【求救】关于MYSQL CLUSTER数据文件存放节点错误问题

问题描述 [求救]关于MYSQL CLUSTER数据文件存放节点错误问题 SQL节点,DATA节点均已配置正常,但是出现一个匪夷所思的问题. 在33节点执行了建库脚本及建表脚本,发现数据文件在33和34两个SQL节点存在,按理说数据文件应该数据节点上的DATADIR. Connected to Management Server at: localhost:1186 Cluster Configuration [ndbd(NDB)] 2 node(s) id=2 @192.168.1.22 (m

jsp arraylist-jsp页面ArrayList数据错误…求救求救啊啊,困扰几天了…

问题描述 jsp页面ArrayList数据错误-求救求救啊啊,困扰几天了- <% ArrayList viewFile = (ArrayList)session.getAttribute("viewFile"); ArrayList storyFile = (ArrayList)session.getAttribute("storyFile"); ArrayList creativeFile = (ArrayList)session.getAttribute(

使用hibernater的save添加oracle自动增长错误求救!

问题描述 <hibernate-mapping><classname="com.showtime.blog.entity.Tuser"table="TUSER"schema="SHOWTIME"><idname="id"type="java.lang.Integer"><columnname="ID"precision="22"

ssh-SSHpersistence.xml和beans.xml配置遇到错误求救

问题描述 SSHpersistence.xml和beans.xml配置遇到错误求救 配置文件persistence.xml <?xml version="1.0" encoding="UTF-8"?> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence