jt-20180528 / pro_document_mycat

项目文档记录,一些技术栈预研文档
2 stars 1 forks source link

mycat连接导致程序出现事务无法自动提交 #7

Open lujunGit opened 6 years ago

lujunGit commented 6 years ago

ERROR com.alibaba.dubbo.rpc.filter.ExceptionFilter - [DUBBO] Got unchecked and undeclared exception which called by 10.212.134.200. service: com.hitler.service.tenant.ITenantService, method: findByGameId, exception: org.springframework.orm.jpa.JpaSystemException: could not inspect JDBC autocommit mode; nested exception is org.hibernate.exception.GenericJDBCException: could not inspect JDBC autocommit mode, dubbo version: 2.5.8, current host: 10.212.134.200^M org.springframework.orm.jpa.JpaSystemException: could not inspect JDBC autocommit mode; nested exception is org.hibernate.exception.GenericJDBCException: could not inspect JDBC autocommit mode^M at org.springframework.orm.jpa.vendor.HibernateJpaDialect.convertHibernateAccessException(HibernateJpaDialect.java:314)^M at org.springframework.orm.jpa.vendor.HibernateJpaDialect.translateExceptionIfPossible(HibernateJpaDialect.java:225)^M

lujunGit commented 6 years ago

以上问题,导致的其他问题: 001

lujunGit commented 6 years ago

这个问题是因为连接数据库连接事务已经提交断开导致还在使用这个事务进行提交操作数据,所以就报了这个错,解决办法,在连接数据库url上添加参数autoReconnect=true即可。