[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [geomesa-users] Using the Java API - NoClassDefFoundError
|
I've got the project demonstrating all the functionality from the tutorial in geomesa-dist to compile completely. I did also have to add:
<dependency>
<groupId>org.apache.accumulo</groupId>
<artifactId>accumulo-core</artifactId>
<version>1.5.1</version>
</dependency>
However, now I'm hitting an exception at run-time trying to create a FeatureType:
log4j:WARN No appenders could be found for logger (org.apache.hadoop.conf.Configuration.deprecation).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
2014-05-22 19:21:58.181 java[2387:1903] Unable to load realm info from SCDynamicStore
Exception in thread "main" java.lang.ExceptionInInitializerError
at geomesa.core.data.AccumuloDataStore.writeMetadata(AccumuloDataStore.scala:112)
at geomesa.core.data.AccumuloDataStore.createSchema(AccumuloDataStore.scala:101)
at geomesa.core.data.AccumuloDataStore.createSchema(AccumuloDataStore.scala:54)
at con.geo.App.createFeatureType(App.java:88)
at con.geo.App.main(App.java:33)
Caused by: org.geotools.feature.SchemaException: Error decoding srs: 4326
at org.geotools.data.DataUtilities.createAttribute(DataUtilities.java:2649)
at org.geotools.data.DataUtilities.createType(DataUtilities.java:1928)
at org.geotools.data.DataUtilities.createType(DataUtilities.java:1901)
at geomesa.core.index.package$.<init>(index.scala:43)
at geomesa.core.index.package$.<clinit>(index.scala)
... 5 more
Caused by: org.opengis.referencing.NoSuchAuthorityCodeException: No code "EPSG:4326" from authority "EPSG" found for object of type "EngineeringCRS".
at org.geotools.referencing.factory.epsg.CartesianAuthorityFactory.noSuchAuthorityException(CartesianAuthorityFactory.java:136)
at org.geotools.referencing.factory.epsg.CartesianAuthorityFactory.createEngineeringCRS(CartesianAuthorityFactory.java:130)
at org.geotools.referencing.factory.epsg.CartesianAuthorityFactory.createCoordinateReferenceSystem(CartesianAuthorityFactory.java:121)
at org.geotools.referencing.factory.AuthorityFactoryAdapter.createCoordinateReferenceSystem(AuthorityFactoryAdapter.java:801)
at org.geotools.referencing.factory.ThreadedAuthorityFactory.createCoordinateReferenceSystem(ThreadedAuthorityFactory.java:731)
at org.geotools.referencing.DefaultAuthorityFactory.createCoordinateReferenceSystem(DefaultAuthorityFactory.java:179)
at org.geotools.referencing.CRS.decode(CRS.java:514)
at org.geotools.referencing.CRS.decode(CRS.java:442)
at org.geotools.data.DataUtilities.createAttribute(DataUtilities.java:2646)
... 9 more
I've attached the Java file here. It is basically identical to the documentation, createFeatureType() succeeds, but createFeature() throws the above exception. One thing I noticed is that the documentation refers to "IndexEntryType.getTypeSpec()", which is appended to the Feature Schema, but that does not appear to be provided by GeoMesa currently. The only reference to it in the current codebase is in a unit test. I'm not sure if my errors are caused because my feature schema is missing some essential types.
I have tried this both with a mock Accumulo instance and with references to a real one, and this exception output is from the mock instance. When using a real instance of Accumulo (running on localhost) the program hangs, presumably on dataStore.createSchema() and produces no output.
Thank you once again for any ideas you may have,
Connor
Attachment:
App.java
Description: Binary data