liquibase.exception.ChangeLogParseException: liquibase.exception.SetupException: liquibase.exception.SetupException: Could not find directory or directory was empty for includeAll 'tables/'

JIRA | idsettlingen | 2 years ago
  1. 0

    If we call liquibase.update() from an application, we got an exception. {noformat} liquibase.exception.ChangeLogParseException: liquibase.exception.SetupException: liquibase.exception.SetupException: Could not find directory or directory was empty for includeAll 'tables/' at liquibase.parser.core.xml.AbstractChangeLogParser.parse(AbstractChangeLogParser.java:27) at liquibase.Liquibase.getDatabaseChangeLog(Liquibase.java:215) at liquibase.Liquibase.update(Liquibase.java:192) at liquibase.Liquibase.update(Liquibase.java:181) at liquibase.Liquibase.update(Liquibase.java:174) at de.ids.en.client.integrationtests3.test.AbstractLiquiBasedTestHelper.setUpDatabase(AbstractLiquiBasedTestHelper.java:37) at de.ids.en.client.integrationtests3.test.GenericEntityTemplateTest.setUp(GenericEntityTemplateTest.java:24) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) at org.junit.runners.ParentRunner.run(ParentRunner.java:309) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197) Caused by: liquibase.exception.SetupException: liquibase.exception.SetupException: Could not find directory or directory was empty for includeAll 'tables/' at liquibase.changelog.DatabaseChangeLog.handleChildNode(DatabaseChangeLog.java:247) at liquibase.changelog.DatabaseChangeLog.load(DatabaseChangeLog.java:211) at liquibase.parser.core.xml.AbstractChangeLogParser.parse(AbstractChangeLogParser.java:25) ... 30 more Caused by: liquibase.exception.ChangeLogParseException: liquibase.exception.SetupException: Could not find directory or directory was empty for includeAll 'tables/' at liquibase.parser.core.xml.AbstractChangeLogParser.parse(AbstractChangeLogParser.java:27) at liquibase.changelog.DatabaseChangeLog.include(DatabaseChangeLog.java:353) at liquibase.changelog.DatabaseChangeLog.handleChildNode(DatabaseChangeLog.java:245) ... 32 more Caused by: liquibase.exception.SetupException: Could not find directory or directory was empty for includeAll 'tables/' at liquibase.changelog.DatabaseChangeLog.includeAll(DatabaseChangeLog.java:331) at liquibase.changelog.DatabaseChangeLog.handleChildNode(DatabaseChangeLog.java:261) at liquibase.changelog.DatabaseChangeLog.load(DatabaseChangeLog.java:211) at liquibase.parser.core.xml.AbstractChangeLogParser.parse(AbstractChangeLogParser.java:25) ... 34 more Caused by: liquibase.exception.SetupException: Could not find directory or directory was empty for includeAll 'tables/' at liquibase.changelog.DatabaseChangeLog.includeAll(DatabaseChangeLog.java:324) ... 37 more {noformat} That is our call: {noformat} ResourceAccessor resourceAccessor = new ClassLoaderResourceAccessor(); Database database = DatabaseFactory.getInstance().findCorrectDatabaseImplementation(new JdbcConnection(conn)); Liquibase liquibase = new Liquibase(liquibaseFile, resourceAccessor, database); liquibase.update(""); {noformat} And this is our workaround: {noformat} ResourceAccessor resourceAccessor = new ClassLoaderResourceAccessor() { @Override public Set<String> list(String relativeTo, String path, boolean includeFiles, boolean includeDirectories, boolean recursive) throws IOException { relativeTo = FilenameUtils.getFullPath(relativeTo); return super.list(relativeTo, path, includeFiles, includeDirectories, recursive); } }; Database database = DatabaseFactory.getInstance().findCorrectDatabaseImplementation(new JdbcConnection(conn)); Liquibase liquibase = new Liquibase(liquibaseFile, resourceAccessor, database); liquibase.update(""); {noformat} The Problem is the path won't correct created.

    JIRA | 2 years ago | idsettlingen
    liquibase.exception.ChangeLogParseException: liquibase.exception.SetupException: liquibase.exception.SetupException: Could not find directory or directory was empty for includeAll 'tables/'
  2. 0

    If we call liquibase.update() from an application, we got an exception. {noformat} liquibase.exception.ChangeLogParseException: liquibase.exception.SetupException: liquibase.exception.SetupException: Could not find directory or directory was empty for includeAll 'tables/' at liquibase.parser.core.xml.AbstractChangeLogParser.parse(AbstractChangeLogParser.java:27) at liquibase.Liquibase.getDatabaseChangeLog(Liquibase.java:215) at liquibase.Liquibase.update(Liquibase.java:192) at liquibase.Liquibase.update(Liquibase.java:181) at liquibase.Liquibase.update(Liquibase.java:174) at de.ids.en.client.integrationtests3.test.AbstractLiquiBasedTestHelper.setUpDatabase(AbstractLiquiBasedTestHelper.java:37) at de.ids.en.client.integrationtests3.test.GenericEntityTemplateTest.setUp(GenericEntityTemplateTest.java:24) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) at org.junit.runners.ParentRunner.run(ParentRunner.java:309) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197) Caused by: liquibase.exception.SetupException: liquibase.exception.SetupException: Could not find directory or directory was empty for includeAll 'tables/' at liquibase.changelog.DatabaseChangeLog.handleChildNode(DatabaseChangeLog.java:247) at liquibase.changelog.DatabaseChangeLog.load(DatabaseChangeLog.java:211) at liquibase.parser.core.xml.AbstractChangeLogParser.parse(AbstractChangeLogParser.java:25) ... 30 more Caused by: liquibase.exception.ChangeLogParseException: liquibase.exception.SetupException: Could not find directory or directory was empty for includeAll 'tables/' at liquibase.parser.core.xml.AbstractChangeLogParser.parse(AbstractChangeLogParser.java:27) at liquibase.changelog.DatabaseChangeLog.include(DatabaseChangeLog.java:353) at liquibase.changelog.DatabaseChangeLog.handleChildNode(DatabaseChangeLog.java:245) ... 32 more Caused by: liquibase.exception.SetupException: Could not find directory or directory was empty for includeAll 'tables/' at liquibase.changelog.DatabaseChangeLog.includeAll(DatabaseChangeLog.java:331) at liquibase.changelog.DatabaseChangeLog.handleChildNode(DatabaseChangeLog.java:261) at liquibase.changelog.DatabaseChangeLog.load(DatabaseChangeLog.java:211) at liquibase.parser.core.xml.AbstractChangeLogParser.parse(AbstractChangeLogParser.java:25) ... 34 more Caused by: liquibase.exception.SetupException: Could not find directory or directory was empty for includeAll 'tables/' at liquibase.changelog.DatabaseChangeLog.includeAll(DatabaseChangeLog.java:324) ... 37 more {noformat} That is our call: {noformat} ResourceAccessor resourceAccessor = new ClassLoaderResourceAccessor(); Database database = DatabaseFactory.getInstance().findCorrectDatabaseImplementation(new JdbcConnection(conn)); Liquibase liquibase = new Liquibase(liquibaseFile, resourceAccessor, database); liquibase.update(""); {noformat} And this is our workaround: {noformat} ResourceAccessor resourceAccessor = new ClassLoaderResourceAccessor() { @Override public Set<String> list(String relativeTo, String path, boolean includeFiles, boolean includeDirectories, boolean recursive) throws IOException { relativeTo = FilenameUtils.getFullPath(relativeTo); return super.list(relativeTo, path, includeFiles, includeDirectories, recursive); } }; Database database = DatabaseFactory.getInstance().findCorrectDatabaseImplementation(new JdbcConnection(conn)); Liquibase liquibase = new Liquibase(liquibaseFile, resourceAccessor, database); liquibase.update(""); {noformat} The Problem is the path won't correct created.

    JIRA | 2 years ago | idsettlingen
    liquibase.exception.ChangeLogParseException: liquibase.exception.SetupException: liquibase.exception.SetupException: Could not find directory or directory was empty for includeAll 'tables/'
  3. 0

    mvn liquibase:update gives liquibase.exception.SetupException

    GitHub | 2 years ago | spoon99
    org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.liquibase:liquibase-maven-plugin:3.3.2:update (default-cli) on project quiltadd: Error setting up or running Liquibase: liquibase.exception.SetupException: classpath:config/liquibase/changelog/00000000000000_initial_schema.xml does not exist
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Update from 3.3 to 3.4 - db.changelog-master.xml not found

    GitHub | 9 months ago | TwizzyDizzy
    liquibase.exception.ChangeLogParseException: /opt/traccar/data/db.changelog-master.xml does not exist
  6. 0

    This yaml changelog: {code} databaseChangeLog: - changeSet: id: create-sequence author: Matt Drees changes: - createSequence: incrementBy: 1 sequenceName: system_credentials_seq {code} fails with a stacktrace that looks like this: {code} liquibase.exception.ChangeLogParseException: liquibase.exception.ChangeLogParseException: liquibase.exception.UnexpectedLiquibaseException: Error setting incrementBy to 1 in changelog.yaml::create-sequence::Matt Drees at liquibase.parser.core.yaml.YamlChangeLogParser.parse(YamlChangeLogParser.java:309) at liquibase.Liquibase.getDatabaseChangeLog(Liquibase.java:216) at liquibase.Liquibase.update(Liquibase.java:194) at org.ccci.wsapi.db.ChangelogTest.testChangeLogAgainstUrl(ChangelogTest.java:41) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80) at org.testng.internal.Invoker.invokeMethod(Invoker.java:691) at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:883) at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1208) at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127) at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111) at org.testng.TestRunner.privateRun(TestRunner.java:758) at org.testng.TestRunner.run(TestRunner.java:613) at org.testng.SuiteRunner.runTest(SuiteRunner.java:334) at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329) at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291) at org.testng.SuiteRunner.run(SuiteRunner.java:240) at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:53) at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:87) at org.testng.TestNG.runSuitesSequentially(TestNG.java:1137) at org.testng.TestNG.runSuitesLocally(TestNG.java:1062) at org.testng.TestNG.run(TestNG.java:974) at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:109) at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:202) at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:173) at org.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:111) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120) Caused by: liquibase.exception.ChangeLogParseException: liquibase.exception.UnexpectedLiquibaseException: Error setting incrementBy to 1 in changelog.yaml::create-sequence::Matt Drees at liquibase.parser.core.yaml.YamlChangeLogParser.parse(YamlChangeLogParser.java:210) ... 33 more Caused by: liquibase.exception.UnexpectedLiquibaseException: Error setting incrementBy to 1 at liquibase.change.ChangeParameterMetaData.setValue(ChangeParameterMetaData.java:281) at liquibase.parser.core.yaml.YamlChangeLogParser.parseChange(YamlChangeLogParser.java:409) at liquibase.parser.core.yaml.YamlChangeLogParser.parse(YamlChangeLogParser.java:109) ... 33 more Caused by: liquibase.exception.UnexpectedLiquibaseException: Could not convert java.lang.Integer to java.math.BigInteger at liquibase.change.ChangeParameterMetaData.setValue(ChangeParameterMetaData.java:274) ... 35 more {code}

    JIRA | 3 years ago | Matt Drees
    liquibase.exception.ChangeLogParseException: liquibase.exception.ChangeLogParseException: liquibase.exception.UnexpectedLiquibaseException: Error setting incrementBy to 1 in changelog.yaml::create-sequence::Matt Drees

  1. davidvanlaatum 26 times, last 4 weeks ago
  2. Seungwan 1 times, last 5 months ago
  3. davidvanlaatum 10 times, last 7 months ago
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. liquibase.exception.SetupException

    Could not find directory or directory was empty for includeAll 'tables/'

    at liquibase.changelog.DatabaseChangeLog.includeAll()
  2. Liquibase Core
    Liquibase.update
    1. liquibase.changelog.DatabaseChangeLog.includeAll(DatabaseChangeLog.java:324)
    2. liquibase.changelog.DatabaseChangeLog.handleChildNode(DatabaseChangeLog.java:261)
    3. liquibase.changelog.DatabaseChangeLog.load(DatabaseChangeLog.java:211)
    4. liquibase.parser.core.xml.AbstractChangeLogParser.parse(AbstractChangeLogParser.java:25)
    5. liquibase.changelog.DatabaseChangeLog.include(DatabaseChangeLog.java:353)
    6. liquibase.changelog.DatabaseChangeLog.handleChildNode(DatabaseChangeLog.java:245)
    7. liquibase.changelog.DatabaseChangeLog.load(DatabaseChangeLog.java:211)
    8. liquibase.parser.core.xml.AbstractChangeLogParser.parse(AbstractChangeLogParser.java:25)
    9. liquibase.Liquibase.getDatabaseChangeLog(Liquibase.java:215)
    10. liquibase.Liquibase.update(Liquibase.java:192)
    11. liquibase.Liquibase.update(Liquibase.java:181)
    12. liquibase.Liquibase.update(Liquibase.java:174)
    12 frames
  3. de.ids.en
    GenericEntityTemplateTest.setUp
    1. de.ids.en.client.integrationtests3.test.AbstractLiquiBasedTestHelper.setUpDatabase(AbstractLiquiBasedTestHelper.java:37)
    2. de.ids.en.client.integrationtests3.test.GenericEntityTemplateTest.setUp(GenericEntityTemplateTest.java:24)
    2 frames
  4. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    4. java.lang.reflect.Method.invoke(Method.java:606)
    4 frames
  5. JUnit
    ParentRunner.run
    1. org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
    2. org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
    3. org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
    4. org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
    5. org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
    6. org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
    7. org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
    8. org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
    9. org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
    10. org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
    11. org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
    12. org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
    13. org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
    14. org.junit.runners.ParentRunner.run(ParentRunner.java:309)
    14 frames
  6. JUnit4 Runner
    JUnit4TestReference.run
    1. org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
    1 frame
  7. JUnit3 Runner
    RemoteTestRunner.main
    1. org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    2. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
    3. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
    4. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
    5. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
    5 frames