[Solved] java.lang.NoClassDefFoundError: net/sf/jsqlparser/expression/Expression

When deploying the springboot project with dcoker, the query list will report errors. The exception information is as follows:

After analyzing the cause, we know that it is the jsqlparser version problem. For versions below 1.0 (including 1.0), there is an error when querying the data from the database for parsing.

You need to upgrade its version. Here you can upgrade to version 4.0 directly:

<dependency>
    <groupId>com.github.jsqlparser</groupId>
    <artifactId>jsqlparser</artifactId>
    <version>4.0</version>
</dependency>

Of course, this exception will also occur when using the PageHelper of GitHub’s paging plug-in. The reason is that it introduces jsqlparser, so you need to upgrade the version of the paging plug-in:

<dependency>
      <groupId>com.github.pagehelper</groupId>
      <artifactId>pagehelper-spring-boot-starter</artifactId>
      <version>1.3.1</version>
</dependency>

This is a hidden pit. You need to know who introduced this plug-in.

Similar Posts: