msmobility / mito

Microscopic Transportation Orchestrator
7 stars 13 forks source link

MITO startup problem (issue with geotools and jhdf5) #58

Closed RRothfeld closed 5 years ago

RRothfeld commented 5 years ago

Dear all,

I'm trying to run MITO on my local machine (Win 10) using Java 8 (JavaSe-1.8) and Eclipse (v4.9.0) as the IDE. I cloned the MITO repository (branch master_obuam) as well as the mitoMunich repository (branch uamData). I have imported the projects (into Eclipse) and updated Maven multiple times and made sure all dependencies are met.

After adjusting "C:...\mitoMunich\javaFiles\mito.properties" and setting the run environment of MITO accordingly, I get the following error messages:

log4j:WARN No such property [maxFileSize] in org.apache.log4j.FileAppender.
02-Jul-2019 16:17:57, INFO, Started the Microsimulation Transport Orchestrator (MITO)
02-Jul-2019 16:17:57, INFO,  Creating standalone version of MITO 
02-Jul-2019 16:17:57, INFO, ZonesReader: Read 4924 records.
02-Jul-2019 16:17:57, INFO, will try to read from C:\Users\raoul.rothfeld\Documents\GitHub\mitoMunich\input\trafficAssignment\zonesShapefile\zonesNew.shp
Jul 02, 2019 4:17:58 PM org.geotools.factory.FactoryRegistry scanForPlugins
WARNING: Can't load a service for category "MathTransformProvider". Cause is "ServiceConfigurationError: org.geotools.referencing.operation.MathTransformProvider: Provider org.geotools.referencing.operation.projection.LambertConformalEsriProvider could not be instantiated".
java.util.ServiceConfigurationError: org.geotools.referencing.operation.MathTransformProvider: Provider org.geotools.referencing.operation.projection.LambertConformalEsriProvider could not be instantiated
    at java.util.ServiceLoader.fail(ServiceLoader.java:232)
    at java.util.ServiceLoader.access$100(ServiceLoader.java:185)
    at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:384)
    at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404)
    at java.util.ServiceLoader$1.next(ServiceLoader.java:480)
    at org.geotools.factory.FactoryRegistry.register(FactoryRegistry.java:826)
    at org.geotools.factory.FactoryRegistry.scanForPlugins(FactoryRegistry.java:772)
    at org.geotools.factory.FactoryRegistry.scanForPluginsIfNeeded(FactoryRegistry.java:805)
    at org.geotools.factory.FactoryRegistry.getServiceProviders(FactoryRegistry.java:196)
    at org.geotools.referencing.operation.DefaultMathTransformFactory.getProvider(DefaultMathTransformFactory.java:282)
    at org.geotools.referencing.operation.DefaultMathTransformFactory.getDefaultParameters(DefaultMathTransformFactory.java:316)
    at org.geotools.referencing.wkt.Parser.parseProjection(Parser.java:603)
    at org.geotools.referencing.wkt.Parser.parseProjCS(Parser.java:917)
    at org.geotools.referencing.wkt.Parser.parseCoordinateReferenceSystem(Parser.java:225)
    at org.geotools.referencing.wkt.Parser.parseCoordinateReferenceSystem(Parser.java:204)
    at org.geotools.referencing.factory.ReferencingObjectFactory.createFromWKT(ReferencingObjectFactory.java:1090)
    at org.geotools.data.PrjFileReader.<init>(PrjFileReader.java:94)
    at org.geotools.data.PrjFileReader.<init>(PrjFileReader.java:68)
    at org.geotools.data.shapefile.ShapefileSetManager.openPrjReader(ShapefileSetManager.java:106)
    at org.geotools.data.shapefile.ShapefileFeatureSource.readAttributes(ShapefileFeatureSource.java:516)
    at org.geotools.data.shapefile.ShapefileFeatureSource.buildFeatureType(ShapefileFeatureSource.java:472)
    at org.geotools.data.shapefile.ShapefileFeatureStore.buildFeatureType(ShapefileFeatureStore.java:131)
    at org.geotools.data.store.ContentFeatureSource.getAbsoluteSchema(ContentFeatureSource.java:343)
    at org.geotools.data.store.ContentFeatureSource.getSchema(ContentFeatureSource.java:312)
    at org.geotools.data.store.ContentFeatureCollection.<init>(ContentFeatureCollection.java:80)
    at org.geotools.data.store.ContentFeatureSource.getFeatures(ContentFeatureSource.java:570)
    at org.geotools.data.store.ContentFeatureSource.getFeatures(ContentFeatureSource.java:112)
    at org.matsim.core.utils.gis.ShapeFileReader.getAllFeatures(ShapeFileReader.java:76)
    at de.tum.bgu.msm.io.input.readers.ZonesReader.mapFeaturesToZones(ZonesReader.java:33)
    at de.tum.bgu.msm.io.input.readers.ZonesReader.read(ZonesReader.java:29)
    at de.tum.bgu.msm.MitoModel.readStandAlone(MitoModel.java:78)
    at de.tum.bgu.msm.MitoModel.standAloneModel(MitoModel.java:51)
    at de.tum.bgu.msm.MitoMuc.main(MitoMuc.java:18)
