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.

Issue after upgrading GRADLE and JAVA

See original GitHub issue

I’m using Spring 2.0.0 and Gradle 4.6 with Java 10. Previous configuration was working before upgrading to Java 10.

def db = 'common'

def packageURI
if ('common'.compareToIgnoreCase(db) == 0) {
    packageURI = 'com.entities.common'
} else {
    packageURI = 'com.entities.client'
}

def dbUsername = 'root'
def dbPassword = 'root'
def dbUrl = 'jdbc:mysql://localhost:3306/' + db + '?serverTimezone=UTC&nullNamePatternMatchesAll=true'
def liquibaseReferenceURL = 'hibernate:spring:' + packageURI + '?dialect=org.hibernate.dialect.MySQL5Dialect'

/**
 * Output files
 */
def sqlOutFile = "$projectDir/src/main/resources/db/db.changelog.sql"
def customDiffChangeLogFile = "$projectDir/src/main/resources/db/db.changelog.yaml"

def taskArgs = [
        "--username=" + dbUsername
        , "--password=" + dbPassword
        , "--url=" + dbUrl
        , "--referenceUrl=" + liquibaseReferenceURL
        , "--outputFile=" + sqlOutFile
        , "--changeLogFile=" + customDiffChangeLogFile
        , "--driver=com.mysql.jdbc.Driver"
        , "--referenceDriver=liquibase.ext.hibernate.database.connection.HibernateDriver"
]


configurations {
    liquibase
}

dependencies {
    liquibase "org.liquibase.ext:liquibase-hibernate5:3.6"
}

/**
 * 1) Change Log - compare existing db vs java entities and creates the changelog.
 */
task schemaChangeLog(type: JavaExec) {
    group = "liquibase"
    classpath sourceSets.main.runtimeClasspath
    classpath configurations.liquibase
    main = "liquibase.integration.commandline.Main"

    args taskArgs
    args "diffChangeLog"
}

/**
 * 2) Export SQL - from the changelog generates the set of statements required to update the DB
 */
task schemaExportSQL(type: JavaExec) {
    println packageURI
    dependsOn schemaChangeLog

    group = "liquibase"
    classpath sourceSets.main.runtimeClasspath
    classpath configurations.liquibase
    main = "liquibase.integration.commandline.Main"

    args taskArgs
    args "updateSql"
}

This was working. After upgrading to JAVA 10 I started getting this error:

[ERROR] [system.err] Unexpected error running Liquibase: URI is not hierarchical

┆Issue is synchronized with this Jira Bug by Unito

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:4
  • Comments:10

github_iconTop GitHub Comments

7reactions
rylitalocommented, Apr 5, 2019

I was able to fix this by upgrading to liquibase 3.6.3 in my build.gradle.

runtime(‘org.liquibase:liquibase-core:3.6.3’)

4reactions
smaczcommented, Feb 13, 2019

Same issue here with java 11. Is it going to be fixed soon?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Upgrading your build from Gradle 6.x to the latest
Try running gradle help --scan and view the deprecations view of the generated build scan. Deprecations View of a Gradle Build Scan. This...
Read more >
Known issues with Android Studio and Android Gradle Plugin
To fix this issue, upgrade your Android 11 emulator to version 9 or higher by navigating to Tools > SDK Manager. In the...
Read more >
Android release build fail after upgrading to Gradle wrapper to ...
I have updated my Android Studio to Artic Fox as well as Gradle wrapper to 7.0.2 (plugin 7.0.
Read more >
Weird memory issue after upgrading to Gradle 7.3.2 ... - GitHub
Expected Behavior Compilation finishes without warning or errors. Current Behavior The VM is generating a heap dump.
Read more >
App crashing after upgrading android gradle plugin to 7
After updating com.android.tools.build:gradle from 4.1.3 to 7.0.0 the builds generated by CircleCI are crashing: java.lang.
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