Using old web interface on 3.1

bjarni8 years ago

in https://www.traccar.org/update-from-2-x-to-3-0/ it's described how to configure server if you want to use old web interface on 3.0. Is it also possible in 3.1?

I have tried to copy all tables from my old 2.11 database exept: application_settings, devices, positions, user_settings, users, users_devices.

Set web.old to true and Specify full path the WAR file in web.application

Do I need a new WAR file (I only have the one from 2.11). Where do I get a new one?

I get this error in my wrapper log file:

WARN   | wrapper  | 2015/09/30 10:49:42 | The version of the script (3.5.25) doesn't match the version of this Wrapper (3.5.26). This might cause some problems
STATUS | wrapper  | 2015/09/30 10:49:42 | --> Wrapper Started as Daemon
STATUS | wrapper  | 2015/09/30 10:49:42 | Java Service Wrapper Community Edition 32-bit 3.5.26
STATUS | wrapper  | 2015/09/30 10:49:42 |   Copyright (C) 1999-2014 Tanuki Software, Ltd. All Rights Reserved.
STATUS | wrapper  | 2015/09/30 10:49:42 |     http://wrapper.tanukisoftware.com
STATUS | wrapper  | 2015/09/30 10:49:42 | 
STATUS | wrapper  | 2015/09/30 10:49:43 | Launching a JVM...
INFO   | jvm 1    | 2015/09/30 10:49:43 | WrapperManager: Initializing...
INFO   | jvm 1    | 2015/09/30 10:49:46 | [MLog-Init-Reporter] INFO com.mchange.v2.log.MLog - MLog clients using slf4j logging.
INFO   | jvm 1    | 2015/09/30 10:49:47 | [WrapperSimpleAppMain] INFO com.mchange.v2.c3p0.C3P0Registry - Initializing c3p0-0.9.5.1 [built 16-June-2015 00:06:36 -0700; debug? true; trace: 10]
INFO   | jvm 1    | 2015/09/30 10:49:47 | [WrapperSimpleAppMain] INFO com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource - Initializing c3p0 pool... com.mchange.v2.c3p0.ComboPooledDataSource [ acquireIncrement -> 3, acquireRetryAttempts -> 30, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> false, checkoutTimeout -> 0, connectionCustomizerClassName -> null, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, contextClassLoaderSource -> caller, dataSourceName -> 1hge16u9c863lunl8tmdh|ad8942, debugUnreturnedConnectionStackTraces -> false, description -> null, driverClass -> com.mysql.jdbc.Driver, extensions -> {}, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, forceSynchronousCheckins -> false, forceUseNamedDriverClass -> false, identityToken -> 1hge16u9c863lunl8tmdh|ad8942, idleConnectionTestPeriod -> 600, initialPoolSize -> 3, jdbcUrl -> jdbc:mysql://127.0.0.1:3306/traccar?allowMultiQueries=true&autoReconnect=true&useUnicode=yes&characterEncoding=UTF-8&sessionVariables=sql_mode=ANSI_QUOTES, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 0, maxIdleTimeExcessConnections -> 0, maxPoolSize -> 15, maxStatements -> 0, maxStatementsPerConnection -> 0, minPoolSize -> 3, numHelperThreads -> 3, preferredTestQuery -> null, privilegeSpawnedThreads -> false, properties -> {user=******, password=******}, propertyCycle -> 0, statementCacheNumDeferredCloseThreads -> 0, testConnectionOnCheckin -> true, testConnectionOnCheckout -> false, unreturnedConnectionTimeout -> 0, userOverrides -> {}, usesTraditionalReflectiveProxies -> false ]
INFO   | jvm 1    | 2015/09/30 10:49:55 | [WrapperSimpleAppMain] INFO org.eclipse.jetty.util.log - Logging initialized @12003ms
INFO   | jvm 1    | 2015/09/30 10:49:56 | [WrapperSimpleAppMain] WARN org.eclipse.jetty.server.handler.ResourceHandler - java.lang.NullPointerException
INFO   | jvm 1    | 2015/09/30 10:49:56 | WrapperSimpleApp: 
INFO   | jvm 1    | 2015/09/30 10:49:56 | WrapperSimpleApp Error: Encountered an error running main:
INFO   | jvm 1    | 2015/09/30 10:49:56 | WrapperSimpleApp Error: java.lang.IllegalArgumentException
INFO   | jvm 1    | 2015/09/30 10:49:56 | WrapperSimpleApp Error: 	at org.eclipse.jetty.server.handler.ResourceHandler.setResourceBase(ResourceHandler.java:233)
INFO   | jvm 1    | 2015/09/30 10:49:56 | WrapperSimpleApp Error: 	at org.traccar.web.WebServer.initWebApp(WebServer.java:77)
INFO   | jvm 1    | 2015/09/30 10:49:56 | WrapperSimpleApp Error: 	at org.traccar.web.WebServer.<init>(WebServer.java:62)
INFO   | jvm 1    | 2015/09/30 10:49:56 | WrapperSimpleApp Error: 	at org.traccar.Context.init(Context.java:148)
INFO   | jvm 1    | 2015/09/30 10:49:56 | WrapperSimpleApp Error: 	at org.traccar.Main.main(Main.java:26)
INFO   | jvm 1    | 2015/09/30 10:49:56 | WrapperSimpleApp Error: 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
INFO   | jvm 1    | 2015/09/30 10:49:56 | WrapperSimpleApp Error: 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
INFO   | jvm 1    | 2015/09/30 10:49:56 | WrapperSimpleApp Error: 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
INFO   | jvm 1    | 2015/09/30 10:49:56 | WrapperSimpleApp Error: 	at java.lang.reflect.Method.invoke(Method.java:606)
INFO   | jvm 1    | 2015/09/30 10:49:56 | WrapperSimpleApp Error: 	at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:325)
INFO   | jvm 1    | 2015/09/30 10:49:56 | WrapperSimpleApp Error: 	at java.lang.Thread.run(Thread.java:745)
STATUS | wrapper  | 2015/09/30 10:49:59 | <-- Wrapper Stopped
Anton Tananaev8 years ago

