• 关于 Appointment 的搜索结果

问题

java使用ExchangeService读取会议邮件:报错

kun坤 2020-06-07 16:42:04 0 浏览量 回答数 1

问题

java使用ExchangeService读取会议邮件?报错

爱吃鱼的程序员 2020-06-06 21:02:10 0 浏览量 回答数 1

问题

spring durid 事务无论怎么配置都是失败! 配置报错 

kun坤 2020-05-31 23:01:57 0 浏览量 回答数 1

新用户福利专场,云服务器ECS低至102元/年

新用户专场,1核2G 102元/年起,2核4G 699.8元/年起

问题

spring durid 事务无论怎么配置都是失败! - java报错

montos 2020-06-02 22:12:17 0 浏览量 回答数 1

问题

spring durid 事务无论怎么配置都是失败!快崩溃了。。:报错

kun坤 2020-06-14 07:25:11 0 浏览量 回答数 1

问题

spring durid 事务无论怎么配置都是失败-java报错

montos 2020-05-31 15:45:43 0 浏览量 回答数 1

问题

MySQL无法添加外键约束

保持可爱mmm 2020-05-10 19:37:35 0 浏览量 回答数 1

问题

salt.router.preload

独醉落梅 2019-12-01 21:56:10 1907 浏览量 回答数 3

问题

如何解决未初始化的常量Search :: error

小六码奴 2019-12-01 19:37:32 279 浏览量 回答数 1

回答

