Are you modifying the web app or the backend?
Ik have downloaded the traccar-master from github, the intention is to modify the web-app, I followed instructions from the "building from source" (https://www.traccar.org/build-in-intellij-idea/) page on this, as I understand, (please correct me if i'm wrong) I need to have the backend running in order to test new code...
You need to set "program arguments" to point to the config file.
hmm, that may indeed help, sorry for the ignorance....
ok, copied the default.xml and traccar.xml files from an existing (running) server and pointed the "Progam Arguments" to that location, initially 1 (self explanatory error) that ./logs/tracker-server.log did not exist, when comment out that line in the xml file, intellij returned with the same error "Finished with non-zero exit value"...
Why would you comment it out? You need to provide a valid config file, which requires logging configuration.
I believed the backend server would also run without logging, but appearantly not... oops...thanks for that.
Manually copied the log from an existing server running traccar, starts to progress now, but the next error:
Caused by: com.google.inject.ProvisionException: Unable to provision, see the following errors:
java.lang.NullPointerException
does this have to do with the JRE setting, I don't have 1.8 so I have it on default in the configuration (Main)
Below a screen shot of the current "Configuration"
Your great help, as always is highly appreciated.
You still have some configuration issue most likely.
I am getting similar error in intellij idea and netbeans programs. It is not compiled in any way.
Execution failed for task ':compileJava'.
> invalid source release: 11
* Try:
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':compileJava'.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.lambda$executeIfValid$1(ExecuteActionsTaskExecuter.java:142)
at org.gradle.internal.Try$Failure.ifSuccessfulOrElse(Try.java:282)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid(ExecuteActionsTaskExecuter.java:140)
...
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
Radar, please don't duplicate your questions.
Any thoughts as what could be the issue. I tried running it with both local Mysql instance, with H2 database(local) and various other config setups... but sofar no luck....
Cris, what is the full error message you're getting?
Exception in thread "main" java.lang.RuntimeException: com.google.inject.ProvisionException: Unable to provision, see the following errors:
1) [Guice/ErrorInCustomProvider]: NullPointerException
at DatabaseModule.provideDataSource(DatabaseModule.java:46)
at DatabaseStorage.<init>(DatabaseStorage.java:48)
\_ for 2nd parameter
while locating DatabaseStorage
at MainModule.configure(MainModule.java:109)
while locating Storage
Learn more:
https://github.com/google/guice/wiki/ERROR_IN_CUSTOM_PROVIDER
1 error
======================
Full classname legend:
======================
DatabaseModule: "org.traccar.storage.DatabaseModule"
DatabaseStorage: "org.traccar.storage.DatabaseStorage"
MainModule: "org.traccar.MainModule"
Storage: "org.traccar.storage.Storage"
========================
End of classname legend:
========================
at org.traccar.Main.run(Main.java:154)
at org.traccar.Main.main(Main.java:114)
Caused by: com.google.inject.ProvisionException: Unable to provision, see the following errors:
1) [Guice/ErrorInCustomProvider]: NullPointerException
at DatabaseModule.provideDataSource(DatabaseModule.java:46)
at DatabaseStorage.<init>(DatabaseStorage.java:48)
\_ for 2nd parameter
while locating DatabaseStorage
at MainModule.configure(MainModule.java:109)
while locating Storage
Learn more:
https://github.com/google/guice/wiki/ERROR_IN_CUSTOM_PROVIDER
1 error
======================
Full classname legend:
Caused by: com.google.inject.ProvisionException: Unable to provision, see the following errors:
======================
DatabaseModule: "org.traccar.storage.DatabaseModule"
DatabaseStorage: "org.traccar.storage.DatabaseStorage"
MainModule: "org.traccar.MainModule"
Storage: "org.traccar.storage.Storage"
========================
End of classname legend:
========================
at com.google.inject.internal.InternalProvisionException.toProvisionException(InternalProvisionException.java:251)
at com.google.inject.internal.InjectorImpl$1.get(InjectorImpl.java:1104)
at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1139)
at org.traccar.Main.run(Main.java:126)
... 1 more
Caused by: java.lang.NullPointerException
at java.base/java.util.concurrent.ConcurrentHashMap.putVal(ConcurrentHashMap.java:1011)
at java.base/java.util.concurrent.ConcurrentHashMap.putIfAbsent(ConcurrentHashMap.java:1541)
at java.base/java.lang.ClassLoader.getClassLoadingLock(ClassLoader.java:667)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:651)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:639)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
at com.zaxxer.hikari.HikariConfig.attemptFromContextLoader(HikariConfig.java:967)
at com.zaxxer.hikari.HikariConfig.setDriverClassName(HikariConfig.java:477)
at org.traccar.storage.DatabaseModule.provideDataSource(DatabaseModule.java:67)
Caused by: java.lang.NullPointerException
at org.traccar.storage.DatabaseModule$$FastClassByGuice$$2037865.GUICE$TRAMPOLINE(<generated>)
at org.traccar.storage.DatabaseModule$$FastClassByGuice$$2037865.apply(<generated>)
at com.google.inject.internal.ProviderMethod$FastClassProviderMethod.doProvision(ProviderMethod.java:260)
at com.google.inject.internal.ProviderMethod.doProvision(ProviderMethod.java:171)
at com.google.inject.internal.InternalProviderInstanceBindingImpl$CyclicFactory.provision(InternalProviderInstanceBindingImpl.java:185)
at com.google.inject.internal.InternalProviderInstanceBindingImpl$CyclicFactory.get(InternalProviderInstanceBindingImpl.java:162)
at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:169)
at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:45)
at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:40)
at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:60)
at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:113)
at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:91)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:300)
at com.google.inject.internal.FactoryProxy.get(FactoryProxy.java:60)
at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:169)
at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:45)
at com.google.inject.internal.InjectorImpl$1.get(InjectorImpl.java:1101)
... 3 more
Not sure if this is all you need?
The error seems to indicate that you have not specified the config file at all.
It would indeed seem so, however, from earlier picture there is a specification in the Run/Debug Configurations.
Below is the file location:
default.xml is the standard default that comes with any instalation.
traccar.xml's contents shown below:
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE properties SYSTEM 'http://java.sun.com/dtd/properties.dtd'>
<properties>
<entry key='config.default'>./conf/default.xml</entry>
...
<!--
<entry key='database.driver'>com.mysql.cj.jdbc.Driver</entry>
<entry key='database.url'>jdbc:mysql://localhost:3306/tbuild?serverTimezone=UTC&allowPublicKeyRetrieval=true&useSSL=false&allowMultiQueries=true&autoReconnect=true&useUnicode=yes&characterEncoding=UTF-8&sessionVariables=sql_mode=''</entry>
<entry key='database.user'>traccar</entry>
<entry key='database.password'>Pa55word</entry>
-->
<entry key='database.driver'>org.h2.Driver</entry>
<entry key='database.url'>jdbc:h2:~/test</entry>
<entry key='database.user'>sa</entry>
<entry key='web.port'>7072</entry>
<entry key='database.password'></entry>
</properties>
Obviously the MYSQL password is not the real password....
As you can see I tried running it with Mysql (Local) as well as H2, and also on a different port (8082 & 80 also did not work)
Firewall is open on both 7072 & 8082.
Hi,
I am trying to make some modifications to traccar 5.5 to include some more overlay layer, but having trouble building the project in Intellij.
Error message:
Here's the output log when ran with the --debug option:
When I run it with --scan option it stalls after 5-6 hours....
What could be the reason ?