亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

Exception in thread "main" org.hibernate.exception.GenericJDBCException: could not execute statement

Exception in thread "main" org.hibernate.exception.GenericJDBCException: could not execute statement

at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:54)

at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:126)

at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:112)

at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:190)

at org.hibernate.engine.jdbc.batch.internal.NonBatchingBatch.addToBatch(NonBatchingBatch.java:62)

at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3124)

at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3587)

at org.hibernate.action.internal.EntityInsertAction.execute(EntityInsertAction.java:103)

at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:453)

at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:345)

at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:350)

at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:56)

at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1218)

at org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:421)

at org.hibernate.engine.transaction.internal.jdbc.JdbcTransaction.beforeTransactionCommit(JdbcTransaction.java:101)

at org.hibernate.engine.transaction.spi.AbstractTransactionImpl.commit(AbstractTransactionImpl.java:177)

at com.imooc.entity.Test.add(Test.java:30)

at com.imooc.entity.Test.main(Test.java:11)

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.executeUpdate(PreparedStatement.java:2408)

at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2375)

at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2359)

at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:187)

... 14 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)

... 19 more


正在回答

舉報

0/150
提交
取消
Hibernate初探之一對多映射
  • 參與學習       42159    人
  • 解答問題       310    個

Hibernate中一對多關聯映射配置,以及cascade和inverse屬性作用

進入課程

Exception in thread "main" org.hibernate.exception.GenericJDBCException: could not execute statement

我要回答 關注問題
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號