你定义一下回滚规则呢,不对再看看######回复 @年少爱追梦 : 不行啊,大神,我完全都照抄了,一个字一个字审查了,还是不行。不论是注解还是声明式######@蒂法娜 http://www.oschina.net/question/2008155_220656,看一下这篇,不行的话,我明天休息的时候也试试######试过了,不行######Spring事务回滚只接受RuntimeException ######我试过了切面式的配置,试过了RuntimeException######你手动抛出的异常代码放到dao层insert方法试试######不行,哭######确认数据库引擎,然后确认事务的配置是否正确######嗯,已经确认了数据库引擎,我用的数据库式mariaDB, 引擎是Innodb###### 看下log,看看Connection打开后注册没注册事务,确定下是事务没配上还是没回滚 或者配下rollbackFor Exception试试 ######回复 @贱起苍澜 : 这样啊######回复 @蒂法娜 : 你自己封装的jdbc是不是还要自己封装事务啊,我没自己封装过。。要么你等等别的大神回复######回复 @贱起苍澜 : 还是不行。setAutoCommit false,update,操作,insert操作错误,最后还是setAutoCommit true。######回复 @贱起苍澜 : 我这就试试看######回复 @蒂法娜 : 或者你可以试试不用注解声明事务,用拦截器式事务看看能不能回滚######求真相!######整个项目看看?###### 以前也遇到,后来把异常定位到顶级异常类型就解决了,你可以试试: <tx:method name="add*" propagation="REQUIRED"  read-only="false"  rollback-for="java.lang.Throwable"/> ######好想还是不行######<2016-05-12 13:15:24> <DEBUG> [druid.sql.Connection] - {conn-10010} pool-connect <2016-05-12 13:15:24> <DEBUG> [druid.sql.Connection] - {conn-10010} setAutoCommit false <2016-05-12 13:15:24> <DEBUG> [druid.sql.Connection] - {conn-10009} pool-connect <2016-05-12 13:15:24> <DEBUG> [druid.sql.Statement] - {conn-10009, pstmt-20016} Parameters : [201635152yhqh1] <2016-05-12 13:15:24> <DEBUG> [druid.sql.Statement] - {conn-10009, pstmt-20016} Types : [VARCHAR] <2016-05-12 13:15:24> <DEBUG> [druid.sql.Statement] - {conn-10009, pstmt-20016, rs-50017} query executed. 8.365109 millis.  SELECT * FROM Appointment WHERE appointmentNum = ? LIMIT 1 <2016-05-12 13:15:24> <DEBUG> [druid.sql.ResultSet] - {conn-10009, pstmt-20016, rs-50017} open <2016-05-12 13:15:24> <DEBUG> [druid.sql.ResultSet] - {conn-10009, pstmt-20016, rs-50017} Header: [id, kartingParkId, appointmentNum, userInfoId, eventId, price, status, updated_at, updated_by, created_at, created_by, expiresIn] <2016-05-12 13:15:24> <DEBUG> [druid.sql.ResultSet] - {conn-10009, pstmt-20016, rs-50017} Result: [1, 0, 201635152yhqh1, 2, 3454, 0.00, 0, 2016-04-15 17:35:04.0, , 2016-04-15 17:35:04.0, o4g5lv5Hclc3m29MyYVZeOLEar1o, 900] <2016-05-12 13:15:24> <DEBUG> [druid.sql.ResultSet] - {conn-10009, pstmt-20016, rs-50017} closed <2016-05-12 13:15:24> <DEBUG> [druid.sql.Statement] - {conn-10009, pstmt-20016} clearParameters.  <2016-05-12 13:15:24> <DEBUG> [druid.sql.Connection] - {conn-10009} pool-recycle <2016-05-12 13:15:24> <DEBUG> [druid.sql.Connection] - {conn-10009} pool-connect <2016-05-12 13:15:24> <DEBUG> [druid.sql.Statement] - {conn-10009, pstmt-20017} Parameters : [1] <2016-05-12 13:15:24> <DEBUG> [druid.sql.Statement] - {conn-10009, pstmt-20017} Types : [INTEGER] <2016-05-12 13:15:24> <DEBUG> [druid.sql.Statement] - {conn-10009, pstmt-20017, rs-50018} query executed. 9.60952 millis.  SELECT * FROM Appointment WHERE id = ? LIMIT 1 <2016-05-12 13:15:24> <DEBUG> [druid.sql.ResultSet] - {conn-10009, pstmt-20017, rs-50018} open <2016-05-12 13:15:24> <DEBUG> [druid.sql.ResultSet] - {conn-10009, pstmt-20017, rs-50018} Header: [id, kartingParkId, appointmentNum, userInfoId, eventId, price, status, updated_at, updated_by, created_at, created_by, expiresIn] <2016-05-12 13:15:24> <DEBUG> [druid.sql.ResultSet] - {conn-10009, pstmt-20017, rs-50018} Result: [1, 0, 201635152yhqh1, 2, 3454, 0.00, 0, 2016-04-15 17:35:04.0, , 2016-04-15 17:35:04.0, o4g5lv5Hclc3m29MyYVZeOLEar1o, 900] <2016-05-12 13:15:24> <DEBUG> [druid.sql.ResultSet] - {conn-10009, pstmt-20017, rs-50018} closed <2016-05-12 13:15:24> <DEBUG> [druid.sql.Statement] - {conn-10009, pstmt-20017} clearParameters.  <2016-05-12 13:15:24> <DEBUG> [druid.sql.Connection] - {conn-10009} pool-recycle <2016-05-12 13:15:24> <DEBUG> [druid.sql.Connection] - {conn-10009} pool-connect <2016-05-12 13:15:24> <DEBUG> [druid.sql.Statement] - {conn-10009, pstmt-20018} Parameters : [3454, 2016-04-15 17:35:04.0, o4g5lv5Hclc3m29MyYVZeOLEar1o, 2, 900, 2016-04-15 17:35:04.0, 201635152yhqh1, 0.0, test, 0, 0] <2016-05-12 13:15:24> <DEBUG> [druid.sql.Statement] - {conn-10009, pstmt-20018} Types : [VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR] <2016-05-12 13:15:24> <DEBUG> [druid.sql.Statement] - {conn-10009, pstmt-20018} update executed. effort 1. 20.194617 millis.  UPDATE Appointment SET eventId = ?, created_at = ?, created_by = ?, userInfoId = ?, expiresIn = ?, updated_at = ?, appointmentNum = ?, price = ?, updated_by = ?, kartingParkId = ?, status = ? WHERE id = 1 <2016-05-12 13:15:24> <DEBUG> [druid.sql.Statement] - {conn-10009, pstmt-20018} clearParameters.  <2016-05-12 13:15:24> <DEBUG> [druid.sql.Connection] - {conn-10009} pool-recycle <2016-05-12 13:15:24> <DEBUG> [druid.sql.Connection] - {conn-10009} pool-connect <2016-05-12 13:15:24> <DEBUG> [druid.sql.Statement] - {conn-10009, pstmt-20019} Parameters : [3454, 2016-04-15 17:35:04.0, o4g5lv5Hclc3m29MyYVZeOLEar1o, 2, 900, 2016-04-15 17:35:04.0, 201635152yhqh1, 0.0, test, 0, 0] <2016-05-12 13:15:24> <DEBUG> [druid.sql.Statement] - {conn-10009, pstmt-20019} Types : [VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR] java.sql.BatchUpdateException: Duplicate entry '201635152yhqh1' for key 'appointmentNum' at org.mariadb.jdbc.MariaDbServerPreparedStatement.execute(MariaDbServerPreparedStatement.java:374) at org.mariadb.jdbc.MariaDbServerPreparedStatement.executeUpdate(MariaDbServerPreparedStatement.java:347) at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_executeUpdate(FilterChainImpl.java:2723) at com.alibaba.druid.filter.FilterAdapter.preparedStatement_executeUpdate(FilterAdapter.java:1069) at com.alibaba.druid.filter.FilterEventAdapter.preparedStatement_executeUpdate(FilterEventAdapter.java:491) at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_executeUpdate(FilterChainImpl.java:2721) at com.alibaba.druid.filter.FilterAdapter.preparedStatement_executeUpdate(FilterAdapter.java:1069) at com.alibaba.druid.filter.FilterEventAdapter.preparedStatement_executeUpdate(FilterEventAdapter.java:491) at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_executeUpdate(FilterChainImpl.java:2721) at com.alibaba.druid.filter.FilterAdapter.preparedStatement_executeUpdate(FilterAdapter.java:1069) at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_executeUpdate(FilterChainImpl.java:2721) at com.alibaba.druid.proxy.jdbc.PreparedStatementProxyImpl.executeUpdate(PreparedStatementProxyImpl.java:158) at com.alibaba.druid.pool.DruidPooledPreparedStatement.executeUpdate(DruidPooledPreparedStatement.java:253) <2016-05-12 13:15:24> <DEBUG> [druid.sql.Statement] - {conn-10009, pstmt-20019} clearParameters.  <2016-05-12 13:15:24> <DEBUG> [druid.sql.Connection] - {conn-10009} pool-recycle <2016-05-12 13:15:24> <DEBUG> [druid.sql.Connection] - {conn-10010} setAutoCommit true <2016-05-12 13:15:25> <DEBUG> [druid.sql.Connection] - {conn-10010} pool-recycle ###### <tx:annotation-driven transaction-manager="transactionManager" proxy-target-class="true"/> ######不定义Service 接口,直接作用于类时,要加 proxy-target-class="true"

