HTTP Status 500 - could not execute statement
type Exception report
message could not execute statement
description The server encountered aninternal error that prevented it from fulfilling this request.
exception
org.hibernate.exception.GenericJDBCException:could not execute statement
org.hibernate.exception.internal.StandardSQLExceptionConverter.convert
(StandardSQLExceptionConverter.java:54)
org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert
(SqlExceptionHelper.java:125)
org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert
(SqlExceptionHelper.java:110)
org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate
(ResultSetReturnImpl.java:136)
....................................................................................
root cause
java.sql.SQLException: Connection isread-only. Queries leading to
data modification are not allowed
com.mysql.jdbc.SQLError.createSQLException(SQLError.java:910)
com.mysql.jdbc.PreparedStatement.executeUpdate
(PreparedStatement.java:1351)
com.mysql.jdbc.PreparedStatement.executeUpdate
(PreparedStatement.java:1318)
com.mysql.jdbc.PreparedStatement.executeUpdate
(PreparedStatement.java:1303)
com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.
executeUpdate(NewProxyPreparedStatement.java:147)
org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.
executeUpdate(ResultSetReturnImpl.java:133)
..................................................................................
造成GenericJDBCException的原因是,数据库中的id属性没有设置自动递增,建议你可以重新建表或是用uuid