Я пытался интегрировать Liquibase 3.6.3 с приложением весенней загрузки 2.1.5.RELEASE, и я получаю эту ошибку при запуске приложения.
Caused by: liquibase.exception.DatabaseException: liquibase.exception.UnexpectedLiquibaseException: Error during testing for MySQL/MariaDB JDBC driver bug: could not retrieve JDBC metadata information for temporary table 'TMP_TYIVMBAICPSUJGIJ'
at liquibase.snapshot.jvm.ForeignKeySnapshotGenerator.snapshotObject(ForeignKeySnapshotGenerator.java:223) ~[liquibase-core-3.6.3.jar:na]
at liquibase.snapshot.jvm.JdbcSnapshotGenerator.snapshot(JdbcSnapshotGenerator.java:66) ~[liquibase-core-3.6.3.jar:na]
at liquibase.snapshot.SnapshotGeneratorChain.snapshot(SnapshotGeneratorChain.java:49) ~[liquibase-core-3.6.3.jar:na]
at liquibase.snapshot.jvm.JdbcSnapshotGenerator.snapshot(JdbcSnapshotGenerator.java:69) ~[liquibase-core-3.6.3.jar:na]
at liquibase.snapshot.SnapshotGeneratorChain.snapshot(SnapshotGeneratorChain.java:49) ~[liquibase-core-3.6.3.jar:na]
at liquibase.snapshot.DatabaseSnapshot.include(DatabaseSnapshot.java:286) ~[liquibase-core-3.6.3.jar:na]
at liquibase.snapshot.DatabaseSnapshot.replaceObject(DatabaseSnapshot.java:407) ~[liquibase-core-3.6.3.jar:na]
at liquibase.snapshot.DatabaseSnapshot.includeNestedObjects(DatabaseSnapshot.java:334) ~[liquibase-core-3.6.3.jar:na]
at liquibase.snapshot.DatabaseSnapshot.include(DatabaseSnapshot.java:309) ~[liquibase-core-3.6.3.jar:na]
at liquibase.snapshot.DatabaseSnapshot.replaceObject(DatabaseSnapshot.java:407) ~[liquibase-core-3.6.3.jar:na]
at liquibase.snapshot.DatabaseSnapshot.replaceObject(DatabaseSnapshot.java:429) ~[liquibase-core-3.6.3.jar:na]
at liquibase.snapshot.DatabaseSnapshot.includeNestedObjects(DatabaseSnapshot.java:334) ~[liquibase-core-3.6.3.jar:na]
at liquibase.snapshot.DatabaseSnapshot.include(DatabaseSnapshot.java:309) ~[liquibase-core-3.6.3.jar:na]
at liquibase.snapshot.DatabaseSnapshot.replaceObject(DatabaseSnapshot.java:386) ~[liquibase-core-3.6.3.jar:na]
at liquibase.snapshot.DatabaseSnapshot.includeNestedObjects(DatabaseSnapshot.java:334) ~[liquibase-core-3.6.3.jar:na]
at liquibase.snapshot.DatabaseSnapshot.include(DatabaseSnapshot.java:309) ~[liquibase-core-3.6.3.jar:na]
at liquibase.snapshot.DatabaseSnapshot.init(DatabaseSnapshot.java:102) ~[liquibase-core-3.6.3.jar:na]
at liquibase.snapshot.DatabaseSnapshot.<init>(DatabaseSnapshot.java:59) ~[liquibase-core-3.6.3.jar:na]
at liquibase.snapshot.JdbcDatabaseSnapshot.<init>(JdbcDatabaseSnapshot.java:38) ~[liquibase-core-3.6.3.jar:na]
at liquibase.snapshot.SnapshotGeneratorFactory.createSnapshot(SnapshotGeneratorFactory.java:217) ~[liquibase-core-3.6.3.jar:na]
at liquibase.snapshot.SnapshotGeneratorFactory.createSnapshot(SnapshotGeneratorFactory.java:246) ~[liquibase-core-3.6.3.jar:na]
at liquibase.snapshot.SnapshotGeneratorFactory.createSnapshot(SnapshotGeneratorFactory.java:230) ~[liquibase-core-3.6.3.jar:na]
at liquibase.change.core.LoadDataChange.retrieveMissingColumnLoadTypes(LoadDataChange.java:581) ~[liquibase-core-3.6.3.jar:na]
at liquibase.change.core.LoadDataChange.generateStatements(LoadDataChange.java:283) ~[liquibase-core-3.6.3.jar:na]
... 121 common frames omitted
Caused by: liquibase.exception.UnexpectedLiquibaseException: Error during testing for MySQL/MariaDB JDBC driver bug: could not retrieve JDBC metadata information for temporary table 'TMP_TYIVMBAICPSUJGIJ'
at liquibase.database.core.MySQLDatabase.hasBugJdbcConstraintsDeferrable(MySQLDatabase.java:275) ~[liquibase-core-3.6.3.jar:na]
at liquibase.snapshot.jvm.ForeignKeySnapshotGenerator.snapshotObject(ForeignKeySnapshotGenerator.java:188) ~[liquibase-core-3.6.3.jar:na]
... 144 common frames omitted
Моя конфигурация выглядит следующим образом;
outputChangeLogFile=src/main/resources/config/db/db.changelog-master.xml
driver = com.mysql.cj.jdbc.Driver
url=jdbc:mysql://localhost:3306/<dbname>?useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&useTimezone=true&serverTimezone=UTC
username = <username>
password = <password>
Также добавляем основной файл журнала изменений
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd">
<include file="classpath:config/db/changelog/db.changelog-1.0.xml" relativeToChangelogFile="false"/>
<include file="classpath:config/db/changelog/db.changelog-1.1.xml" relativeToChangelogFile="false"/>
Я пытался сменить версию на 3.5.3, тогда весна дает ошибку
***************************
APPLICATION FAILED TO START
***************************
Description:
An attempt was made to call a method that does not exist. The attempt was made from the following location:
org.springframework.boot.autoconfigure.liquibase.LiquibaseAutoConfiguration$LiquibaseConfiguration.liquibase(LiquibaseAutoConfiguration.java:127)
The following method did not exist:
liquibase.integration.spring.SpringLiquibase.setLiquibaseSchema(Ljava/lang/String;)V
The method's class, liquibase.integration.spring.SpringLiquibase, is available from the following locations:
jar:file:/C:/Users/<user>/.m2/repository/org/liquibase/liquibase-core/3.5.3/liquibase-core-3.5.3.jar!/liquibase/integration/spring/SpringLiquibase.class
It was loaded from the following location:
file:/C:/Users/<user>/.m2/repository/org/liquibase/liquibase-core/3.5.3/liquibase-core-3.5.3.jar
Action:
Correct the classpath of your application so that it contains a single, compatible version of liquibase.integration.spring.SpringLiquibase
Это ошибка? Как я могу решить эту проблему?
ПРИМЕЧАНИЕ:
liquibase-maven-plugin: 3.5.3: обновление с использованием
mvn: liquibase: обновление
помог мне сгенерировать таблицы. Я использовал
LiquiBase-Maven-плагин: 3.5.3
для его генерации.
До сих пор не знаю, почему 3.6.3 дает ошибку.