1

I am using liquibase in my quarkus application, where I want to perform a simple operation to execute a .sql file through the master changeLog.xml but upon running the same I am getting the below error:

"Quarkus Main Thread", "message" : "Cannot load service: liquibase.hub.HubService: Provider liquibase.hub.core.StandardHubService could not be instantiated"

Though I can see the success message that my chnageLog.xml has executed with the correct Changeset ID in the console and I found one new record in DATABASECHANGELOG table with the same id and EXECTYPE is EXECUTED but still the insert query which is written in the .sql file is not executed.

Below are the dependencies in POM for liquibase:

<dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-liquibase</artifactId>
        </dependency>
        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-jdbc-mssql</artifactId>
        </dependency>

application.properties:

quarkus.liquibase.migrate-at-start=true

changeLog.xml:

<?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
    https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd
    http://www.liquibase.org/xml/ns/dbchangelog
    https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-latest.xsd">
        
    
<changeSet author="liquibase-test-5" id="sqlFile-example-5">
     <sqlFile dbms="sqlserver" splitStatements="true"
        path="liquibase-test.sql"
        relativeToChangelogFile="true"
        stripComments="true"/>
</changeSet>
    
</databaseChangeLog>

liquibase-test.sql:

INSERT INTO dbo.TestTable (id,name) VALUES (2,'Salman');
Dale K
  • 25,246
  • 15
  • 42
  • 71
Xwin
  • 103
  • 5
  • 16
  • This sounds like a bug. Can you please open an issue in the Quarkus Github repository and attach a sample application that exhibits the problem and that we can use to debug? – geoand Jun 07 '23 at 06:44
  • @geoand, Could you please paste the link here for reference where to open the issue and any other info if needed? Thanks. – Xwin Jun 07 '23 at 07:02
  • https://github.com/quarkusio/quarkus/issues – geoand Jun 07 '23 at 09:13

0 Answers0