montos 2020-06-02 22:12:30 0 浏览量 回答数 0

回答

你定义一下回滚规则呢,不对再看看######回复 @年少爱追梦 : 不行啊,大神,我完全都照抄了,一个字一个字审查了,还是不行。不论是注解还是声明式######@蒂法娜 http://www.oschina.net/question/2008155_220656,看一下这篇,不行的话,我明天休息的时候也试试######试过了,不行######Spring事务回滚只接受RuntimeException ######我试过了切面式的配置,试过了RuntimeException######你手动抛出的异常代码放到dao层insert方法试试######不行,哭######确认数据库引擎,然后确认事务的配置是否正确######嗯,已经确认了数据库引擎,我用的数据库式mariaDB, 引擎是Innodb###### 看下log,看看Connection打开后注册没注册事务,确定下是事务没配上还是没回滚 或者配下rollbackFor Exception试试 ######回复 @贱起苍澜 : 这样啊######回复 @蒂法娜 : 你自己封装的jdbc是不是还要自己封装事务啊,我没自己封装过。。要么你等等别的大神回复######回复 @贱起苍澜 : 还是不行。setAutoCommit false,update,操作,insert操作错误,最后还是setAutoCommit true。######回复 @贱起苍澜 : 我这就试试看######回复 @蒂法娜 : 或者你可以试试不用注解声明事务,用拦截器式事务看看能不能回滚######求真相!######整个项目看看?###### 以前也遇到,后来把异常定位到顶级异常类型就解决了,你可以试试: <tx:method name="add*" propagation="REQUIRED"  read-only="false"  rollback-for="java.lang.Throwable"/> ######好想还是不行######<2016-05-12 13:15:24> <DEBUG> [druid.sql.Connection] - {conn-10010} pool-connect <2016-05-12 13:15:24> <DEBUG> [druid.sql.Connection] - {conn-10010} setAutoCommit false <2016-05-12 13:15:24> <DEBUG> [druid.sql.Connection] - {conn-10009} pool-connect <2016-05-12 13:15:24> <DEBUG> [druid.sql.Statement] - {conn-10009, pstmt-20016} Parameters : [201635152yhqh1] <2016-05-12 13:15:24> <DEBUG> [druid.sql.Statement] - {conn-10009, pstmt-20016} Types : [VARCHAR] <2016-05-12 13:15:24> <DEBUG> [druid.sql.Statement] - {conn-10009, pstmt-20016, rs-50017} query executed. 8.365109 millis.  SELECT * FROM Appointment WHERE appointmentNum = ? LIMIT 1 <2016-05-12 13:15:24> <DEBUG> [druid.sql.ResultSet] - {conn-10009, pstmt-20016, rs-50017} open <2016-05-12 13:15:24> <DEBUG> [druid.sql.ResultSet] - {conn-10009, pstmt-20016, rs-50017} Header: [id, kartingParkId, appointmentNum, userInfoId, eventId, price, status, updated_at, updated_by, created_at, created_by, expiresIn] <2016-05-12 13:15:24> <DEBUG> [druid.sql.ResultSet] - {conn-10009, pstmt-20016, rs-50017} Result: [1, 0, 201635152yhqh1, 2, 3454, 0.00, 0, 2016-04-15 17:35:04.0, , 2016-04-15 17:35:04.0, o4g5lv5Hclc3m29MyYVZeOLEar1o, 900] <2016-05-12 13:15:24> <DEBUG> [druid.sql.ResultSet] - {conn-10009, pstmt-20016, rs-50017} closed <2016-05-12 13:15:24> <DEBUG> [druid.sql.Statement] - {conn-10009, pstmt-20016} clearParameters.  <2016-05-12 13:15:24> <DEBUG> [druid.sql.Connection] - {conn-10009} pool-recycle <2016-05-12 13:15:24> <DEBUG> [druid.sql.Connection] - {conn-10009} pool-connect <2016-05-12 13:15:24> <DEBUG> [druid.sql.Statement] - {conn-10009, pstmt-20017} Parameters : [1] <2016-05-12 13:15:24> <DEBUG> [druid.sql.Statement] - {conn-10009, pstmt-20017} Types : [INTEGER] <2016-05-12 13:15:24> <DEBUG> [druid.sql.Statement] - {conn-10009, pstmt-20017, rs-50018} query executed. 9.60952 millis.  SELECT * FROM Appointment WHERE id = ? LIMIT 1 <2016-05-12 13:15:24> <DEBUG> [druid.sql.ResultSet] - {conn-10009, pstmt-20017, rs-50018} open <2016-05-12 13:15:24> <DEBUG> [druid.sql.ResultSet] - {conn-10009, pstmt-20017, rs-50018} Header: [id, kartingParkId, appointmentNum, userInfoId, eventId, price, status, updated_at, updated_by, created_at, created_by, expiresIn] <2016-05-12 13:15:24> <DEBUG> [druid.sql.ResultSet] - {conn-10009, pstmt-20017, rs-50018} Result: [1, 0, 201635152yhqh1, 2, 3454, 0.00, 0, 2016-04-15 17:35:04.0, , 2016-04-15 17:35:04.0, o4g5lv5Hclc3m29MyYVZeOLEar1o, 900] <2016-05-12 13:15:24> <DEBUG> [druid.sql.ResultSet] - {conn-10009, pstmt-20017, rs-50018} closed <2016-05-12 13:15:24> <DEBUG> [druid.sql.Statement] - {conn-10009, pstmt-20017} clearParameters.  <2016-05-12 13:15:24> <DEBUG> [druid.sql.Connection] - {conn-10009} pool-recycle <2016-05-12 13:15:24> <DEBUG> [druid.sql.Connection] - {conn-10009} pool-connect <2016-05-12 13:15:24> <DEBUG> [druid.sql.Statement] - {conn-10009, pstmt-20018} Parameters : [3454, 2016-04-15 17:35:04.0, o4g5lv5Hclc3m29MyYVZeOLEar1o, 2, 900, 2016-04-15 17:35:04.0, 201635152yhqh1, 0.0, test, 0, 0] <2016-05-12 13:15:24> <DEBUG> [druid.sql.Statement] - {conn-10009, pstmt-20018} Types : [VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR] <2016-05-12 13:15:24> <DEBUG> [druid.sql.Statement] - {conn-10009, pstmt-20018} update executed. effort 1. 20.194617 millis.  UPDATE Appointment SET eventId = ?, created_at = ?, created_by = ?, userInfoId = ?, expiresIn = ?, updated_at = ?, appointmentNum = ?, price = ?, updated_by = ?, kartingParkId = ?, status = ? WHERE id = 1 <2016-05-12 13:15:24> <DEBUG> [druid.sql.Statement] - {conn-10009, pstmt-20018} clearParameters.  <2016-05-12 13:15:24> <DEBUG> [druid.sql.Connection] - {conn-10009} pool-recycle <2016-05-12 13:15:24> <DEBUG> [druid.sql.Connection] - {conn-10009} pool-connect <2016-05-12 13:15:24> <DEBUG> [druid.sql.Statement] - {conn-10009, pstmt-20019} Parameters : [3454, 2016-04-15 17:35:04.0, o4g5lv5Hclc3m29MyYVZeOLEar1o, 2, 900, 2016-04-15 17:35:04.0, 201635152yhqh1, 0.0, test, 0, 0] <2016-05-12 13:15:24> <DEBUG> [druid.sql.Statement] - {conn-10009, pstmt-20019} Types : [VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR] java.sql.BatchUpdateException: Duplicate entry '201635152yhqh1' for key 'appointmentNum' at org.mariadb.jdbc.MariaDbServerPreparedStatement.execute(MariaDbServerPreparedStatement.java:374) at org.mariadb.jdbc.MariaDbServerPreparedStatement.executeUpdate(MariaDbServerPreparedStatement.java:347) at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_executeUpdate(FilterChainImpl.java:2723) at com.alibaba.druid.filter.FilterAdapter.preparedStatement_executeUpdate(FilterAdapter.java:1069) at com.alibaba.druid.filter.FilterEventAdapter.preparedStatement_executeUpdate(FilterEventAdapter.java:491) at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_executeUpdate(FilterChainImpl.java:2721) at com.alibaba.druid.filter.FilterAdapter.preparedStatement_executeUpdate(FilterAdapter.java:1069) at com.alibaba.druid.filter.FilterEventAdapter.preparedStatement_executeUpdate(FilterEventAdapter.java:491) at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_executeUpdate(FilterChainImpl.java:2721) at com.alibaba.druid.filter.FilterAdapter.preparedStatement_executeUpdate(FilterAdapter.java:1069) at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_executeUpdate(FilterChainImpl.java:2721) at com.alibaba.druid.proxy.jdbc.PreparedStatementProxyImpl.executeUpdate(PreparedStatementProxyImpl.java:158) at com.alibaba.druid.pool.DruidPooledPreparedStatement.executeUpdate(DruidPooledPreparedStatement.java:253) <2016-05-12 13:15:24> <DEBUG> [druid.sql.Statement] - {conn-10009, pstmt-20019} clearParameters.  <2016-05-12 13:15:24> <DEBUG> [druid.sql.Connection] - {conn-10009} pool-recycle <2016-05-12 13:15:24> <DEBUG> [druid.sql.Connection] - {conn-10010} setAutoCommit true <2016-05-12 13:15:25> <DEBUG> [druid.sql.Connection] - {conn-10010} pool-recycle ###### <tx:annotation-driven transaction-manager="transactionManager" proxy-target-class="true"/> ######不定义Service 接口,直接作用于类时,要加 proxy-target-class="true"

