|
发表于 2024-6-23 01:48:14
|
显示全部楼层
本帖最后由 d960124 于 2024-6-23 09:23 编辑
5.8版本,我安装之后,也是显示 404 - not found
在traccar.xml里面没有找到 web.path,,在default里面找到了,注释之后,报错了!Exception in thread "main" java.lang.RuntimeException: com.google.inject.ProvisionException: Unable to provision, see the following errors:
1) [Guice/ErrorInCustomProvider]: NullPointerException
at MainModule.provideWebServer(MainModule.java:190)
while locating WebServer
Learn more:
https://github.com/google/guice/wiki/ERROR_IN_CUSTOM_PROVIDER
1 error
======================
Full classname legend:
======================
MainModule: "org.traccar.MainModule"
WebServer: "org.traccar.web.WebServer"
========================
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 MainModule.provideWebServer(MainModule.java:190)
while locating WebServer
Learn more:
https://github.com/google/guice/wiki/ERROR_IN_CUSTOM_PROVIDER
1 error
======================
Full classname legend:
======================
MainModule: "org.traccar.MainModule"
WebServer: "org.traccar.web.WebServer"
========================
End of classname legend:
========================
at com.google.inject.internal.InternalProvisionException.toProvisionException(InternalProvisionException.java:251)
at com.google.inject.internal.InjectorImpl$1.get(InjectorImpl.java:1151)
at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1186)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)
at org.traccar.Main.run(Main.java:133)
... 1 more
Caused by: java.lang.NullPointerException
at java.base/java.io.File.<init>(File.java:278)
at org.traccar.web.WebServer.initWebApp(WebServer.java:145)
at org.traccar.web.WebServer.<init>(WebServer.java:97)
at org.traccar.MainModule.provideWebServer(MainModule.java:191)
at org.traccar.MainModule$$FastClassByGuice$$a388c.GUICE$TRAMPOLINE(<generated>)
at org.traccar.MainModule$$FastClassByGuice$$a388c.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.InjectorImpl$1.get(InjectorImpl.java:1148)
... 10 more
Database is up to date, no changesets to execute
UPDATE SUMMARY
Run: 0
Previously run: 43
Filtered out: 0
-------------------------------
Total change sets: 43
经过研究,发现404的原因是 conf目录中的另一个配置文件:default.xml 影响了:直接只读映射traccar.xml文件,而不映射conf目录:/opt/traccar/conf/traccar.xml,启动就使用正常了!!
楼主下一版本修复一下default.xml配置文件吧!
|
|