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.

FIrebird chokes on the first insert statement into databasechangelog table

See original GitHub issue

Environment

Firebird container built using: https://github.com/jacobalberty/firebird-docker v. 3.0.6

Liquibase Version: 4.0.0

Liquibase Integration & Version: <Pick one: CLI, maven, gradle, spring boot, servlet, etc.> CLI

Liquibase Extension(s) & Version:

Database Vendor & Version: Firebird 3.0.6

Operating System Type & Version: Mac for local system Docker container for db

Description

Liquibase is attempting to do an update but chokes right away on inserting a row into DATABASECHANGELOGLOCK

Steps To Reproduce

  • Create a firebird container, I used the following commands – docker pull jacobalberty/firebird – docker run --name pd13 -e ISC_PASSWORD=datical -e FIREBIRD_DATABASE=testdb -e FIREBIRD_USER=datical -e FIREBIRD_PASSWORD=datical -p 3050:3050 jacobalberty/firebird
  • Create a liquibase.properties file (like the one below)
  • Create dbchangelog.sql
  • Run liquibase update

liquibase.properties

changeLogFile: dbchangelog.sql url: jdbc:firebirdsql://localhost:3050//firebird/data/testdb username: datical password: datical driver: org.firebirdsql.jdbc.FBDriver classpath: …/drivers/jaybird-full-3.0.6.jar logLevel: DEBUG

dbchagelog.sql

-liquibase formatted sql –changeset bob:1 CREATE TABLE “DEPARTMENT” (“ID” INTEGER, “NAME” STRING, “ACTIVE” BOOLEAN);

Actual Behavior

You get the following error: [2020-08-10 20:16:03] FINE [org.firebirdsql.logging.JulLogger debug] readStatusVector arg:isc_arg_gds int: 0 Unexpected error running Liquibase: conversion error from string "0" [SQLState:22018, ISC error code:335544334] [Failed SQL: (335544334) INSERT INTO DATABASECHANGELOGLOCK (ID, LOCKED) VALUES (1, 0)] For more information, please use the --logLevel flag [2020-08-10 20:16:03] SEVERE [liquibase.integration] Unexpected error running Liquibase: conversion error from string "0" [SQLState:22018, ISC error code:335544334] [Failed SQL: (335544334) INSERT INTO DATABASECHANGELOGLOCK (ID, LOCKED) VALUES (1, 0)] liquibase.exception.LockException: liquibase.exception.DatabaseException: conversion error from string "0" [SQLState:22018, ISC error code:335544334] [Failed SQL: (335544334) INSERT INTO DATABASECHANGELOGLOCK (ID, LOCKED) VALUES (1, 0)] at liquibase.lockservice.StandardLockService.acquireLock(StandardLockService.java:294) at liquibase.lockservice.StandardLockService.waitForLock(StandardLockService.java:212) at liquibase.Liquibase$1.run(Liquibase.java:188) at liquibase.Scope.lambda$child$0(Scope.java:159) at liquibase.Scope.child(Scope.java:170) at liquibase.Scope.child(Scope.java:158) at liquibase.Scope.child(Scope.java:137) at liquibase.Liquibase.runInScope(Liquibase.java:1790) at liquibase.Liquibase.update(Liquibase.java:183) at liquibase.Liquibase.update(Liquibase.java:179) at liquibase.integration.commandline.Main.doMigration(Main.java:1543) at liquibase.integration.commandline.Main$1.lambda$run$0(Main.java:316) at liquibase.Scope.lambda$child$0(Scope.java:159) at liquibase.Scope.child(Scope.java:170) at liquibase.Scope.child(Scope.java:158) at liquibase.Scope.child(Scope.java:137) at liquibase.Scope.child(Scope.java:183) at liquibase.Scope.child(Scope.java:187) at liquibase.integration.commandline.Main$1.run(Main.java:315) at liquibase.integration.commandline.Main$1.run(Main.java:166) at liquibase.Scope.child(Scope.java:170) at liquibase.Scope.child(Scope.java:144) at liquibase.integration.commandline.Main.run(Main.java:166) at liquibase.integration.commandline.Main.main(Main.java:145) Caused by: liquibase.exception.DatabaseException: conversion error from string "0" [SQLState:22018, ISC error code:335544334] [Failed SQL: (335544334) INSERT INTO DATABASECHANGELOGLOCK (ID, LOCKED) VALUES (1, 0)] at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:398) at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:82) at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:154) at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:134) at liquibase.lockservice.StandardLockService.init(StandardLockService.java:127) at liquibase.lockservice.StandardLockService.acquireLock(StandardLockService.java:251) ... 23 more Caused by: java.sql.SQLException: conversion error from string "0" [SQLState:22018, ISC error code:335544334] at org.firebirdsql.gds.ng.FbExceptionBuilder$Type$1.createSQLException(FbExceptionBuilder.java:532) at org.firebirdsql.gds.ng.FbExceptionBuilder.toFlatSQLException(FbExceptionBuilder.java:302) at org.firebirdsql.gds.ng.wire.AbstractWireOperations.readStatusVector(AbstractWireOperations.java:138) at org.firebirdsql.gds.ng.wire.AbstractWireOperations.processOperation(AbstractWireOperations.java:202) at org.firebirdsql.gds.ng.wire.AbstractWireOperations.readSingleResponse(AbstractWireOperations.java:169) at org.firebirdsql.gds.ng.wire.AbstractWireOperations.readResponse(AbstractWireOperations.java:153) at org.firebirdsql.gds.ng.wire.AbstractFbWireDatabase.readResponse(AbstractFbWireDatabase.java:183) at org.firebirdsql.gds.ng.wire.version10.V10Statement.execute(V10Statement.java:326) at org.firebirdsql.jdbc.FBStatement.internalExecute(FBStatement.java:1357) at org.firebirdsql.jdbc.FBStatement.executeImpl(FBStatement.java:840) at org.firebirdsql.jdbc.FBStatement.execute(FBStatement.java:826) at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:394) ... 28 more Caused by: org.firebirdsql.jdbc.FBSQLExceptionInfo: conversion error from string "0"

