Tag Archives: Error attempting to get column ‘create_time‘ from result set. Cause: java.sql.SQLFeatureNotSupported

[Solved] Error attempting to get column ‘create_time‘ from result set. Cause: java.sql.SQLFeatureNotSupported

MP official suggestions
there is no problem with versions before 3.1.0. The above problems occur for 3.1.1 and subsequent versions

Phenomenon: integrate the Druid data source. There is no problem using the version before 3.1.0. After upgrading MP to 3.1.1 +, an error occurs when running: java.sql.sqlfeaturenotsupportedexception

Reason: mp3.1.1 + uses the new version of JDBC, localdatetime and other new date type processing methods to upgrade, but Druid is not supported before version 1.1.21. Refer to issue

Solution:

> 1. Upgrade druid to 1.1.21 to solve this problem.
> 2. keep mp version 3.1.0.
> 3. Keep up with the mp version and change the druid data source

POM is as follows

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
        <junit.version>4.12</junit.version>
        <log4j.version>1.2.17</log4j.version>
        <druid.version>1.1.21</druid.version>
        <druid.spring.boot.starter.version>1.1.10</druid.spring.boot.starter.version>
        <spring-boot.version>2.3.4.RELEASE</spring-boot.version>
    </properties>

    <dependency>
        <groupId>com.alibaba</groupId>
        <artifactId>druid</artifactId>
        <version>${druid.version}</version>
    </dependency>
    <dependency>
        <groupId>com.alibaba</groupId>
        <artifactId>druid-spring-boot-starter</artifactId>
        <version>${druid.spring.boot.starter.version}</version>
    </dependency>