java.sql.SQLException:Wrong number of parameters是什么意思,就是修改内容的时候报异常java.sql.SQLException:Wrong number of parameters:expected 2,was given 3 Query:update tb_users set username=?where username=?Parameters:[update tb_user

来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/21 21:27:48
java.sql.SQLException:Wrongnumberofparameters是什么意思,就是修改内容的时候报异常java.sql.SQLException:Wrongnumberofpa

java.sql.SQLException:Wrong number of parameters是什么意思,就是修改内容的时候报异常java.sql.SQLException:Wrong number of parameters:expected 2,was given 3 Query:update tb_users set username=?where username=?Parameters:[update tb_user
java.sql.SQLException:Wrong number of parameters是什么意思,就是修改内容的时候报异常
java.sql.SQLException:Wrong number of parameters:expected 2,was given 3 Query:update tb_users set username=?where username=?Parameters:[update tb_users set password=?where username=?,update tb_users set authority=?where username=?,[zhaoliu,456 ,1 ]]
at org.apache.commons.dbutils.AbstractQueryRunner.rethrow(AbstractQueryRunner.java:320)
at org.apache.commons.dbutils.QueryRunner.update(QueryRunner.java:489)
at org.apache.commons.dbutils.QueryRunner.update(QueryRunner.java:455)
at com.vanceinfo.servlet.UserServlet.update(UserServlet.java:219)
at com.vanceinfo.servlet.UserServlet.doPost(UserServlet.java:52)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:877)
at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:594)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1675)
at java.lang.Thread.run(Thread.java:619)

java.sql.SQLException:Wrong number of parameters是什么意思,就是修改内容的时候报异常java.sql.SQLException:Wrong number of parameters:expected 2,was given 3 Query:update tb_users set username=?where username=?Parameters:[update tb_user
看错误提示,你的sql语句只需要2个参数,而你提供了三个值value,请仔细检查一下的代码
update tb_users set username=?where username=?