org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.liquibase:liquibase-maven-plugin:3.3.0:generateChangeLog (default-cli) on project logiq-persistence: Error setting up or running Liquibase: liquibase.command.CommandExecutionException: liquibase.exception.UnexpectedLiquibaseException: java.sql.SQLException: Invalid argument(s) in call: setFetchSize

JIRA | Thomas Becker | 2 years ago
  1. 0

    When trying to generate changelogs for an oracle DB with: mvn -e org.liquibase:liquibase-maven-plugin:3.3.0:generateChangeLog I'm getting the following exception stacktrace: org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.liquibase:liquibase-maven-plugin:3.3.0:generateChangeLog (default-cli) on project logiq-persistence: Error setting up or running Liquibase: liquibase.command.CommandExecutionException: liquibase.exception.UnexpectedLiquibaseException: java.sql.SQLException: Invalid argument(s) in call: setFetchSize at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:317) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214) at org.apache.maven.cli.MavenCli.main(MavenCli.java:158) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356) Caused by: org.apache.maven.plugin.MojoExecutionException: Error setting up or running Liquibase: liquibase.command.CommandExecutionException: liquibase.exception.UnexpectedLiquibaseException: java.sql.SQLException: Invalid argument(s) in call: setFetchSize at org.liquibase.maven.plugins.AbstractLiquibaseMojo.execute(AbstractLiquibaseMojo.java:373) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208) ... 19 more Caused by: liquibase.exception.LiquibaseException: liquibase.command.CommandExecutionException: liquibase.exception.UnexpectedLiquibaseException: java.sql.SQLException: Invalid argument(s) in call: setFetchSize at liquibase.integration.commandline.CommandLineUtils.doGenerateChangeLog(CommandLineUtils.java:140) at liquibase.integration.commandline.CommandLineUtils.doGenerateChangeLog(CommandLineUtils.java:114) at org.liquibase.maven.plugins.LiquibaseGenerateChangeLogMojo.performLiquibaseTask(LiquibaseGenerateChangeLogMojo.java:85) at org.liquibase.maven.plugins.AbstractLiquibaseMojo.execute(AbstractLiquibaseMojo.java:369) ... 21 more Caused by: liquibase.command.CommandExecutionException: liquibase.exception.UnexpectedLiquibaseException: java.sql.SQLException: Invalid argument(s) in call: setFetchSize at liquibase.command.AbstractCommand.execute(AbstractCommand.java:13) at liquibase.integration.commandline.CommandLineUtils.doGenerateChangeLog(CommandLineUtils.java:138) ... 24 more Caused by: liquibase.exception.UnexpectedLiquibaseException: java.sql.SQLException: Invalid argument(s) in call: setFetchSize at liquibase.diff.output.changelog.core.MissingDataExternalFileChangeGenerator.fixMissing(MissingDataExternalFileChangeGenerator.java:155) at liquibase.diff.output.changelog.ChangeGeneratorChain.fixMissing(ChangeGeneratorChain.java:44) at liquibase.diff.output.changelog.ChangeGeneratorFactory.fixMissing(ChangeGeneratorFactory.java:99) at liquibase.diff.output.changelog.DiffToChangeLog.generateChangeSets(DiffToChangeLog.java:145) at liquibase.diff.output.changelog.DiffToChangeLog.print(DiffToChangeLog.java:125) at liquibase.diff.output.changelog.DiffToChangeLog.print(DiffToChangeLog.java:81) at liquibase.diff.output.changelog.DiffToChangeLog.print(DiffToChangeLog.java:64) at liquibase.command.GenerateChangeLogCommand.run(GenerateChangeLogCommand.java:54) at liquibase.command.AbstractCommand.execute(AbstractCommand.java:8) ... 25 more Caused by: java.sql.SQLException: Invalid argument(s) in call: setFetchSize at oracle.jdbc.driver.OracleStatement.setPrefetchInternal(OracleStatement.java:2854) at oracle.jdbc.driver.OracleStatement.setFetchSize(OracleStatement.java:4122) at oracle.jdbc.driver.OracleStatementWrapper.setFetchSize(OracleStatementWrapper.java:232) at liquibase.diff.output.changelog.core.MissingDataExternalFileChangeGenerator.fixMissing(MissingDataExternalFileChangeGenerator.java:63) ... 33 more The reason is that in MissingDataExternalFileChangGenerator lines 62 and following you do: if (!(referenceDatabase instanceof PostgresDatabase)) { stmt.setFetchSize(Integer.MIN_VALUE); } And thus try to set fetchSize to a negative value. Which apparently doesn't work with the ojdbc6 driver. I'm using ojdbc6 version 11.2.0.2.0. Cheers, Thomas

    JIRA | 2 years ago | Thomas Becker
    org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.liquibase:liquibase-maven-plugin:3.3.0:generateChangeLog (default-cli) on project logiq-persistence: Error setting up or running Liquibase: liquibase.command.CommandExecutionException: liquibase.exception.UnexpectedLiquibaseException: java.sql.SQLException: Invalid argument(s) in call: setFetchSize
  2. 0

    When trying to generate changelogs for an oracle DB with: mvn -e org.liquibase:liquibase-maven-plugin:3.3.0:generateChangeLog I'm getting the following exception stacktrace: org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.liquibase:liquibase-maven-plugin:3.3.0:generateChangeLog (default-cli) on project logiq-persistence: Error setting up or running Liquibase: liquibase.command.CommandExecutionException: liquibase.exception.UnexpectedLiquibaseException: java.sql.SQLException: Invalid argument(s) in call: setFetchSize at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:317) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214) at org.apache.maven.cli.MavenCli.main(MavenCli.java:158) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356) Caused by: org.apache.maven.plugin.MojoExecutionException: Error setting up or running Liquibase: liquibase.command.CommandExecutionException: liquibase.exception.UnexpectedLiquibaseException: java.sql.SQLException: Invalid argument(s) in call: setFetchSize at org.liquibase.maven.plugins.AbstractLiquibaseMojo.execute(AbstractLiquibaseMojo.java:373) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208) ... 19 more Caused by: liquibase.exception.LiquibaseException: liquibase.command.CommandExecutionException: liquibase.exception.UnexpectedLiquibaseException: java.sql.SQLException: Invalid argument(s) in call: setFetchSize at liquibase.integration.commandline.CommandLineUtils.doGenerateChangeLog(CommandLineUtils.java:140) at liquibase.integration.commandline.CommandLineUtils.doGenerateChangeLog(CommandLineUtils.java:114) at org.liquibase.maven.plugins.LiquibaseGenerateChangeLogMojo.performLiquibaseTask(LiquibaseGenerateChangeLogMojo.java:85) at org.liquibase.maven.plugins.AbstractLiquibaseMojo.execute(AbstractLiquibaseMojo.java:369) ... 21 more Caused by: liquibase.command.CommandExecutionException: liquibase.exception.UnexpectedLiquibaseException: java.sql.SQLException: Invalid argument(s) in call: setFetchSize at liquibase.command.AbstractCommand.execute(AbstractCommand.java:13) at liquibase.integration.commandline.CommandLineUtils.doGenerateChangeLog(CommandLineUtils.java:138) ... 24 more Caused by: liquibase.exception.UnexpectedLiquibaseException: java.sql.SQLException: Invalid argument(s) in call: setFetchSize at liquibase.diff.output.changelog.core.MissingDataExternalFileChangeGenerator.fixMissing(MissingDataExternalFileChangeGenerator.java:155) at liquibase.diff.output.changelog.ChangeGeneratorChain.fixMissing(ChangeGeneratorChain.java:44) at liquibase.diff.output.changelog.ChangeGeneratorFactory.fixMissing(ChangeGeneratorFactory.java:99) at liquibase.diff.output.changelog.DiffToChangeLog.generateChangeSets(DiffToChangeLog.java:145) at liquibase.diff.output.changelog.DiffToChangeLog.print(DiffToChangeLog.java:125) at liquibase.diff.output.changelog.DiffToChangeLog.print(DiffToChangeLog.java:81) at liquibase.diff.output.changelog.DiffToChangeLog.print(DiffToChangeLog.java:64) at liquibase.command.GenerateChangeLogCommand.run(GenerateChangeLogCommand.java:54) at liquibase.command.AbstractCommand.execute(AbstractCommand.java:8) ... 25 more Caused by: java.sql.SQLException: Invalid argument(s) in call: setFetchSize at oracle.jdbc.driver.OracleStatement.setPrefetchInternal(OracleStatement.java:2854) at oracle.jdbc.driver.OracleStatement.setFetchSize(OracleStatement.java:4122) at oracle.jdbc.driver.OracleStatementWrapper.setFetchSize(OracleStatementWrapper.java:232) at liquibase.diff.output.changelog.core.MissingDataExternalFileChangeGenerator.fixMissing(MissingDataExternalFileChangeGenerator.java:63) ... 33 more The reason is that in MissingDataExternalFileChangGenerator lines 62 and following you do: if (!(referenceDatabase instanceof PostgresDatabase)) { stmt.setFetchSize(Integer.MIN_VALUE); } And thus try to set fetchSize to a negative value. Which apparently doesn't work with the ojdbc6 driver. I'm using ojdbc6 version 11.2.0.2.0. Cheers, Thomas

    JIRA | 2 years ago | Thomas Becker
    org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.liquibase:liquibase-maven-plugin:3.3.0:generateChangeLog (default-cli) on project logiq-persistence: Error setting up or running Liquibase: liquibase.command.CommandExecutionException: liquibase.exception.UnexpectedLiquibaseException: java.sql.SQLException: Invalid argument(s) in call: setFetchSize
  3. 0

    GitHub comment 221#187683526

    GitHub | 9 months ago | BuZZ-dEE
    java.sql.SQLException: Geschlossene Anweisung
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Weblogic 12.1.3 JDBC driver

    Oracle Community | 2 years ago | ArashJ
    oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation. Statement: rollback
  6. 0

    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. java.sql.SQLException

      Invalid argument(s) in call: setFetchSize

      at oracle.jdbc.driver.OracleStatement.setPrefetchInternal()
    2. Oracle jdbc
      OracleStatementWrapper.setFetchSize
      1. oracle.jdbc.driver.OracleStatement.setPrefetchInternal(OracleStatement.java:2854)
      2. oracle.jdbc.driver.OracleStatement.setFetchSize(OracleStatement.java:4122)
      3. oracle.jdbc.driver.OracleStatementWrapper.setFetchSize(OracleStatementWrapper.java:232)
      3 frames
    3. Liquibase Core
      CommandLineUtils.doGenerateChangeLog
      1. liquibase.diff.output.changelog.core.MissingDataExternalFileChangeGenerator.fixMissing(MissingDataExternalFileChangeGenerator.java:63)
      2. liquibase.diff.output.changelog.ChangeGeneratorChain.fixMissing(ChangeGeneratorChain.java:44)
      3. liquibase.diff.output.changelog.ChangeGeneratorFactory.fixMissing(ChangeGeneratorFactory.java:99)
      4. liquibase.diff.output.changelog.DiffToChangeLog.generateChangeSets(DiffToChangeLog.java:145)
      5. liquibase.diff.output.changelog.DiffToChangeLog.print(DiffToChangeLog.java:125)
      6. liquibase.diff.output.changelog.DiffToChangeLog.print(DiffToChangeLog.java:81)
      7. liquibase.diff.output.changelog.DiffToChangeLog.print(DiffToChangeLog.java:64)
      8. liquibase.command.GenerateChangeLogCommand.run(GenerateChangeLogCommand.java:54)
      9. liquibase.command.AbstractCommand.execute(AbstractCommand.java:8)
      10. liquibase.integration.commandline.CommandLineUtils.doGenerateChangeLog(CommandLineUtils.java:138)
      11. liquibase.integration.commandline.CommandLineUtils.doGenerateChangeLog(CommandLineUtils.java:114)
      11 frames
    4. org.liquibase.maven
      AbstractLiquibaseMojo.execute
      1. org.liquibase.maven.plugins.LiquibaseGenerateChangeLogMojo.performLiquibaseTask(LiquibaseGenerateChangeLogMojo.java:85)
      2. org.liquibase.maven.plugins.AbstractLiquibaseMojo.execute(AbstractLiquibaseMojo.java:369)
      2 frames
    5. Maven Plugin
      DefaultBuildPluginManager.executeMojo
      1. org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
      1 frame
    6. Maven Core
      DefaultMaven.execute
      1. org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
      2. org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
      3. org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
      4. org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
      5. org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
      6. org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
      7. org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
      8. org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:317)
      9. org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152)
      9 frames
    7. M3 Interceptor
      MavenCli.main
      1. org.apache.maven.cli.MavenCli.execute(MavenCli.java:555)
      2. org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
      3. org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
      3 frames
    8. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      4. java.lang.reflect.Method.invoke(Method.java:483)
      4 frames
    9. Plexus
      Launcher.main
      1. org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
      2. org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
      3. org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
      4. org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
      4 frames