Я случайно получаю следующую ошибку, когда синхронизирую c БД Informix с Liquibase:
2020-03-16 14:48:26 INFO (Log4jLogger.java:36) - Error getting connection schema
liquibase.exception.DatabaseException: Expected single row from select username from sysmaster:informix.syssessions where sid = dbinfo('sessionid') but got 0
at liquibase.executor.jvm.JdbcExecutor.queryForObject(JdbcExecutor.java:146) ~[liquibase-core-3.5.5.jar:?]
at liquibase.executor.jvm.JdbcExecutor.queryForObject(JdbcExecutor.java:157) ~[liquibase-core-3.5.5.jar:?]
at liquibase.executor.jvm.JdbcExecutor.queryForObject(JdbcExecutor.java:152) ~[liquibase-core-3.5.5.jar:?]
at liquibase.database.core.InformixDatabase.getConnectionSchemaName(InformixDatabase.java:237) [liquibase-core-3.5.5.jar:?]
at liquibase.database.AbstractJdbcDatabase.getDefaultSchemaName(AbstractJdbcDatabase.java:305) [liquibase-core-3.5.5.jar:?]
at liquibase.changelog.ChangeLogParameters.<init>(ChangeLogParameters.java:54) [liquibase-core-3.5.5.jar:?]
at liquibase.Liquibase.<init>(Liquibase.java:104) [liquibase-core-3.5.5.jar:?]
... 11 more
Caused by: liquibase.exception.DatabaseException: Empty result set, expected one row
at liquibase.util.JdbcUtils.requiredSingleResult(JdbcUtils.java:141) ~[liquibase-core-3.5.5.jar:?]
at liquibase.executor.jvm.JdbcExecutor.queryForObject(JdbcExecutor.java:144) ~[liquibase-core-3.5.5.jar:?]
... 18 more
2020-03-16 14:48:26 INFO (Log4jLogger.java:36) - Error getting connection schema
liquibase.exception.DatabaseException: Expected single row from select username from sysmaster:informix.syssessions where sid = dbinfo('sessionid') but got 0
at liquibase.executor.jvm.JdbcExecutor.queryForObject(JdbcExecutor.java:146) ~[liquibase-core-3.5.5.jar:?]
at liquibase.executor.jvm.JdbcExecutor.queryForObject(JdbcExecutor.java:157) ~[liquibase-core-3.5.5.jar:?]
at liquibase.executor.jvm.JdbcExecutor.queryForObject(JdbcExecutor.java:152) ~[liquibase-core-3.5.5.jar:?]
at liquibase.database.core.InformixDatabase.getConnectionSchemaName(InformixDatabase.java:237) [liquibase-core-3.5.5.jar:?]
at liquibase.database.AbstractJdbcDatabase.getDefaultSchemaName(AbstractJdbcDatabase.java:305) [liquibase-core-3.5.5.jar:?]
at liquibase.changelog.ChangeLogParameters.<init>(ChangeLogParameters.java:55) [liquibase-core-3.5.5.jar:?]
at liquibase.Liquibase.<init>(Liquibase.java:104) [liquibase-core-3.5.5.jar:?]
... 11 more
Caused by: liquibase.exception.DatabaseException: Empty result set, expected one row
at liquibase.util.JdbcUtils.requiredSingleResult(JdbcUtils.java:141) ~[liquibase-core-3.5.5.jar:?]
at liquibase.executor.jvm.JdbcExecutor.queryForObject(JdbcExecutor.java:144) ~[liquibase-core-3.5.5.jar:?]
... 18 more
Если я запускаю select, вызывающий ошибку, я всегда получаю соответствующую единственную строку с Пользователь БД. Как уже говорилось, ошибка появляется случайно, обычно при первых попытках синхронизации c БД. Но после нескольких попыток это работает.
Есть идеи, почему это происходит?
Я использую Liquibase 3.5.5 и Informix 12.10.FC9W1.