Caused by: java.lang.NoSuchMethodError: org.geotools.referencing.operation.projection.LambertConformalEsriProvider.createOptionalDescriptor([Lorg/opengis/referencing/ReferenceIdentifier;DDLjavax/measure/Unit;)Lorg/opengis/parameter/ParameterDescriptor;
    at org.geotools.referencing.operation.projection.LambertConformalEsriProvider.<clinit>(LambertConformalEsriProvider.java:43)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at java.lang.Class.newInstance(Class.java:442)
    at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:380)
    ... 30 more

Jul 02, 2019 4:17:58 PM org.geotools.factory.FactoryRegistry scanForPlugins
WARNING: Can't load a service for category "MathTransformProvider". Cause is "ServiceConfigurationError: org.geotools.referencing.operation.MathTransformProvider: Provider org.geotools.referencing.operation.projection.GeostationarySatellite$Provider could not be instantiated".
java.util.ServiceConfigurationError: org.geotools.referencing.operation.MathTransformProvider: Provider org.geotools.referencing.operation.projection.GeostationarySatellite$Provider could not be instantiated
    at java.util.ServiceLoader.fail(ServiceLoader.java:232)
    at java.util.ServiceLoader.access$100(ServiceLoader.java:185)
    at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:384)
    at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404)
    at java.util.ServiceLoader$1.next(ServiceLoader.java:480)
    at org.geotools.factory.FactoryRegistry.register(FactoryRegistry.java:826)
    at org.geotools.factory.FactoryRegistry.scanForPlugins(FactoryRegistry.java:772)
    at org.geotools.factory.FactoryRegistry.scanForPluginsIfNeeded(FactoryRegistry.java:805)
    at org.geotools.factory.FactoryRegistry.getServiceProviders(FactoryRegistry.java:196)
    at org.geotools.referencing.operation.DefaultMathTransformFactory.getProvider(DefaultMathTransformFactory.java:282)
    at org.geotools.referencing.operation.DefaultMathTransformFactory.getDefaultParameters(DefaultMathTransformFactory.java:316)
    at org.geotools.referencing.wkt.Parser.parseProjection(Parser.java:603)
    at org.geotools.referencing.wkt.Parser.parseProjCS(Parser.java:917)
    at org.geotools.referencing.wkt.Parser.parseCoordinateReferenceSystem(Parser.java:225)
    at org.geotools.referencing.wkt.Parser.parseCoordinateReferenceSystem(Parser.java:204)
    at org.geotools.referencing.factory.ReferencingObjectFactory.createFromWKT(ReferencingObjectFactory.java:1090)
    at org.geotools.data.PrjFileReader.<init>(PrjFileReader.java:94)
    at org.geotools.data.PrjFileReader.<init>(PrjFileReader.java:68)
    at org.geotools.data.shapefile.ShapefileSetManager.openPrjReader(ShapefileSetManager.java:106)
    at org.geotools.data.shapefile.ShapefileFeatureSource.readAttributes(ShapefileFeatureSource.java:516)
    at org.geotools.data.shapefile.ShapefileFeatureSource.buildFeatureType(ShapefileFeatureSource.java:472)
    at org.geotools.data.shapefile.ShapefileFeatureStore.buildFeatureType(ShapefileFeatureStore.java:131)
    at org.geotools.data.store.ContentFeatureSource.getAbsoluteSchema(ContentFeatureSource.java:343)
    at org.geotools.data.store.ContentFeatureSource.getSchema(ContentFeatureSource.java:312)
    at org.geotools.data.store.ContentFeatureCollection.<init>(ContentFeatureCollection.java:80)
    at org.geotools.data.store.ContentFeatureSource.getFeatures(ContentFeatureSource.java:570)
    at org.geotools.data.store.ContentFeatureSource.getFeatures(ContentFeatureSource.java:112)
    at org.matsim.core.utils.gis.ShapeFileReader.getAllFeatures(ShapeFileReader.java:76)
    at de.tum.bgu.msm.io.input.readers.ZonesReader.mapFeaturesToZones(ZonesReader.java:33)
    at de.tum.bgu.msm.io.input.readers.ZonesReader.read(ZonesReader.java:29)
    at de.tum.bgu.msm.MitoModel.readStandAlone(MitoModel.java:78)
    at de.tum.bgu.msm.MitoModel.standAloneModel(MitoModel.java:51)
    at de.tum.bgu.msm.MitoMuc.main(MitoMuc.java:18)