kun坤 2020-06-14 07:25:21 0 浏览量 回答数 0

回答

你定义一下回滚规则呢,不对再看看######回复 @年少爱追梦 : 不行啊,大神,我完全都照抄了,一个字一个字审查了,还是不行。不论是注解还是声明式######@蒂法娜 http://www.oschina.net/question/2008155_220656,看一下这篇,不行的话,我明天休息的时候也试试######试过了,不行######Spring事务回滚只接受RuntimeException ######我试过了切面式的配置,试过了RuntimeException######你手动抛出的异常代码放到dao层insert方法试试######不行,哭######确认数据库引擎,然后确认事务的配置是否正确######嗯,已经确认了数据库引擎,我用的数据库式mariaDB, 引擎是Innodb###### 看下log,看看Connection打开后注册没注册事务,确定下是事务没配上还是没回滚 或者配下rollbackFor Exception试试 ######回复 @贱起苍澜 : 这样啊######回复 @蒂法娜 : 你自己封装的jdbc是不是还要自己封装事务啊,我没自己封装过。。要么你等等别的大神回复######回复 @贱起苍澜 : 还是不行。setAutoCommit false,update,操作,insert操作错误,最后还是setAutoCommit true。######回复 @贱起苍澜 : 我这就试试看######回复 @蒂法娜 : 或者你可以试试不用注解声明事务,用拦截器式事务看看能不能回滚######求真相!######整个项目看看?###### 以前也遇到,后来把异常定位到顶级异常类型就解决了,你可以试试: <tx:method name="add*" propagation="REQUIRED"  read-only="false"  rollback-for="java.lang.Throwable"/> ######好想还是不行######<2016-05-12 13:15:24> <DEBUG> [druid.sql.Connection] - {conn-10010} pool-connect <2016-05-12 13:15:24> <DEBUG> [druid.sql.Connection] - {conn-10010} setAutoCommit false <2016-05-12 13:15:24> <DEBUG> [druid.sql.Connection] - {conn-10009} pool-connect <2016-05-12 13:15:24> <DEBUG> [druid.sql.Statement] - {conn-10009, pstmt-20016} Parameters : [201635152yhqh1] <2016-05-12 13:15:24> <DEBUG> [druid.sql.Statement] - {conn-10009, pstmt-20016} Types : [VARCHAR] <2016-05-12 13:15:24> <DEBUG> [druid.sql.Statement] - {conn-10009, pstmt-20016, rs-50017} query executed. 8.365109 millis.  SELECT * FROM Appointment WHERE appointmentNum = ? LIMIT 1 <2016-05-12 13:15:24> <DEBUG> [druid.sql.ResultSet] - {conn-10009, pstmt-20016, rs-50017} open <2016-05-12 13:15:24> <DEBUG> [druid.sql.ResultSet] - {conn-10009, pstmt-20016, rs-50017} Header: [id, kartingParkId, appointmentNum, userInfoId, eventId, price, status, updated_at, updated_by, created_at, created_by, expiresIn] <2016-05-12 13:15:24> <DEBUG> [druid.sql.ResultSet] - {conn-10009, pstmt-20016, rs-50017} Result: [1, 0, 201635152yhqh1, 2, 3454, 0.00, 0, 2016-04-15 17:35:04.0, , 2016-04-15 17:35:04.0, o4g5lv5Hclc3m29MyYVZeOLEar1o, 900] <2016-05-12 13:15:24> <DEBUG> [druid.sql.ResultSet] - {conn-10009, pstmt-20016, rs-50017} closed <2016-05-12 13:15:24> <DEBUG> [druid.sql.Statement] - {conn-10009, pstmt-20016} clearParameters.  <2016-05-12 13:15:24> <DEBUG> [druid.sql.Connection] - {conn-10009} pool-recycle <2016-05-12 13:15:24> <DEBUG> [druid.sql.Connection] - {conn-10009} pool-connect <2016-05-12 13:15:24> <DEBUG> [druid.sql.Statement] - {conn-10009, pstmt-20017} Parameters : [1] <2016-05-12 13:15:24> <DEBUG> [druid.sql.Statement] - {conn-10009, pstmt-20017} Types : [INTEGER] <2016-05-12 13:15:24> <DEBUG> [druid.sql.Statement] - {conn-10009, pstmt-20017, rs-50018} query executed. 9.60952 millis.  SELECT * FROM Appointment WHERE id = ? LIMIT 1 <2016-05-12 13:15:24> <DEBUG> [druid.sql.ResultSet] - {conn-10009, pstmt-20017, rs-50018} open <2016-05-12 13:15:24> <DEBUG> [druid.sql.ResultSet] - {conn-10009, pstmt-20017, rs-50018} Header: [id, kartingParkId, appointmentNum, userInfoId, eventId, price, status, updated_at, updated_by, created_at, created_by, expiresIn] <2016-05-12 13:15:24> <DEBUG> [druid.sql.ResultSet] - {conn-10009, pstmt-20017, rs-50018} Result: [1, 0, 201635152yhqh1, 2, 3454, 0.00, 0, 2016-04-15 17:35:04.0, , 2016-04-15 17:35:04.0, o4g5lv5Hclc3m29MyYVZeOLEar1o, 900] <2016-05-12 13:15:24> <DEBUG> [druid.sql.ResultSet] - {conn-10009, pstmt-20017, rs-50018} closed <2016-05-12 13:15:24> <DEBUG> [druid.sql.Statement] - {conn-10009, pstmt-20017} clearParameters.  <2016-05-12 13:15:24> <DEBUG> [druid.sql.Connection] - {conn-10009} pool-recycle <2016-05-12 13:15:24> <DEBUG> [druid.sql.Connection] - {conn-10009} pool-connect <2016-05-12 13:15:24> <DEBUG> [druid.sql.Statement] - {conn-10009, pstmt-20018} Parameters : [3454, 2016-04-15 17:35:04.0, o4g5lv5Hclc3m29MyYVZeOLEar1o, 2, 900, 2016-04-15 17:35:04.0, 201635152yhqh1, 0.0, test, 0, 0] <2016-05-12 13:15:24> <DEBUG> [druid.sql.Statement] - {conn-10009, pstmt-20018} Types : [VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR] <2016-05-12 13:15:24> <DEBUG> [druid.sql.Statement] - {conn-10009, pstmt-20018} update executed. effort 1. 20.194617 millis.  UPDATE Appointment SET eventId = ?, created_at = ?, created_by = ?, userInfoId = ?, expiresIn = ?, updated_at = ?, appointmentNum = ?, price = ?, updated_by = ?, kartingParkId = ?, status = ? WHERE id = 1 <2016-05-12 13:15:24> <DEBUG> [druid.sql.Statement] - {conn-10009, pstmt-20018} clearParameters.  <2016-05-12 13:15:24> <DEBUG> [druid.sql.Connection] - {conn-10009} pool-recycle <2016-05-12 13:15:24> <DEBUG> [druid.sql.Connection] - {conn-10009} pool-connect <2016-05-12 13:15:24> <DEBUG> [druid.sql.Statement] - {conn-10009, pstmt-20019} Parameters : [3454, 2016-04-15 17:35:04.0, o4g5lv5Hclc3m29MyYVZeOLEar1o, 2, 900, 2016-04-15 17:35:04.0, 201635152yhqh1, 0.0, test, 0, 0] <2016-05-12 13:15:24> <DEBUG> [druid.sql.Statement] - {conn-10009, pstmt-20019} Types : [VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR] java.sql.BatchUpdateException: Duplicate entry '201635152yhqh1' for key 'appointmentNum' at org.mariadb.jdbc.MariaDbServerPreparedStatement.execute(MariaDbServerPreparedStatement.java:374) at org.mariadb.jdbc.MariaDbServerPreparedStatement.executeUpdate(MariaDbServerPreparedStatement.java:347) at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_executeUpdate(FilterChainImpl.java:2723) at com.alibaba.druid.filter.FilterAdapter.preparedStatement_executeUpdate(FilterAdapter.java:1069) at com.alibaba.druid.filter.FilterEventAdapter.preparedStatement_executeUpdate(FilterEventAdapter.java:491) at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_executeUpdate(FilterChainImpl.java:2721) at com.alibaba.druid.filter.FilterAdapter.preparedStatement_executeUpdate(FilterAdapter.java:1069) at com.alibaba.druid.filter.FilterEventAdapter.preparedStatement_executeUpdate(FilterEventAdapter.java:491) at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_executeUpdate(FilterChainImpl.java:2721) at com.alibaba.druid.filter.FilterAdapter.preparedStatement_executeUpdate(FilterAdapter.java:1069) at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_executeUpdate(FilterChainImpl.java:2721) at com.alibaba.druid.proxy.jdbc.PreparedStatementProxyImpl.executeUpdate(PreparedStatementProxyImpl.java:158) at com.alibaba.druid.pool.DruidPooledPreparedStatement.executeUpdate(DruidPooledPreparedStatement.java:253) <2016-05-12 13:15:24> <DEBUG> [druid.sql.Statement] - {conn-10009, pstmt-20019} clearParameters.  <2016-05-12 13:15:24> <DEBUG> [druid.sql.Connection] - {conn-10009} pool-recycle <2016-05-12 13:15:24> <DEBUG> [druid.sql.Connection] - {conn-10010} setAutoCommit true <2016-05-12 13:15:25> <DEBUG> [druid.sql.Connection] - {conn-10010} pool-recycle ###### <tx:annotation-driven transaction-manager="transactionManager" proxy-target-class="true"/> ######不定义Service 接口,直接作用于类时,要加 proxy-target-class="true"

