zoukankan      html  css  js  c++  java
  • 错误记录及解决方案

    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 $Proxy0.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)
    ... 14 more

  • 相关阅读:
    2017年上海金马五校程序设计竞赛:Problem C : Count the Number (模拟)
    2017年上海金马五校程序设计竞赛:Problem B : Sailing (广搜)
    2017年上海金马五校程序设计竞赛:Problem A : STEED Cards (STL全排列函数)
    之江学院第0届校赛 qwb去面试 (找规律)
    [leetcode-41-First Missing Positive]
    [leetcode-625-Minimum Factorization]
    [leetcode-623-Add One Row to Tree]
    [leetcode-624-Maximum Distance in Arrays]
    [leetcode-95-Unique Binary Search Trees II]
    [leetcode-96-Unique Binary Search Trees]
  • 原文地址:https://www.cnblogs.com/zengda/p/4427244.html
Copyright © 2011-2022 走看看