Error logging and Solutions

Source: Internet
Author: User

Exception in thread "main" org.apache.ibatis.exceptions.PersistenceException:
# # # Error updating database. Cause:java.sql.SQLException:Could not retrieve transation read-only status server
# # # The error may involve zhao.ai.nan.dao.persondao.insert-inline
# # # The error occurred while setting parameters
# # # Sql:insert into person (Name,password) VALUES (?,?)
# # Cause:java.sql.SQLException:Could Not retrieve transation read-only status server
At Org.apache.ibatis.exceptions.ExceptionFactory.wrapException (exceptionfactory.java:23)
At Org.apache.ibatis.session.defaults.DefaultSqlSession.update (defaultsqlsession.java:147)
At Org.apache.ibatis.session.defaults.DefaultSqlSession.insert (defaultsqlsession.java:134)
At Org.apache.ibatis.binding.MapperMethod.execute (mappermethod.java:79)
At Org.apache.ibatis.binding.MapperProxy.invoke (mapperproxy.java:40)
At $Proxy 0.insert (Unknown Source)
At Zhao.ai.nan.test.Main.main (main.java:37)
caused by:java.sql.SQLException:Could not retrieve transation read-only status server
At Com.mysql.jdbc.SQLError.createSQLException (sqlerror.java:1078)
At Com.mysql.jdbc.SQLError.createSQLException (sqlerror.java:989)
At Com.mysql.jdbc.SQLError.createSQLException (sqlerror.java:975)
At Com.mysql.jdbc.SQLError.createSQLException (sqlerror.java:920)
At Com.mysql.jdbc.SQLError.createSQLException (sqlerror.java:951)
At Com.mysql.jdbc.SQLError.createSQLException (sqlerror.java:941)
At Com.mysql.jdbc.ConnectionImpl.isReadOnly (connectionimpl.java:3936)
At Com.mysql.jdbc.ConnectionImpl.isReadOnly (connectionimpl.java:3907)
At Com.mysql.jdbc.PreparedStatement.checkReadOnlySafeStatement (preparedstatement.java:1258)
At Com.mysql.jdbc.PreparedStatement.execute (preparedstatement.java:1278)
At Org.apache.ibatis.executor.statement.PreparedStatementHandler.update (preparedstatementhandler.java:41)
At Org.apache.ibatis.executor.statement.RoutingStatementHandler.update (routingstatementhandler.java:66)
At Org.apache.ibatis.executor.SimpleExecutor.doUpdate (simpleexecutor.java:45)
At Org.apache.ibatis.executor.BaseExecutor.update (baseexecutor.java:108)
At Org.apache.ibatis.executor.CachingExecutor.update (cachingexecutor.java:75)
At Org.apache.ibatis.session.defaults.DefaultSqlSession.update (defaultsqlsession.java:145)
... 5 more
caused by:java.sql.SQLException:Unknown system variable ' tx_read_only '
At Com.mysql.jdbc.SQLError.createSQLException (sqlerror.java:1078)
At Com.mysql.jdbc.MysqlIO.checkErrorPacket (mysqlio.java:4120)
At Com.mysql.jdbc.MysqlIO.checkErrorPacket (mysqlio.java:4052)
At Com.mysql.jdbc.MysqlIO.sendCommand (mysqlio.java:2503)
At Com.mysql.jdbc.MysqlIO.sqlQueryDirect (mysqlio.java:2664)
At Com.mysql.jdbc.ConnectionImpl.execSQL (connectionimpl.java:2809)
At Com.mysql.jdbc.ConnectionImpl.execSQL (connectionimpl.java:2758)
At Com.mysql.jdbc.StatementImpl.executeQuery (statementimpl.java:1612)
At Com.mysql.jdbc.ConnectionImpl.isReadOnly (connectionimpl.java:3930)
... More

Unknown system variable ' tx_read_only '
Solution: There is a problem with the version of the MySQL database and the driver package that is used by the database. Change the version of the driver package

Error logging and Solutions

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.