kun坤 2020-05-31 23:02:08 0 浏览量 回答数 0

回答

"你定义一下回滚规则呢,不对再看看######回复 <a href=""http://my.oschina.net/QAAQ"" class=""referer"" target=""_blank"">@年少爱追梦 : 不行啊,大神,我完全都照抄了,一个字一个字审查了,还是不行。不论是注解还是声明式######<a href=""http://my.oschina.net/qino"" target=""_blank"">@蒂法娜 <a href=""http://www.oschina.net/question/2008155_220656"" rel=""nofollow"" target=""_blank"">http://www.oschina.net/question/2008155_220656,看一下这篇,不行的话,我明天休息的时候也试试######试过了,不行######Spring事务回滚只接受RuntimeException ######我试过了切面式的配置,试过了RuntimeException######你手动抛出的异常代码放到dao层insert方法试试######不行,哭######确认数据库引擎,然后确认事务的配置是否正确######嗯,已经确认了数据库引擎,我用的数据库式mariaDB, 引擎是Innodb###### 看下log,看看Connection打开后注册没注册事务,确定下是事务没配上还是没回滚 或者配下rollbackFor Exception试试 ######回复 @贱起苍澜 : 这样啊######回复 @蒂法娜 : 你自己封装的jdbc是不是还要自己封装事务啊,我没自己封装过。。要么你等等别的大神回复######回复 @贱起苍澜 : 还是不行。setAutoCommit false,update,操作,insert操作错误,最后还是setAutoCommit true。######回复 @贱起苍澜 : 我这就试试看######回复 @蒂法娜 : 或者你可以试试不用注解声明事务,用拦截器式事务看看能不能回滚######求真相!######整个项目看看?###### 以前也遇到,后来把异常定位到顶级异常类型就解决了,你可以试试: <tx:method name="add*" propagation="REQUIRED"  read-only="false"  rollback-for="java.lang.Throwable"/> ######好想还是不行######<2016-05-12 13:15:24> <DEBUG> [druid.sql.Connection] - {conn-10010} pool-connect <2016-05-12 13:15:24> <DEBUG> [druid.sql.Connection] - {conn-10010} setAutoCommit false <2016-05-12 13:15:24> <DEBUG> [druid.sql.Connection] - {conn-10009} pool-connect <2016-05-12 13:15:24> <DEBUG> [druid.sql.Statement] - {conn-10009, pstmt-20016} Parameters : [201635152yhqh1] <2016-05-12 13:15:24> <DEBUG> [druid.sql.Statement] - {conn-10009, pstmt-20016} Types : [VARCHAR] <2016-05-12 13:15:24> <DEBUG> [druid.sql.Statement] - {conn-10009, pstmt-20016, rs-50017} query executed. 8.365109 millis.  SELECT * FROM Appointment WHERE appointmentNum = ? LIMIT 1 <2016-05-12 13:15:24> <DEBUG> [druid.sql.ResultSet] - {conn-10009, pstmt-20016, rs-50017} open <2016-05-12 13:15:24> <DEBUG> [druid.sql.ResultSet] - {conn-10009, pstmt-20016, rs-50017} Header: [id, kartingParkId, appointmentNum, userInfoId, eventId, price, status, updated_at, updated_by, created_at, created_by, expiresIn] <2016-05-12 13:15:24> <DEBUG> [druid.sql.ResultSet] - {conn-10009, pstmt-20016, rs-50017} Result: [1, 0, 201635152yhqh1, 2, 3454, 0.00, 0, 2016-04-15 17:35:04.0, , 2016-04-15 17:35:04.0, o4g5lv5Hclc3m29MyYVZeOLEar1o, 900] <2016-05-12 13:15:24> <DEBUG> [druid.sql.ResultSet] - {conn-10009, pstmt-20016, rs-50017} closed <2016-05-12 13:15:24> <DEBUG> [druid.sql.Statement] - {conn-10009, pstmt-20016} clearParameters.  <2016-05-12 13:15:24> <DEBUG> [druid.sql.Connection] - {conn-10009} pool-recycle <2016-05-12 13:15:24> <DEBUG> [druid.sql.Connection] - {conn-10009} pool-connect <2016-05-12 13:15:24> <DEBUG> [druid.sql.Statement] - {conn-10009, pstmt-20017} Parameters : [1] <2016-05-12 13:15:24> <DEBUG> [druid.sql.Statement] - {conn-10009, pstmt-20017} Types : [INTEGER] <2016-05-12 13:15:24> <DEBUG> [druid.sql.Statement] - {conn-10009, pstmt-20017, rs-50018} query executed. 9.60952 millis.  SELECT * FROM Appointment WHERE id = ? LIMIT 1 <2016-05-12 13:15:24> <DEBUG> [druid.sql.ResultSet] - {conn-10009, pstmt-20017, rs-50018} open <2016-05-12 13:15:24> <DEBUG> [druid.sql.ResultSet] - {conn-10009, pstmt-20017, rs-50018} Header: [id, kartingParkId, appointmentNum, userInfoId, eventId, price, status, updated_at, updated_by, created_at, created_by, expiresIn] <2016-05-12 13:15:24> <DEBUG> [druid.sql.ResultSet] - {conn-10009, pstmt-20017, rs-50018} Result: [1, 0, 201635152yhqh1, 2, 3454, 0.00, 0, 2016-04-15 17:35:04.0, , 2016-04-15 17:35:04.0, o4g5lv5Hclc3m29MyYVZeOLEar1o, 900] <2016-05-12 13:15:24> <DEBUG> [druid.sql.ResultSet] - {conn-10009, pstmt-20017, rs-50018} closed <2016-05-12 13:15:24> <DEBUG> [druid.sql.Statement] - {conn-10009, pstmt-20017} clearParameters.  <2016-05-12 13:15:24> <DEBUG> [druid.sql.Connection] - {conn-10009} pool-recycle <2016-05-12 13:15:24> <DEBUG> [druid.sql.Connection] - {conn-10009} pool-connect <2016-05-12 13:15:24> <DEBUG> [druid.sql.Statement] - {conn-10009, pstmt-20018} Parameters : [3454, 2016-04-15 17:35:04.0, o4g5lv5Hclc3m29MyYVZeOLEar1o, 2, 900, 2016-04-15 17:35:04.0, 201635152yhqh1, 0.0, test, 0, 0] <2016-05-12 13:15:24> <DEBUG> [druid.sql.Statement] - {conn-10009, pstmt-20018} Types : [VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR] <2016-05-12 13:15:24> <DEBUG> [druid.sql.Statement] - {conn-10009, pstmt-20018} update executed. effort 1. 20.194617 millis.  UPDATE Appointment SET eventId = ?, created_at = ?, created_by = ?, userInfoId = ?, expiresIn = ?, updated_at = ?, appointmentNum = ?, price = ?, updated_by = ?, kartingParkId = ?, status = ? WHERE id = 1 <2016-05-12 13:15:24> <DEBUG> [druid.sql.Statement] - {conn-10009, pstmt-20018} clearParameters.  <2016-05-12 13:15:24> <DEBUG> [druid.sql.Connection] - {conn-10009} pool-recycle <2016-05-12 13:15:24> <DEBUG> [druid.sql.Connection] - {conn-10009} pool-connect <2016-05-12 13:15:24> <DEBUG> [druid.sql.Statement] - {conn-10009, pstmt-20019} Parameters : [3454, 2016-04-15 17:35:04.0, o4g5lv5Hclc3m29MyYVZeOLEar1o, 2, 900, 2016-04-15 17:35:04.0, 201635152yhqh1, 0.0, test, 0, 0] <2016-05-12 13:15:24> <DEBUG> [druid.sql.Statement] - {conn-10009, pstmt-20019} Types : [VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR] java.sql.BatchUpdateException: Duplicate entry '201635152yhqh1' for key 'appointmentNum' at org.mariadb.jdbc.MariaDbServerPreparedStatement.execute(MariaDbServerPreparedStatement.java:374) at org.mariadb.jdbc.MariaDbServerPreparedStatement.executeUpdate(MariaDbServerPreparedStatement.java:347) at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_executeUpdate(FilterChainImpl.java:2723) at com.alibaba.druid.filter.FilterAdapter.preparedStatement_executeUpdate(FilterAdapter.java:1069) at com.alibaba.druid.filter.FilterEventAdapter.preparedStatement_executeUpdate(FilterEventAdapter.java:491) at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_executeUpdate(FilterChainImpl.java:2721) at com.alibaba.druid.filter.FilterAdapter.preparedStatement_executeUpdate(FilterAdapter.java:1069) at com.alibaba.druid.filter.FilterEventAdapter.preparedStatement_executeUpdate(FilterEventAdapter.java:491) at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_executeUpdate(FilterChainImpl.java:2721) at com.alibaba.druid.filter.FilterAdapter.preparedStatement_executeUpdate(FilterAdapter.java:1069) at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_executeUpdate(FilterChainImpl.java:2721) at com.alibaba.druid.proxy.jdbc.PreparedStatementProxyImpl.executeUpdate(PreparedStatementProxyImpl.java:158) at com.alibaba.druid.pool.DruidPooledPreparedStatement.executeUpdate(DruidPooledPreparedStatement.java:253) <2016-05-12 13:15:24> <DEBUG> [druid.sql.Statement] - {conn-10009, pstmt-20019} clearParameters.  <2016-05-12 13:15:24> <DEBUG> [druid.sql.Connection] - {conn-10009} pool-recycle <2016-05-12 13:15:24> <DEBUG> [druid.sql.Connection] - {conn-10010} setAutoCommit true <2016-05-12 13:15:25> <DEBUG> [druid.sql.Connection] - {conn-10010} pool-recycle ###### <tx:annotation-driven transaction-manager="transactionManager" proxy-target-class="true"/> ######不定义Service 接口,直接作用于类时,要加 proxy-target-class="true""

montos 2020-05-31 15:45:54 0 浏览量 回答数 0

问题

从Servlet发布到数据库会引发“列不存在错误”。我该如何解决并完成?

小六码奴 2019-12-01 21:48:54 41 浏览量 回答数 1
阿里云大学 云服务器ECS com域名 网站域名whois查询 开发者平台 小程序定制 小程序开发 国内短信套餐包 开发者技术与产品 云数据库 图像识别 开发者问答 阿里云建站 阿里云备案 云市场 万网 阿里云帮助文档 免费套餐 开发者工具 SQL审核 小程序开发制作 视频内容分析 企业网站制作 视频集锦 代理记账服务 2020阿里巴巴研发效能峰会 企业建站模板 云效成长地图 高端建站 人工智能 阿里云云栖号 云栖号案例 云栖号直播