Skip to content

faq 240058374

Billy Charlton edited this page Sep 5, 2018 · 2 revisions

About the error running accessibilityexample

by cui yi on 2018-03-21 10:12:55


Hi All,

I have download the accessibility example,i including netwoek.xml and facilities.xml . And I copy the Siouxfalls2014 in the folder. When running the accessibility module, the error message is here .Any help would be deeply appreciated!

I used the command is here. But i can not sure whether that is right.

java –Xmx7500m -cp MATSim-0.9.0.jar;accessibility-0.9.0/accessibility-0.9.0.jar org.matsim.contrib.accessibility.run.RunAccessibilityExample D:\MATSim-0.9.0\matsim-0.9.0\accessibility\examples\RunAccessibilityExample\config.xml

thank you!

2018-03-21 17:50:37,790  INFO EventsManagerImpl:156
 Exception in thread "main" com.google.inject.CreationException: Unable to create injector, see the following errors:

 1) Error in custom provider, java.lang.NullPointerException
   at org.matsim.contrib.accessibility.AccessibilityModule.install(AccessibilityModule.java:81) (via modules: com.google.inject.util.Modules$CombinedModule -> com.google.inject.util.Modules$CombinedModule -> org.matsim.core.controler.AbstractModule$4 -> com.google.inject.util.Modules$OverrideModule -> org.matsim.core.controler.AbstractModule$4 -> com.google.inject.util.Modules$OverrideModule -> org.matsim.contrib.accessibility.AccessibilityModule)
   while locating org.matsim.core.controler.listener.ControlerListener annotated with @com.google.inject.multibindings.Element(setName=,uniqueId=85, type=MULTIBINDER, keyType=)
   at com.google.inject.util.Modules$OverrideModule.configure(Modules.java:198) (via modules: com.google.inject.util.Modules$CombinedModule -> com.google.inject.util.Modules$CombinedModule -> org.matsim.core.controler.AbstractModule$4 -> com.google.inject.util.Modules$OverrideModule -> org.matsim.core.controler.AbstractModule$4 -> com.google.inject.util.Modules$OverrideModule -> org.matsim.contrib.accessibility.AccessibilityModule -> com.google.inject.multibindings.Multibinder$RealMultibinder)
   while locating java.util.Set<org.matsim.core.controler.listener.ControlerListener>
     for the 13th parameter of org.matsim.core.controler.NewControler.<init>(NewControler.java:59)
   while locating org.matsim.core.controler.NewControler
   at org.matsim.core.controler.NewControlerModule.install(NewControlerModule.java:8) (via modules: com.google.inject.util.Modules$CombinedModule -> com.google.inject.util.Modules$CombinedModule -> org.matsim.core.controler.AbstractModule$4 -> com.google.inject.util.Modules$OverrideModule -> org.matsim.core.controler.Controler$1 -> org.matsim.core.controler.NewControlerModule)
   while locating org.matsim.core.controler.ControlerI

 1 error
         at com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:470)
         at com.google.inject.internal.InternalInjectorCreator.injectDynamically(InternalInjectorCreator.java:184)
         at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:110)
         at com.google.inject.internal.InjectorImpl.createChildInjector(InjectorImpl.java:232)
         at com.google.inject.internal.InjectorImpl.createChildInjector(InjectorImpl.java:236)
         at org.matsim.core.controler.Injector.createInjector(Injector.java:72)
         at org.matsim.core.controler.Controler.run(Controler.java:192)
         at org.matsim.contrib.accessibility.run.RunAccessibilityExample.run(RunAccessibilityExample.java:81)
         at org.matsim.contrib.accessibility.run.RunAccessibilityExample.main(RunAccessibilityExample.java:63)
 Caused by: java.lang.NullPointerException
         at org.matsim.contrib.accessibility.AccessibilityModule$1.get(AccessibilityModule.java:97)

Comments: 1


Re: About the error running accessibilityexample

by Dominik Ziemke on 2018-03-22 14:42:11

Dear Cui Yi,

please see here and download the three files provided there. It is a config file (that contains all important configuration parameters for a simple accessibility computation), a network file and a facilities file (that contains some work facilities). Just put all three files in the same folder (the network and the facilities file are then referenced correctly by the config file) and try to run again.

You should get output under 'work/accessibilities.xml' with work accessibility values of four locations.

Let me know it you run into any other problems.

Dominik

Clone this wiki locally