There is no new WAR file. New web interface is not bundled in a WAR file. It's a simple folder (see "web" folder).

If you want to continue using old web interface, you don't need to copy any tables. You need to copy data only if you want to migrate from old web interface to the new one.

bjarni8 years ago

What I did is:
I had an old 2.12 version which worked fine. I renamed it to ./traccar2_12 and also nenamed the database to keep a copy. Then I installed a clean 3.1 version which also runs fine.

I noticed that some of the features from the old web wasn't supported in the new one - so I gave it a try and copied the old WAR file to my new traccar folder and changed the conf file to use old web, but it didn't work.

Then I tried to copy all non exisiting tables from the old database to the new one - I thought the old WAR file needed some of these tables but still no luck.

I can't figure out what I'm missing and why I get this error in my wrapper log file.

Anton Tananaev8 years ago

Old WAR file creates all needed tables automatically.

What features are you missing from the old version?

As for the error, if you want to use old web interface you need to set "web.old" to "true" (also try to set "web.type" to "old"). Error is because server thinks that you want to use new web interface, but "web.path" required by new web interface is missing.

bjarni8 years ago

Setting "web.type" to "old" did the work. Now it's starting up:)

But I can't login with the accounts in "User" table. Has it something to do with the changing to hashed password? It has created a new table "Users" and uses this instead of "User". So now I got an admin account in two tables: "User" and "Users".

How do I get the old web to use the tables with names that does not have "s" in the end: "User", "Device", "Position"? Or is it the other way around - will the server now use the "old" tables ex. "Positions" when inserting data from devices?

The features that i'm missing in the new WEB:

  • Sharing devices between users (I do it manualy by inserting records in user_device)
  • Support for more map providers (google map)
  • Geofences
Anton Tananaev8 years ago

Looks like you are not using official Traccar release because "web.type" is not in release yet.

If you are using old web interface, you should keep using old database structure and queries as well.

As for features, you said you were missing something from the old version. From 3 features only Google Maps is the one that was in old web interface and missing from the new one. Sharing devices is planned for next release. There might be a hacky way to use Google Maps with next release as well as it will support custom map tiles. Geofences is in plans as well, but it's more long term plan.

bjarni8 years ago

I'm using the new server build for FlexTrack which you provided for me this morning:) By the way I can not test it before I get home later to day because I need to reconfigure the device to point to my own server.

I'm looking forward to getting these features in the new web soon - I think I'll stick to the new web before I get it all mixed up.