Caused by: java.lang.NoSuchMethodError: org.geotools.referencing.operation.projection.GeostationarySatellite$Provider.createDescriptor([Lorg/opengis/referencing/ReferenceIdentifier;DDDLjavax/measure/Unit;)Lorg/opengis/parameter/ParameterDescriptor;
    at org.geotools.referencing.operation.projection.GeostationarySatellite$Provider.<clinit>(GeostationarySatellite.java:322)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at java.lang.Class.newInstance(Class.java:442)
    at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:380)
    ... 30 more

Jul 02, 2019 4:17:58 PM org.geotools.factory.FactoryRegistry scanForPlugins
WARNING: Can't load a service for category "MathTransformProvider". Cause is "ServiceConfigurationError: org.geotools.referencing.operation.MathTransformProvider: Provider org.geotools.referencing.operation.projection.AzimuthalEquidistant$Provider could not be instantiated".
java.util.ServiceConfigurationError: org.geotools.referencing.operation.MathTransformProvider: Provider org.geotools.referencing.operation.projection.AzimuthalEquidistant$Provider could not be instantiated
    at java.util.ServiceLoader.fail(ServiceLoader.java:232)
    at java.util.ServiceLoader.access$100(ServiceLoader.java:185)
    at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:384)
    at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404)
    at java.util.ServiceLoader$1.next(ServiceLoader.java:480)
    at org.geotools.factory.FactoryRegistry.register(FactoryRegistry.java:826)
    at org.geotools.factory.FactoryRegistry.scanForPlugins(FactoryRegistry.java:772)
    at org.geotools.factory.FactoryRegistry.scanForPluginsIfNeeded(FactoryRegistry.java:805)
    at org.geotools.factory.FactoryRegistry.getServiceProviders(FactoryRegistry.java:196)
    at org.geotools.referencing.operation.DefaultMathTransformFactory.getProvider(DefaultMathTransformFactory.java:282)
    at org.geotools.referencing.operation.DefaultMathTransformFactory.getDefaultParameters(DefaultMathTransformFactory.java:316)
    at org.geotools.referencing.wkt.Parser.parseProjection(Parser.java:603)
    at org.geotools.referencing.wkt.Parser.parseProjCS(Parser.java:917)
    at org.geotools.referencing.wkt.Parser.parseCoordinateReferenceSystem(Parser.java:225)
    at org.geotools.referencing.wkt.Parser.parseCoordinateReferenceSystem(Parser.java:204)
    at org.geotools.referencing.factory.ReferencingObjectFactory.createFromWKT(ReferencingObjectFactory.java:1090)
    at org.geotools.data.PrjFileReader.<init>(PrjFileReader.java:94)
    at org.geotools.data.PrjFileReader.<init>(PrjFileReader.java:68)
    at org.geotools.data.shapefile.ShapefileSetManager.openPrjReader(ShapefileSetManager.java:106)
    at org.geotools.data.shapefile.ShapefileFeatureSource.readAttributes(ShapefileFeatureSource.java:516)
    at org.geotools.data.shapefile.ShapefileFeatureSource.buildFeatureType(ShapefileFeatureSource.java:472)
    at org.geotools.data.shapefile.ShapefileFeatureStore.buildFeatureType(ShapefileFeatureStore.java:131)
    at org.geotools.data.store.ContentFeatureSource.getAbsoluteSchema(ContentFeatureSource.java:343)
    at org.geotools.data.store.ContentFeatureSource.getSchema(ContentFeatureSource.java:312)
    at org.geotools.data.store.ContentFeatureCollection.<init>(ContentFeatureCollection.java:80)
    at org.geotools.data.store.ContentFeatureSource.getFeatures(ContentFeatureSource.java:570)
    at org.geotools.data.store.ContentFeatureSource.getFeatures(ContentFeatureSource.java:112)
    at org.matsim.core.utils.gis.ShapeFileReader.getAllFeatures(ShapeFileReader.java:76)
    at de.tum.bgu.msm.io.input.readers.ZonesReader.mapFeaturesToZones(ZonesReader.java:33)
    at de.tum.bgu.msm.io.input.readers.ZonesReader.read(ZonesReader.java:29)
    at de.tum.bgu.msm.MitoModel.readStandAlone(MitoModel.java:78)
    at de.tum.bgu.msm.MitoModel.standAloneModel(MitoModel.java:51)
    at de.tum.bgu.msm.MitoMuc.main(MitoMuc.java:18)
