java.sql.sqlexception:could not retrieve transation the status server read-only into T_user VALUES (?,?,?,?,?,?,?,?) Parameters: [NULL, SS, 123, SS, 1, 1111] at Org.apache.commons.dbutils.AbstractQueryRunner.rethrow (abstractqu eryrunner.java:320) at Org.apache.commons.dbutils.QueryRunner.update (queryrunner.java:489) at ORG.APACHE.COMMONS.D Butils. Queryrunner.update (queryrunner.java:402) at Cn.itcast.jdbc.TxQueryRunner.update (txqueryrunner.java:55) at Com.hong Yi.dao.UserDAO.addUser (userdao.java:26) at Com.hongyi.servlet.UserServlet.addUser (userservlet.java:82) at SUN.REFL Ect. Nativemethodaccessorimpl.invoke0 (Native method) at Sun.reflect.NativeMethodAccessorImpl.invoke ( nativemethodaccessorimpl.java:57) at
This is due to a different version of MySQL-driven ...
Select the appropriate driver jar based on your MySQL to get it.
My database is 6.0.11
before the jar is Mysql-connector-java-5.1.28-bin.jar
Replace with Mysql-connector-java-5.1.7-bin.jar It's all right