Версия 4.0

slevinkelevra6 years ago

При использовании PostgreSQL Liquibase выдаёт ошибку во время наката миграции:

INFO|20326/0|Service traccar|18-08-06 07:40:48|[main] ERROR liquibase.changelog.ChangeSet - Change Set changelog-4.0::changelog-4.0::author failed.  Error: ERROR: operator does not exist: boolean = integer
INFO|20326/0|Service traccar|18-08-06 07:40:48|  Hint: No operator matches the given name and argument type(s). You might need to add explicit type casts.
INFO|20326/0|Service traccar|18-08-06 07:40:48|  Position: 76 [Failed SQL: UPDATE public.tc_notifications SET notificators = 'web,mail,sms' WHERE web = 1 AND mail = 1 AND sms = 1]
INFO|20326/0|Service traccar|18-08-06 07:40:48|[main] INFO liquibase.lockservice.StandardLockService - Successfully released change log lock
INFO|20326/0|Service traccar|18-08-06 07:40:48|java.lang.reflect.InvocationTargetException
INFO|20326/0|Service traccar|18-08-06 07:40:48| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
INFO|20326/0|Service traccar|18-08-06 07:40:48| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
INFO|20326/0|Service traccar|18-08-06 07:40:48| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
INFO|20326/0|Service traccar|18-08-06 07:40:48| at java.lang.reflect.Method.invoke(Method.java:498)
INFO|20326/0|Service traccar|18-08-06 07:40:48| at org.rzo.yajsw.app.WrapperJVMMain.executeMain(WrapperJVMMain.java:60)
INFO|20326/0|Service traccar|18-08-06 07:40:48| at org.rzo.yajsw.app.WrapperJVMMain.main(WrapperJVMMain.java:43)
INFO|20326/0|Service traccar|18-08-06 07:40:48|Caused by: liquibase.exception.MigrationFailedException: Migration failed for change set changelog-4.0::changelog-4.0::author:
INFO|20326/0|Service traccar|18-08-06 07:40:48|     Reason: liquibase.exception.DatabaseException: ERROR: operator does not exist: boolean = integer
INFO|20326/0|Service traccar|18-08-06 07:40:48|  Hint: No operator matches the given name and argument type(s). You might need to add explicit type casts.
INFO|20326/0|Service traccar|18-08-06 07:40:48|  Position: 76 [Failed SQL: UPDATE public.tc_notifications SET notificators = 'web,mail,sms' WHERE web = 1 AND mail = 1 AND sms = 1]
INFO|20326/0|Service traccar|18-08-06 07:40:48| at liquibase.changelog.ChangeSet.execute(ChangeSet.java:637)
INFO|20326/0|Service traccar|18-08-06 07:40:48| at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:53)
INFO|20326/0|Service traccar|18-08-06 07:40:48| at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:78)
INFO|20326/0|Service traccar|18-08-06 07:40:48| at liquibase.Liquibase.update(Liquibase.java:202)
INFO|20326/0|Service traccar|18-08-06 07:40:48| at liquibase.Liquibase.update(Liquibase.java:179)
INFO|20326/0|Service traccar|18-08-06 07:40:48| at liquibase.Liquibase.update(Liquibase.java:175)
INFO|20326/0|Service traccar|18-08-06 07:40:48| at org.traccar.database.DataManager.initDatabaseSchema(DataManager.java:307)
INFO|20326/0|Service traccar|18-08-06 07:40:48| at org.traccar.database.DataManager.<init>(DataManager.java:88)
INFO|20326/0|Service traccar|18-08-06 07:40:48| at org.traccar.Context.init(Context.java:361)
INFO|20326/0|Service traccar|18-08-06 07:40:48| at org.traccar.Main.main(Main.java:35)
INFO|20326/0|Service traccar|18-08-06 07:40:48| ... 6 more
INFO|20326/0|Service traccar|18-08-06 07:40:48|Caused by: liquibase.exception.DatabaseException: ERROR: operator does not exist: boolean = integer
INFO|20326/0|Service traccar|18-08-06 07:40:48|  Hint: No operator matches the given name and argument type(s). You might need to add explicit type casts.
INFO|20326/0|Service traccar|18-08-06 07:40:48|  Position: 76 [Failed SQL: UPDATE public.tc_notifications SET notificators = 'web,mail,sms' WHERE web = 1 AND mail = 1 AND sms = 1]
INFO|20326/0|Service traccar|18-08-06 07:40:48| at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:356)
INFO|20326/0|Service traccar|18-08-06 07:40:48| at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:57)
INFO|20326/0|Service traccar|18-08-06 07:40:48| at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:125)
INFO|20326/0|Service traccar|18-08-06 07:40:48| at liquibase.database.AbstractJdbcDatabase.execute(AbstractJdbcDatabase.java:1229)
INFO|20326/0|Service traccar|18-08-06 07:40:48| at liquibase.database.AbstractJdbcDatabase.executeStatements(AbstractJdbcDatabase.java:1211)
INFO|20326/0|Service traccar|18-08-06 07:40:48| at liquibase.changelog.ChangeSet.execute(ChangeSet.java:600)
INFO|20326/0|Service traccar|18-08-06 07:40:48| ... 15 more
INFO|20326/0|Service traccar|18-08-06 07:40:48|Caused by: org.postgresql.util.PSQLException: ERROR: operator does not exist: boolean = integer
INFO|20326/0|Service traccar|18-08-06 07:40:48|  Hint: No operator matches the given name and argument type(s). You might need to add explicit type casts.
INFO|20326/0|Service traccar|18-08-06 07:40:48|  Position: 76
INFO|20326/0|Service traccar|18-08-06 07:40:48| at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2440)
INFO|20326/0|Service traccar|18-08-06 07:40:48| at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2183)
INFO|20326/0|Service traccar|18-08-06 07:40:48| at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:308)
INFO|20326/0|Service traccar|18-08-06 07:40:48| at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:441)
INFO|20326/0|Service traccar|18-08-06 07:40:48| at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:365)
INFO|20326/0|Service traccar|18-08-06 07:40:48| at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:307)
INFO|20326/0|Service traccar|18-08-06 07:40:48| at org.postgresql.jdbc.PgStatement.executeCachedSql(PgStatement.java:293)
INFO|20326/0|Service traccar|18-08-06 07:40:48| at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:270)
INFO|20326/0|Service traccar|18-08-06 07:40:48| at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:266)
INFO|20326/0|Service traccar|18-08-06 07:40:48| at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:352)
INFO|20326/0|Service traccar|18-08-06 07:40:48| ... 20 more
INFO|wrapper|Service traccar|18-08-06 07:40:48|waitpid 20326 59136
INFO|wrapper|Service traccar|18-08-06 07:40:48|exit code posix process: 59136 application(status/signal): 231/0
Anton Tananaev6 years ago

You can try to update WHERE clause in changelog file.

slevinkelevra6 years ago

Sure, I just decide report.

Leif Neland6 years ago

IB> Database H2 when updating how to save data?
AT> Copy the database files to the new version. You do not need to do anything else.
IB> Error logging in https://yadi.sk/i/HIOWh3q53ZvSJx
AT>Means incorrectly updated.
IB> All by instruction
AT>Have you changed the default.xml?
IB>Not absolutely understood a question, but after updating I copied old default.xml
AT>And why did you copy it?
IB> there added
(...)
these are all changes
AT>Excellent. And now carefully read what is written in the main configuration file:

https://github.com/traccar/traccar/blob/master/setup/traccar.xml#L13
IB>I understand, thank you very much for your help! Works great!