Caused by: java.lang.NoSuchFieldError: LONGITUDE_OF_CENTRE
    at org.geotools.referencing.operation.projection.AzimuthalEquidistant$Provider.<clinit>(AzimuthalEquidistant.java:429)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at java.lang.Class.newInstance(Class.java:442)
    at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:380)
    ... 30 more

02-Jul-2019 16:17:59, WARN, zoneId 37 doesn't exist in mito zone system
02-Jul-2019 16:17:59, WARN, zoneId 46 doesn't exist in mito zone system
02-Jul-2019 16:17:59, WARN, zoneId 49 doesn't exist in mito zone system
02-Jul-2019 16:17:59, WARN, zoneId 383 doesn't exist in mito zone system
02-Jul-2019 16:17:59, WARN, zoneId 398 doesn't exist in mito zone system
02-Jul-2019 16:17:59, WARN, zoneId 420 doesn't exist in mito zone system
02-Jul-2019 16:17:59, WARN, zoneId 464 doesn't exist in mito zone system
02-Jul-2019 16:17:59, WARN, zoneId 569 doesn't exist in mito zone system
02-Jul-2019 16:17:59, WARN, zoneId 2483 doesn't exist in mito zone system
02-Jul-2019 16:17:59, WARN, zoneId 3189 doesn't exist in mito zone system
02-Jul-2019 16:17:59, WARN, zoneId 4122 doesn't exist in mito zone system
02-Jul-2019 16:17:59, WARN, zoneId 4123 doesn't exist in mito zone system
02-Jul-2019 16:17:59, WARN, zoneId 4355 doesn't exist in mito zone system
02-Jul-2019 16:17:59, WARN, zoneId 4405 doesn't exist in mito zone system
02-Jul-2019 16:17:59, WARN, zoneId 4408 doesn't exist in mito zone system
02-Jul-2019 16:17:59, WARN, zoneId 4492 doesn't exist in mito zone system
02-Jul-2019 16:17:59, WARN, zoneId 4494 doesn't exist in mito zone system
02-Jul-2019 16:17:59, WARN, zoneId 4522 doesn't exist in mito zone system
02-Jul-2019 16:17:59, WARN, zoneId 4523 doesn't exist in mito zone system
02-Jul-2019 16:17:59, WARN, zoneId 4535 doesn't exist in mito zone system
02-Jul-2019 16:17:59, WARN, zoneId 4635 doesn't exist in mito zone system
02-Jul-2019 16:17:59, WARN, zoneId 4710 doesn't exist in mito zone system
02-Jul-2019 16:17:59, WARN, zoneId 4766 doesn't exist in mito zone system
02-Jul-2019 16:17:59, WARN, zoneId 4916 doesn't exist in mito zone system
02-Jul-2019 16:17:59, WARN, zoneId 4929 doesn't exist in mito zone system
02-Jul-2019 16:17:59, WARN, zoneId 4930 doesn't exist in mito zone system
02-Jul-2019 16:17:59, WARN, zoneId 4931 doesn't exist in mito zone system
02-Jul-2019 16:17:59, WARN, zoneId 4932 doesn't exist in mito zone system
02-Jul-2019 16:17:59, WARN, zoneId 4933 doesn't exist in mito zone system
02-Jul-2019 16:17:59, WARN, Damper of 0.0 refers to non-existing zone 37. Ignoring it.
02-Jul-2019 16:17:59, WARN, Damper of 0.0 refers to non-existing zone 46. Ignoring it.
02-Jul-2019 16:17:59, WARN, Damper of 0.0 refers to non-existing zone 49. Ignoring it.
02-Jul-2019 16:17:59, WARN, Damper of 0.0 refers to non-existing zone 383. Ignoring it.
02-Jul-2019 16:17:59, WARN, Damper of 0.0 refers to non-existing zone 398. Ignoring it.
02-Jul-2019 16:17:59, WARN, Damper of 0.0 refers to non-existing zone 420. Ignoring it.
02-Jul-2019 16:17:59, WARN, Damper of 0.0 refers to non-existing zone 464. Ignoring it.
02-Jul-2019 16:17:59, WARN, Damper of 0.0 refers to non-existing zone 569. Ignoring it.
02-Jul-2019 16:17:59, INFO, BorderDampersReader: Read 1674 records.
02-Jul-2019 16:18:00, INFO, Reading job micro data from ascii file
02-Jul-2019 16:18:06, INFO, JobReader: Read 2548089 records.
02-Jul-2019 16:18:06, INFO, Reading school micro data from ascii file
02-Jul-2019 16:18:06, INFO, SchoolsReader: Read 1487 records.
02-Jul-2019 16:18:06, INFO,   Reading household micro data from ascii file
02-Jul-2019 16:18:11, INFO, HouseholdsReader: Read 2125326 records.
02-Jul-2019 16:18:11, INFO, Reading household microlocation coordinate from dwelling file
02-Jul-2019 16:18:19, INFO, HouseholdsCoordReader: Read 2196128 records.
02-Jul-2019 16:18:19, INFO,   Reading person micro data from ascii file
02-Jul-2019 16:18:51, INFO, PersonsReader: Read 4424760 records.
02-Jul-2019 16:18:51, WARN, There are 34 households with no income after reading all persons.
02-Jul-2019 16:18:51, INFO, There are 2074829 persons without occupation (student or worker).
02-Jul-2019 16:18:51, INFO, Reading skims
02-Jul-2019 16:18:51, INFO, Reading car skim
java.lang.UnsatisfiedLinkError: no jhdf5 in java.library.path
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867)
    at java.lang.Runtime.loadLibrary0(Runtime.java:870)
    at java.lang.System.loadLibrary(System.java:1122)
    at ncsa.hdf.hdf5lib.H5.loadH5Lib(H5.java:347)
    at ncsa.hdf.hdf5lib.H5.<clinit>(H5.java:274)
    at ncsa.hdf.hdf5lib.HDF5Constants.<clinit>(HDF5Constants.java:28)
    at omx.hdf5.OmxHdf5File.open(OmxHdf5File.java:72)
    at omx.hdf5.OmxHdf5File.openReadOnly(OmxHdf5File.java:50)
    at omx.OmxFile.openReadOnly(OmxFile.java:76)
    at de.tum.bgu.msm.data.travelTimes.SkimTravelTimes.readSkim(SkimTravelTimes.java:42)
    at de.tum.bgu.msm.io.input.readers.SkimsReader.readTravelTimeSkims(SkimsReader.java:49)
    at de.tum.bgu.msm.io.input.readers.SkimsReader.read(SkimsReader.java:24)
    at de.tum.bgu.msm.MitoModel.readStandAlone(MitoModel.java:90)
    at de.tum.bgu.msm.MitoModel.standAloneModel(MitoModel.java:51)
    at de.tum.bgu.msm.MitoMuc.main(MitoMuc.java:18)
