当前位置:   article > 正文

【无标题】mybatis-plus使用报错_caused by: java.util.concurrent.executionexception

caused by: java.util.concurrent.executionexception: net.sf.jsqlparser.parser

一、 报错如下:

 Caused by: java.util.concurrent.ExecutionException: net.sf.jsqlparser.parser.ParseException: Encountered unexpected token: "AND" "AND"
    at line 8, column 1.

Was expecting:

    <EOF>
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6

具体错误:

org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException: 
### Error querying database.  Cause: com.baomidou.mybatisplus.core.exceptions.MybatisPlusException: Failed to process, Error SQL:xxx此处查询的sql语句xxx
  • 1
  • 2

在这里插入图片描述

二、应用场景
使用mybatis-plus
使用MPJLambdaWrapper,未使用直接的sql命令
报错的mysql单独在数据库中执行不报错(sql语句没问题)
项目运行页面首次查询报错500, 刷新查询不报错;控制台一直报错

三、解决方案
pom.xml文件导入依赖,不报错

		<dependency>
            <groupId>com.github.jsqlparser</groupId>
            <artifactId>jsqlparser</artifactId>
            <version>4.2</version>
        </dependency>
  • 1
  • 2
  • 3
  • 4
  • 5

百度网上很多情况,我的错误导入这个依赖就可以解决
本人参考解决问题:net.sf.jsqlparser.parser.ParseException: Encountered “ “(“ “( ““ at line 5, column 13.

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/一键难忘520/article/detail/894148
推荐阅读
相关标签
  

闽ICP备14008679号