question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Empty derby.log is generated file after running diffChangelog

See original GitHub issue

Environment

Liquibase Version: 4.6.1

Liquibase Integration & Version: <gradle

Liquibase Extension(s) & Version: 2.0.4

Database Vendor & Version: Postgres 13

Operating System Type & Version: Windows, Postgres runs in Alpine Docker Container

Description

  • After running the diffChangelog gradle task, an empty derby.log file is generated at the root of the project

Steps To Reproduce

  • Run gradle diffChangelog

Actual Behavior

  • An empty derby.log file is generated

Expected/Desired Behavior

  • No derby.log file is generated

Additional Context

My build.gradle.kts looks something like this

plugins {
    id("org.springframework.boot") version "2.5.6"
    id("io.spring.dependency-management") version "1.0.11.RELEASE"
    id("org.liquibase.gradle") version "2.0.4"
    kotlin("jvm") version "1.5.31"
    kotlin("plugin.spring") version "1.5.31"
    kotlin("plugin.jpa") version "1.5.31"
}

java.sourceCompatibility = JavaVersion.VERSION_16

repositories {
    mavenCentral()
}

dependencies {
    implementation("org.springframework.boot:spring-boot-starter-thymeleaf")
    implementation("org.springframework.security:spring-security-oauth2-jose")
    implementation("org.springframework.boot:spring-boot-starter-oauth2-resource-server")
    implementation("org.springframework.boot:spring-boot-starter-security")
    implementation("org.springframework.boot:spring-boot-starter-web")
    implementation("org.springframework.boot:spring-boot-starter-data-jpa")
    implementation("org.springframework.boot:spring-boot-starter-data-rest")
    implementation("org.springframework.boot:spring-boot-starter-mail")
    implementation("org.postgresql:postgresql:42.3.1")
    implementation("org.liquibase:liquibase-core:4.6.1")
    implementation("com.fasterxml.jackson.module:jackson-module-kotlin")
    implementation("org.jetbrains.kotlin:kotlin-reflect")
    implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
    implementation("ch.qos.logback:logback-classic:1.2.6")

    developmentOnly("org.springframework.boot:spring-boot-devtools")

    liquibaseRuntime("org.liquibase:liquibase-core:4.6.1")
    liquibaseRuntime("org.liquibase.ext:liquibase-hibernate5:4.5.0")
    liquibaseRuntime("org.yaml:snakeyaml:1.29")
    liquibaseRuntime(sourceSets.main.get().output)
}

configurations {
    liquibaseRuntime.get().extendsFrom(implementation.get())
}

liquibase {
    activities.register("main") {
        arguments = mutableMapOf(
            "changeLogFile" to "src/main/resources/db/changelog/changes/v9999_rename_me.sql",
            "referenceUrl" to "hibernate:spring:de.sportklinik.arcus" +
                "?dialect=org.hibernate.dialect.PostgreSQL10Dialect" +
                "&hibernate.physical_naming_strategy=org.springframework.boot.orm.jpa.hibernate.SpringPhysicalNamingStrategy" +
                "&hibernate.implicit_naming_strategy=org.springframework.boot.orm.jpa.hibernate.SpringImplicitNamingStrategy",
            "url" to "jdbc:postgresql://localhost:5432/patient",
            "username" to "patient",
            "password" to "patient",
            "logLevel" to "info",
        )
    }
}

tasks["diffChangeLog"].dependsOn(tasks["classes"])

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
XpamAmAdEuScommented, Dec 6, 2021

Did more testing. This log not cuz of liquibase. Its from liquibase-hibernate5. just added exclustion liquibase-test-harness and log gone.

<dependency>
            <groupId>org.liquibase.ext</groupId>
            <artifactId>liquibase-hibernate5</artifactId>
            <version>${liquibase.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>org.liquibase</groupId>
                    <artifactId>liquibase-test-harness</artifactId>
                </exclusion>
            </exclusions>
            <scope>runtime</scope>
        </dependency>
0reactions
FBurguercommented, Aug 23, 2022

This behavior is no limited to hibernate, maven or gradle, it also happens with the CLI, I got it after using update and drop-all. Tested it on liquibase 4.15

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting rid of derby.log - Stack Overflow
Unfortunately whenever I run the test I end up with the derby.log file in the root of the project. The database itself is...
Read more >
Liquibase diffChangeLog creats empty file - General Discussion
While running the command liquibase diffChangeLog it created an empty change log file with just the xml syntax despite the face that there ......
Read more >
Using Liquibase with Apache Derby
This page guides you through the process of creating a new Liquibase project with Apache Derby.
Read more >
Controlling logging by using the log file - Apache DB Project
The derby.log file is created when the Derby server is started. The Network Server then records the time and version. If a log...
Read more >
changelog.txt · xiaowu/liquibase-3.10.2 - Gitee.com
... no longer generates procedural code with incorrect SQL syntax when running ... NullPointerException when file is empty - [CORE-2214] - When inserting ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found