Exception in thread "main" java.lang.UnsatisfiedLinkError: ncsa.hdf.hdf5lib.H5.H5dont_atexit()I
    at ncsa.hdf.hdf5lib.H5.H5dont_atexit(Native Method)
    at ncsa.hdf.hdf5lib.H5.loadH5Lib(H5.java:365)
    at ncsa.hdf.hdf5lib.H5.<clinit>(H5.java:274)
    at ncsa.hdf.hdf5lib.HDF5Constants.<clinit>(HDF5Constants.java:28)
    at omx.hdf5.OmxHdf5File.open(OmxHdf5File.java:72)
    at omx.hdf5.OmxHdf5File.openReadOnly(OmxHdf5File.java:50)
    at omx.OmxFile.openReadOnly(OmxFile.java:76)
    at de.tum.bgu.msm.data.travelTimes.SkimTravelTimes.readSkim(SkimTravelTimes.java:42)
    at de.tum.bgu.msm.io.input.readers.SkimsReader.readTravelTimeSkims(SkimsReader.java:49)
    at de.tum.bgu.msm.io.input.readers.SkimsReader.read(SkimsReader.java:24)
    at de.tum.bgu.msm.MitoModel.readStandAlone(MitoModel.java:90)
    at de.tum.bgu.msm.MitoModel.standAloneModel(MitoModel.java:51)
    at de.tum.bgu.msm.MitoMuc.main(MitoMuc.java:18)

Do you have any ideas or possible solutions?

cllorca1 commented 5 years ago

Just focusing on the last part: you need to load the the jhdf5 library manually to the library path (required to read the omx files). The library is in the working folder under javaFiles/YOUR OS/jhdf5.dll. You can add it as a VM option when running the program the following option:

-Djava.library.path=javaFiles/win64/jhdf5.dll

cllorca1 commented 5 years ago

Actually -Djava.library.path=javaFiles/win64 without the filenames works in intellij

RRothfeld commented 5 years ago

Thank you, Carlos. Adding -Djava.library.path=javaFiles/win64 to the Java VM arguments solved the crashing of MITO. The first error remains but - appearantly - doesn't cause MITO to crash.