Expected/Desired Behavior

Update to complete, table to get created.

Screenshots (if appropriate)

If applicable, add screenshots to help explain your problem.

Additional Context

Maybe I didn’t create my database correctly with the right settings? I just used: create database testdb;

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
molivasdatcommented, Aug 11, 2020

Hi @ro-rah Thanks for taking the time to document the recreation steps and bringing this issue to our attention. I have reproduced the error and will add it to the list of issues we are processing.

0reactions
FBurguercommented, May 26, 2022

Hi there! Looks like it got fixed for 4.11. Things i did to be aware of:

  • Used the latest jacobalberty/firebird container version

  • Downloaded the connector-api-1.5.jar from Maven Central

  • I substituted string for varchar on the changelog (looks like firebird doesnt have string as a default datatype anymore?)

  • Added a - on the begining of the changelog (prob a Ctrl+C error from @ro-rah, but just in case i wanted to point it out)

If the issue persist, let me know

Testing Environment: OS: Windows 10 Liquibase Build: [Core: //master/2708/0a9d6d/2022-05-23 15:17+0000, Pro: master/1291/728a05/2022-05-19T14:28:39Z] Java 11.0.15

EDIT: It looks like it also works in a firebird 3.0.7 container too

Read more comments on GitHub >

github_iconTop Results From Across the Web

Conditioning++ - GitHub
FIrebird chokes on the first insert statement into databasechangelog table #1313 opened by ro-rah autocandidate DBFirebird hacktoberfest
Read more >
[Liquibase-user] Problem creating databasechangelog table ...
Hi all, I am trying to use Liquibase 1.1.1 on Firebird 1.5 using the Ant task. When I try to migrate the database...
Read more >
DATABASECHANGELOG table | Liquibase Docs
Column Standard data type Description ID VARCHAR(255) Value from the changeset id attribute. AUTHOR VARCHAR(255) Value from the changeset author attribute. COMMENTS VARCHAR(255) Value from the...
Read more >
Insert data in firebird database - Google Groups
Hello! I'm trying add data in my table. tables.py. db_xml.define_table('xml_files',. Field('F'),.
Read more >
Chapter 6: Data Manipulation Language (DML) - Firebird
Table expressions (as subqueries) can be used in INSERT, UPDATE and DELETE ... The presence of the RETURNING clause causes an INSERT statement...
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