18:56:59,140 WARN [hibernate.util.JDBCExceptionReporter] SQL Error: 0, SQLState: 22001
18:56:59,343 ERROR [hibernate.util.JDBCExceptionReporter] Data truncation: Column was set to data type implicit default; NULL supplied for NOT NULL column 'seller_id' at row 1
18:56:59,343 ERROR [event.def.AbstractFlushingEventListener] Could not synchronize database state with session
org.hibernate.exception.DataException: Could not execute JDBC batch update
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:77)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:254)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:266)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:168)
at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1001)
at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:339)
at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106)
at org.springframework.orm.hibernate3.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:578)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:662)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:632)
at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:314)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:116)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy82.getSellerByMemberId(Unknown Source)
解决:
将@Transactional 注释掉就不报错了.具体是什么引起的原因还没分析出来,只记录.有时间再研究.
//@Transactional
public class SellerServiceImpl
外面使用aop做了一个整体的事务.
这里又使用了事务,可能导致了两个事务的问题.
Could not synchronize database state with session 问题
原创
©著作权归作者所有:来自51CTO博客作者mb648972af0d702的原创作品,请联系作者获取转载授权,否则将追究法律责任
上一篇:eclipse相关问题备忘
下一篇:xml文件编辑卡的问题
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
could not initial proxy - no session
这是一个懒加载异常,我们只需要在web.xml中加上以下代码(改代码一定要在on
could not initial pr 懒加载异常 懒加载 hibernate spring -
idea 一直解析maven依赖
Maven引言: 本文主要分享了Maven的相关知识,包括:Maven的安装、配置、仓库的种类、使用IDEA关联Maven、在IDEA中创建Maven项目的步骤(导入依赖的方法)、 创建Web项目的流程; 文章目录Maven1. Maven简介2. Mave
idea 一直解析maven依赖 maven java Web tomcat