Mysql config error

Nrusingh7 years ago

Hi I am facing problem in building traccar for mysql
I have followed the instruction given at
https://www.traccar.org/mysql/

Here is the error log:

INFO 4/28/18 11:45 AM: liquibase: ./schema/changelog-master.xml: changelog-3.16:
:changelog-3.16::author: ChangeSet changelog-3.16::changelog-3.16::author ran su
ccessfully in 20ms
SEVERE 4/28/18 11:45 AM: liquibase: ./schema/changelog-master.xml: changelog-3.1
7::changelog-3.3-admin::author: Change Set changelog-3.17::changelog-3.3-admin::
author failed.  Error: Column "ADMIN" not found; SQL statement:
ALTER TABLE PUBLIC.users ALTER COLUMN admin RENAME TO administrator [42122-196]
[Failed SQL: ALTER TABLE PUBLIC.users ALTER COLUMN admin RENAME TO administrator
]
INFO 4/28/18 11:45 AM: liquibase: changelog-3.17::changelog-3.3-admin::author: S
uccessfully released change log lock
Exception in thread "main" liquibase.exception.MigrationFailedException: Migrati
on failed for change set changelog-3.17::changelog-3.3-admin::author:
     Reason: liquibase.exception.DatabaseException: Column "ADMIN" not found; SQ
L statement:
ALTER TABLE PUBLIC.users ALTER COLUMN admin RENAME TO administrator [42122-196]
[Failed SQL: ALTER TABLE PUBLIC.users ALTER COLUMN admin RENAME TO administrator
]
        at liquibase.changelog.ChangeSet.execute(ChangeSet.java:619)
        at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:51
)
        at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:79)
        at liquibase.Liquibase.update(Liquibase.java:214)
        at liquibase.Liquibase.update(Liquibase.java:192)
        at liquibase.Liquibase.update(Liquibase.java:188)
        at org.traccar.database.DataManager.initDatabaseSchema(DataManager.java:
305)
        at org.traccar.database.DataManager.<init>(DataManager.java:88)
        at org.traccar.Context.init(Context.java:341)
        at org.traccar.Main.main(Main.java:35)
Caused by: liquibase.exception.DatabaseException: Column "ADMIN" not found; SQL
statement:
ALTER TABLE PUBLIC.users ALTER COLUMN admin RENAME TO administrator [42122-196]
[Failed SQL: ALTER TABLE PUBLIC.users ALTER COLUMN admin RENAME TO administrator
]
        at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStat
ement(JdbcExecutor.java:309)
        at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:55)
        at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:113)
        at liquibase.database.AbstractJdbcDatabase.execute(AbstractJdbcDatabase.
java:1277)
        at liquibase.database.AbstractJdbcDatabase.executeStatements(AbstractJdb
cDatabase.java:1259)
        at liquibase.changelog.ChangeSet.execute(ChangeSet.java:582)
        ... 9 more
Caused by: org.h2.jdbc.JdbcSQLException: Column "ADMIN" not found; SQL statement
:
ALTER TABLE PUBLIC.users ALTER COLUMN admin RENAME TO administrator [42122-196]
        at org.h2.message.DbException.getJdbcSQLException(DbException.java:345)
        at org.h2.message.DbException.get(DbException.java:179)
        at org.h2.message.DbException.get(DbException.java:155)
        at org.h2.table.Table.getColumn(Table.java:680)
        at org.h2.command.Parser.columnIfTableExists(Parser.java:5852)
        at org.h2.command.Parser.parseAlterTable(Parser.java:5748)
        at org.h2.command.Parser.parseAlter(Parser.java:5007)
        at org.h2.command.Parser.parsePrepared(Parser.java:348)
        at org.h2.command.Parser.parse(Parser.java:321)
        at org.h2.command.Parser.parse(Parser.java:293)
        at org.h2.command.Parser.prepareCommand(Parser.java:258)
        at org.h2.engine.Session.prepareLocal(Session.java:578)
        at org.h2.engine.Session.prepareCommand(Session.java:519)
        at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1204)
        at org.h2.jdbc.JdbcStatement.executeInternal(JdbcStatement.java:176)
        at org.h2.jdbc.JdbcStatement.execute(JdbcStatement.java:164)
        at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStat
ement(JdbcExecutor.java:307)
        ... 14 more
Anton Tananaev7 years ago

All I can say is that you shouldn't build from master branch unless you know what you are doing.

Nrusingh7 years ago

I followed the build steps from https://www.traccar.org/build/
and the build is success. Is it mysql version issue?

Anton Tananaev7 years ago

No, it's not. The problem that you are using master branch. If you are not expert then you should use last stable tag instead.

Nrusingh7 years ago

Ya you are right, I am not expert.
Please tell me how to use last stable tag

Anton Tananaev7 years ago

Download source code for last official release.

Nrusingh7 years ago

Currently I was trying with traccar 3.16
which version should I use to integrate with mysql 5.5

Nrusingh7 years ago

Now I am building 3.15, It seems working well, but after running at localhost:8082 it showing an message "404 - Not Found"
I think it is due to tracker-web directory was empty, then I downloaded traccar-web-master and put it inside tracker-web directory
Still I am getting the error message

Anton Tananaev7 years ago

Why are you downloading master again? You need to download corresponding web app version.