-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
使用PageHelper 出现缺少第一个参数的异常 #198
Comments
3.6.15 版本正常使用,但是3.6.16版本出现这个错误 |
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
以下是异常,可以正常传入page 和 size 参数
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException:
Error querying database. Cause: java.lang.RuntimeException: java.sql.SQLException: No value specified for parameter 1
The error may exist in file [D:\IdeaProjects\demo-system-01\demo-system-maven-boot-single-02\target\classes\mapper\SystemUserBaseMapper.xml]
The error may involve defaultParameterMap
The error occurred while setting parameters
SQL: select id, create_time,
name
,password
,state
, update_time, username from system_user limit ?Cause: java.lang.RuntimeException: java.sql.SQLException: No value specified for parameter 1
Caused by: org.apache.ibatis.exceptions.PersistenceException:
Error querying database. Cause: java.lang.RuntimeException: java.sql.SQLException: No value specified for parameter 1
The error may exist in file [D:\IdeaProjects\demo-system-01\demo-system-maven-boot-single-02\target\classes\mapper\SystemUserBaseMapper.xml]
The error may involve defaultParameterMap
The error occurred while setting parameters
SQL: select id, create_time,
name
,password
,state
, update_time, username from system_user limit ?Cause: java.lang.RuntimeException: java.sql.SQLException: No value specified for parameter 1
Caused by: java.lang.RuntimeException: java.sql.SQLException: No value specified for parameter 1
at com.jn.langx.util.Throwables.wrapAsRuntimeException(Throwables.java:95)
at com.jn.sqlhelper.mybatis.plugins.pagination.PaginationHandler.intercept(PaginationHandler.java:222)
at com.jn.sqlhelper.mybatis.plugins.pagination.PaginationHandler.inbound(PaginationHandler.java:96)
at com.jn.langx.pipeline.HandlerContext.inbound(HandlerContext.java:42)
at com.jn.langx.pipeline.Pipelines.skipHandler(Pipelines.java:36)
at com.jn.sqlhelper.mybatis.plugins.likeescape.LikeParameterEscapeHandler.inbound(LikeParameterEscapeHandler.java:80)
at com.jn.langx.pipeline.HandlerContext.inbound(HandlerContext.java:42)
at com.jn.langx.pipeline.Pipelines.inbound(Pipelines.java:47)
at com.jn.langx.pipeline.AbstractHandler.inbound(AbstractHandler.java:6)
at com.jn.langx.pipeline.DebugHandler.inbound(DebugHandler.java:14)
at com.jn.langx.pipeline.HandlerContext.inbound(HandlerContext.java:42)
at com.jn.langx.pipeline.DefaultPipeline.inbound(DefaultPipeline.java:114)
at com.jn.sqlhelper.mybatis.plugins.SqlHelperMybatisPlugin.intercept(SqlHelperMybatisPlugin.java:109)
at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:62)
at com.sun.proxy.$Proxy390.query(Unknown Source)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:151)
... 129 more
Caused by: java.sql.SQLException: No value specified for parameter 1
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:129)
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
at com.mysql.cj.jdbc.ClientPreparedStatement.execute(ClientPreparedStatement.java:379)
at com.alibaba.druid.pool.DruidPooledPreparedStatement.execute(DruidPooledPreparedStatement.java:483)
at com.p6spy.engine.wrapper.PreparedStatementWrapper.execute(PreparedStatementWrapper.java:362)
at org.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:64)
at org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:79)
at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:63)
at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:325)
at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:156)
at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:109)
at com.jn.sqlhelper.mybatis.plugins.pagination.PaginationHandler.executeQuery(PaginationHandler.java:333)
at com.jn.sqlhelper.mybatis.plugins.pagination.PaginationHandler.intercept(PaginationHandler.java:201)
... 143 more
The text was updated successfully, but these errors were encountered: