Geotools 依赖版本组合
Geotools dependencies version mix
我正在使用 Geotools 编写一个 Java 程序以在 Geomesa 2.0.2 中摄取数据,但是当我尝试 运行 时出现此错误。问题是这个
SimpleFeatureType simpleFeatureType=dataStore.getSchema("schemaname");
[WARNING]
java.lang.NoSuchMethodError: tec.uom.se.format.SimpleUnitFormat.getInstance()Lte c/uom/se/format/SimpleUnitFormat$FinalDefaultFormat;
at si.uom.NonSI.addUnit (NonSI.java:642)
at si.uom.NonSI.addUnit (NonSI.java:665)
at si.uom.NonSI.<clinit> (NonSI.java:109)
at org.geotools.referencing.datum.DefaultPrimeMeridian.<clinit> (DefaultPrim eMeridian.java:47)
at org.geotools.referencing.datum.DefaultGeodeticDatum.<clinit> (DefaultGeod eticDatum.java:73)
at org.geotools.referencing.crs.DefaultGeographicCRS.<clinit> (DefaultGeogra phicCRS.java:89)
at org.locationtech.geomesa.utils.geotools.package$.liftedTree1 (package.s cala:27)
at org.locationtech.geomesa.utils.geotools.package$.<init> (package.scala:27 )
at org.locationtech.geomesa.utils.geotools.package$.<clinit> (package.scala)
at org.locationtech.geomesa.utils.geotools.AttributeSpec$GeomAttributeSpec.b uilderHook (SimpleFeatureSpec.scala:165)
at org.locationtech.geomesa.utils.geotools.AttributeSpec$class.toDescriptor (SimpleFeatureSpec.scala:76)
at org.locationtech.geomesa.utils.geotools.AttributeSpec$GeomAttributeSpec.t oDescriptor (SimpleFeatureSpec.scala:156)
at org.locationtech.geomesa.utils.geotools.SimpleFeatureTypes$$anonfun$creat eFeatureType.apply (SimpleFeatureTypes.scala:233)
at org.locationtech.geomesa.utils.geotools.SimpleFeatureTypes$$anonfun$creat eFeatureType.apply (SimpleFeatureTypes.scala:233)
一开始我有 classNotFound
然后我添加了 SI 单位依赖项
<dependency>
<groupId>javax.measure</groupId>
<artifactId>unit-api</artifactId>
<version>0.9</version>
</dependency>
<!-- https://mvnrepository.com/artifact/tec.uom/uom-se -->
<dependency>
<groupId>tec.uom</groupId>
<artifactId>uom-se</artifactId>
<version>1.0.8</version>
</dependency>
<!-- https://mvnrepository.com/artifact/tec.uom.lib/uom-lib-common -->
<dependency>
<groupId>tec.uom.lib</groupId>
<artifactId>uom-lib-common</artifactId>
<version>1.0.2</version>
</dependency>
<!-- https://mvnrepository.com/artifact/si.uom/si-units-java8 -->
<dependency>
<groupId>si.uom</groupId>
<artifactId>si-units-java8</artifactId>
<version>0.9</version>
</dependency>
知道我正在使用 geomesa 2.0.2 和 geotools 20-snapshot 的任何人都可以帮助我找到依赖项的确切版本,特别是 Units Dependencies
谢谢
GeoMesa 2.0.2 与 geotools 20 不兼容。Geotools 20 引入了新版本的 JTS,将所有包从 com.vividsolutions.jts 重命名为 org.locationtech.jts。目前,您应该使用 geotools 19。GeoMesa 目前正计划更新至 geotools 20 版本 2.2.0,该版本应在未来几个月内发布。
我正在使用 Geotools 编写一个 Java 程序以在 Geomesa 2.0.2 中摄取数据,但是当我尝试 运行 时出现此错误。问题是这个
SimpleFeatureType simpleFeatureType=dataStore.getSchema("schemaname");
[WARNING]
java.lang.NoSuchMethodError: tec.uom.se.format.SimpleUnitFormat.getInstance()Lte c/uom/se/format/SimpleUnitFormat$FinalDefaultFormat;
at si.uom.NonSI.addUnit (NonSI.java:642)
at si.uom.NonSI.addUnit (NonSI.java:665)
at si.uom.NonSI.<clinit> (NonSI.java:109)
at org.geotools.referencing.datum.DefaultPrimeMeridian.<clinit> (DefaultPrim eMeridian.java:47)
at org.geotools.referencing.datum.DefaultGeodeticDatum.<clinit> (DefaultGeod eticDatum.java:73)
at org.geotools.referencing.crs.DefaultGeographicCRS.<clinit> (DefaultGeogra phicCRS.java:89)
at org.locationtech.geomesa.utils.geotools.package$.liftedTree1 (package.s cala:27)
at org.locationtech.geomesa.utils.geotools.package$.<init> (package.scala:27 )
at org.locationtech.geomesa.utils.geotools.package$.<clinit> (package.scala)
at org.locationtech.geomesa.utils.geotools.AttributeSpec$GeomAttributeSpec.b uilderHook (SimpleFeatureSpec.scala:165)
at org.locationtech.geomesa.utils.geotools.AttributeSpec$class.toDescriptor (SimpleFeatureSpec.scala:76)
at org.locationtech.geomesa.utils.geotools.AttributeSpec$GeomAttributeSpec.t oDescriptor (SimpleFeatureSpec.scala:156)
at org.locationtech.geomesa.utils.geotools.SimpleFeatureTypes$$anonfun$creat eFeatureType.apply (SimpleFeatureTypes.scala:233)
at org.locationtech.geomesa.utils.geotools.SimpleFeatureTypes$$anonfun$creat eFeatureType.apply (SimpleFeatureTypes.scala:233)
一开始我有 classNotFound
然后我添加了 SI 单位依赖项
<dependency>
<groupId>javax.measure</groupId>
<artifactId>unit-api</artifactId>
<version>0.9</version>
</dependency>
<!-- https://mvnrepository.com/artifact/tec.uom/uom-se -->
<dependency>
<groupId>tec.uom</groupId>
<artifactId>uom-se</artifactId>
<version>1.0.8</version>
</dependency>
<!-- https://mvnrepository.com/artifact/tec.uom.lib/uom-lib-common -->
<dependency>
<groupId>tec.uom.lib</groupId>
<artifactId>uom-lib-common</artifactId>
<version>1.0.2</version>
</dependency>
<!-- https://mvnrepository.com/artifact/si.uom/si-units-java8 -->
<dependency>
<groupId>si.uom</groupId>
<artifactId>si-units-java8</artifactId>
<version>0.9</version>
</dependency>
知道我正在使用 geomesa 2.0.2 和 geotools 20-snapshot 的任何人都可以帮助我找到依赖项的确切版本,特别是 Units Dependencies 谢谢
GeoMesa 2.0.2 与 geotools 20 不兼容。Geotools 20 引入了新版本的 JTS,将所有包从 com.vividsolutions.jts 重命名为 org.locationtech.jts。目前,您应该使用 geotools 19。GeoMesa 目前正计划更新至 geotools 20 版本 2.2.0,该版本应在未来几个月内发布。