error message
Exception in thread "main" org.apache.ibatis.exceptions.PersistenceException:
### Error opening session. Cause: org.apache.ibatis.plugin.PluginException: Could not find method on interface org.apache.ibatis.executor.statement.StatementHandler named prepare. Cause: java.lang.NoSuchMethodException: org.apache.ibatis.executor.statement.StatementHandler.prepare(java.sql.Connection)
### Cause: org.apache.ibatis.plugin.PluginException: Could not find method on interface org.apache.ibatis.executor.statement.StatementHandler named prepare. Cause: java.lang.NoSuchMethodException: org.apache.ibatis.executor.statement.StatementHandler.prepare(java.sql.Connection)
at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30)
at org.apache.ibatis.session.defaults.DefaultSqlSessionFactory.openSessionFromDataSource(DefaultSqlSessionFactory.java:100)
In fact, carefully read the error prompts, trace to the source code to see the reason, because the use of a relatively new or the latest mybatis Jar package, and my interceptor code is written in an old way. In the new mybatis jar package, the prepare method in statementhandler has two parameters, as follows: statement prepare(Connection connection, Integer Transaction timeout), but there is only one parameter in my interceptor code, so I can’t get it. The solution is to add an integer. Class parameter to the rules of pagination interceptor. As follows:
@Intercepts({@Signature(type=StatementHandler.class,method="prepare",args={Connection.class, Integer.class })})
Read More:
- The SSM framework adds the mybatis paging plug-in to start the error report
- Springboot: start error reporting after introducing paging plug-in PageHelper
- Mybatis custom list collection parser
- Error: Failed to execute goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.2
- [solution] install youcompleteme through VIM plug-in manager VIM plug, including ycmd server shutdown solution
- Failed to retrieve plugin descriptor for org.mybatis.generator :mybatis-generator
- The jar package download of Maven project appears (could not transfer artifact. Org mybatis:mybatis )
- During a paging operation
- ElementUI implements front-end paging
- [error] error handling of IntelliJ idea
- Summary of Hadoop error handling methods
- Related configuration of mybatis project
- How to Add custom middleware for GRPC server
- Handling nullreference exception problems encountered in NHibernate
- Ranger yarn plug-in installation
- Exception handling of httpmessage notwritableexception in springboot
- Use of C + + ifstream and error handling
- VMware Workstation failed to recover error: (VMX) exception 0xc0000006 (disk error while paging) has
- Springboot integrated with mybatis
- [Jackson exception] com.fasterxml.jackson . databind.JsonMappingException Exception handling method