- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我正在尝试编写一些简单的基于 GeoTools 的代码来访问 WFS 服务器。到目前为止,代码如下所示:
String getCapabilities = "http://www.nws.noaa.gov/mdl/survey/pgb_survey/dev/OGC_services/ndfdOWSserver.php?SERVICE=WFS&Request=GetCapabilities";
Map<String, String> connectionParameters = new HashMap<String, String>();
connectionParameters.put("WFSDataStoreFactory:GET_CAPABILITIES_URL", getCapabilities);
WFSDataStoreFactory dsf = new WFSDataStoreFactory();
try {
WFSDataStore dataStore = dsf.createDataStore(connectionParameters);
String types[] = dataStore.getTypeNames();
for (int i = 0; i < types.length; i++) {
System.out.println(types[i]);
}
SimpleFeatureSource source = dataStore.getFeatureSource("ndfd:Forecast_Gml2Point");
SimpleFeatureCollection fc = source.getFeatures();
while(fc.features().hasNext()){
SimpleFeature sf = fc.features().next();
System.out.println(sf.getAttribute("myname"));
}
} catch (IOException ex) {
ex.printStackTrace();
}
}
这一直有效,直到调用 getFeatures() 的那一行,此时我得到了可怕的 java.lang.NoClassDefFoundError: org.hsqldb.lib.FrameworkLogger 错误:
Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class org.hsqldb.lib.FrameworkLogger
at org.hsqldb.persist.Logger.getEventLogger(Unknown Source)
at org.hsqldb.persist.Logger.getEventLogger(Unknown Source)
at org.hsqldb.persist.Logger.logInfoEvent(Unknown Source)
at org.hsqldb.persist.Logger.closePersistence(Unknown Source)
at org.hsqldb.Database.reopen(Unknown Source)
at org.hsqldb.Database.open(Unknown Source)
[...]
at org.geotools.data.wfs.v1_0_0.WFS_1_0_0_DataStore.getSchema(WFS_1_0_0_DataStore.java:386)
at org.geotools.data.wfs.v1_0_0.WFSFeatureSource.getSchema(WFSFeatureSource.java:207)
at org.geotools.data.wfs.v1_0_0.WFSFeatureSource.getFeatures(WFSFeatureSource.java:231)
at wfsClient.WfsClient.main(WfsClient.java:100)
阅读类似的问题(例如 this )表明类路径中缺少 hsqldb ——但事实并非如此。我已按照 this page 上的指示进行操作下载 GeoTools 存档并将所有 Jars 添加到我的 Eclipse 项目中。 (我无法使用 Maven,因为 Eclipse Maven 插件不能很好地与我们的代理配合使用。)我已经删除了所有建议的冲突 Jars,以及 this thread 中建议的那些。 。我已经检查了代码中的类路径,它包括“GeoTools Download”项目以及导出的所有 Jars。 (我还将所有 jar 显式添加到我的类路径中并得到相同的错误。)
如果我将项目转储到 Ant 构建文件,路径定义如下所示:
<path id="GeoTools Download.classpath">
<pathelement location="${GeoTools Download.location}/bin"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/ant-1.8.1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/batik-transcoder-1.7.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/bridj-0.6-c-only.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/bufr-4.3.16.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/common-2.6.0.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/commons-beanutils-1.7.0.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/commons-cli-2.0-gt2-pre1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/commons-codec-1.2.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/commons-collections-3.1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/commons-dbcp-1.4.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/commons-digester-1.7.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/commons-httpclient-3.1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/commons-io-2.1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/commons-jxpath-1.3.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/commons-lang-2.6.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/commons-logging-1.1.1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/commons-pool-1.5.4.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/core.commands-3.6.0.I20100512-1500.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/core.runtime-3.6.0.v20100505.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/eastwood-1.1.1-20090908.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/ecore-2.6.1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/ehcache-1.6.2.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/equinox.common-3.6.0.v20100503.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/gdal-1.8.1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/geodb-0.7-RC2.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/grib-4.3.16.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/gt-api-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/gt-app-schema-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/gt-app-schema-resolver-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/gt-arcgrid-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/gt-brewer-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/gt-charts-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/gt-complex-13-RC1-tests.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/gt-complex-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/gt-coverage-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/gt-coverage-api-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/gt-coveragetools-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/gt-cql-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/gt-css-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/gt-csv-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/gt-data-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/gt-epsg-hsql-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/gt-feature-aggregate-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/gt-feature-pregeneralized-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/gt-geojson-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/gt-geometry-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/gt-geopkg-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/gt-geotiff-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/gt-graph-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/gt-grassraster-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/gt-grib-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/gt-grid-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/gt-gtopo30-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/gt-image-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/gt-imageio-ext-gdal-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/gt-imagemosaic-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/gt-imagemosaic-jdbc-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/gt-imagepyramid-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/gt-jdbc-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/gt-jp2k-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/gt-jts-wrapper-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/gt-main-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/gt-matfile5-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/gt-mbtiles-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/gt-metadata-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/gt-mongodb-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/gt-netcdf-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/gt-ogr-bridj-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/gt-ogr-core-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/gt-ogr-jni-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/gt-opengis-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/gt-process-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/gt-process-feature-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/gt-process-geometry-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/gt-process-raster-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/gt-property-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/gt-property-old-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/gt-referencing-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/gt-referencing3D-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/gt-render-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/gt-sample-data-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/gt-sample-data-access-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/gt-sfs-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/gt-shapefile-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/gt-solr-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/gt-svg-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/gt-swing-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/gt-swt-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/gt-transform-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/gt-validation-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/gt-vpf-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/gt-wfs-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/gt-wfs-ng-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/gt-wms-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/gt-wps-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/gt-xml-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/gt-xsd-core-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/gt-xsd-csw-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/gt-xsd-fes-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/gt-xsd-filter-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/gt-xsd-gml2-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/gt-xsd-gml3-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/gt-xsd-kml-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/gt-xsd-ows-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/gt-xsd-sld-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/gt-xsd-wcs-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/gt-xsd-wfs-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/gt-xsd-wms-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/gt-xsd-wps-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/h2-1.1.119.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/hsqldb-2.2.8.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/icu4j-3.4.4.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/imageio-ext-arcgrid-1.1.10.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/imageio-ext-gdalarcbinarygrid-1.1.10.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/imageio-ext-gdaldted-1.1.10.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/imageio-ext-gdalecw-1.1.10.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/imageio-ext-gdalecwjp2-1.1.10.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/imageio-ext-gdalehdr-1.1.10.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/imageio-ext-gdalenvihdr-1.1.10.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/imageio-ext-gdalerdasimg-1.1.10.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/imageio-ext-gdalidrisi-1.1.10.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/imageio-ext-gdalkakadujp2-1.1.10.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/imageio-ext-gdalmrsid-1.1.10.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/imageio-ext-gdalmrsidjp2-1.1.10.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/imageio-ext-gdalnitf-1.1.10.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/imageio-ext-gdalrpftoc-1.1.10.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/imageio-ext-geocore-1.1.10.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/imageio-ext-imagereadmt-1.1.10.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/imageio-ext-imagereadmt-1.1M012010.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/imageio-ext-kakadu-1.1.10.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/imageio-ext-mat-sas-1.1M012010.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/imageio-ext-streams-1.1.10.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/imageio-ext-tiff-1.1.10.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/imageio-ext-utilities-1.1.10.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/jai_codec-1.1.3.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/jai_core-1.1.3.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/jai_imageio-1.1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/javacsv-2.0.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/jdom-1.1.3.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/jface-3.6.1.M20100825-0800.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/jgridshift-1.0.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/json-simple-1.1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/jsqlparser-0.3.14.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/jsr-275-1.0-beta-2.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/jt-contour-1.3.1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/jt-rangelookup-1.3.1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/jt-utils-1.3.1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/jt-vectorbinarize-1.3.1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/jt-vectorize-1.3.1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/jt-zonalstats-1.3.1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/jts-1.13.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/log4j-over-slf4j-1.6.4.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/miglayout-3.7-swing.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/mongo-java-driver-2.5.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/mysql-connector-java-5.1.17.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/net.opengis.csw-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/net.opengis.fes-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/net.opengis.ows-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/net.opengis.wcs-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/net.opengis.wfs-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/net.opengis.wps-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/netcdf-4.3.16.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/opendap-2.1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/org.w3.xlink-13-RC1.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/parboiled-java-1.1.6.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/picocontainer-1.2.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/postgresql-8.4-701.jdbc3.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/slf4j-log4j12-1.6.4.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/solr-solrj-4.9.0.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/spatialite-jdbc-3.7.2-2.4.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/sqlite-jdbc-3.8.6.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/swt.gtk.linux.x86-3.6.1.v3655c.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/swt.win32.win32.x86_64-3.6.1.v3655c.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/ui.workbench-3.6.1.M20100826-1330.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/vecmath-1.3.2.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/xml-commons-resolver-1.2.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/xpp3_min-1.1.4c.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/xpp3-1.1.3.4.O.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/xsd-2.6.0.jar"/>
<pathelement location="${GeoTools Download.location}/geotools-13-RC1/slf4j-log4j-1.6.4.jar"/>
</path>
<path id="WFS Client Project.classpath">
<pathelement location="bin"/>
<path refid="GeoTools Download.classpath"/>
</path>
您将看到其中只有一个 epsg jar 文件和一个 jdbc jar 文件。我对 12.2 版本做了同样的事情,得到了相同的结果。
关于如何解决这个问题有什么想法吗?任何帮助表示赞赏!
最佳答案
我无法使用 Maven 重现您的问题。我认为解决此问题的唯一可靠方法是在在线计算机上使用 mvn 构建项目,然后复制所需的依赖项。或者,如果您确实必须继续这样做,请尝试一次删除一个 jar ,看看是哪个 jar 导致了问题。
编辑
我可以按照快速入门中的过时步骤重现错误,我能找到的最佳猜测是 this这表明存在日志记录问题。这似乎确实合理,因为当问题出现时它试图抛出 SAX 错误。
如果您删除所有其他 jar (不在我下面的列表中),它将起作用。
但是,GeoTools 日志记录代码是一个我不敢涉足的复杂地方,因此请尝试添加 log4j 或改用 epsg-wkt,因为这也可以解决问题。
如果这里有帮助,Maven 认为您应该需要作为依赖项:
[INFO] --- maven-dependency-plugin:2.1:list (default-cli) @ artifactid ---
[INFO]
[INFO] The following files have been resolved:
[INFO] com.vividsolutions:jts:jar:1.13:compile
[INFO] commons-codec:commons-codec:jar:1.2:compile
[INFO] commons-collections:commons-collections:jar:3.1:compile
[INFO] commons-httpclient:commons-httpclient:jar:3.1:compile
[INFO] commons-io:commons-io:jar:2.1:compile
[INFO] commons-jxpath:commons-jxpath:jar:1.3:compile
[INFO] commons-logging:commons-logging:jar:1.0.4:compile
[INFO] commons-pool:commons-pool:jar:1.5.4:compile
[INFO] it.geosolutions.imageio-ext:imageio-ext-tiff:jar:1.1.10:compile
[INFO] it.geosolutions.imageio-ext:imageio-ext-utilities:jar:1.1.10:compile
[INFO] java3d:vecmath:jar:1.3.2:compile
[INFO] javax.media:jai_codec:jar:1.1.3:compile
[INFO] javax.media:jai_core:jar:1.1.3:compile
[INFO] javax.media:jai_imageio:jar:1.1:compile
[INFO] jgridshift:jgridshift:jar:1.0:compile
[INFO] net.java.dev.jsr-275:jsr-275:jar:1.0-beta-2:compile
[INFO] org.apache.xml:xml-commons-resolver:jar:1.2:compile
[INFO] org.eclipse.emf:common:jar:2.6.0:compile
[INFO] org.eclipse.emf:ecore:jar:2.6.1:compile
[INFO] org.eclipse.xsd:xsd:jar:2.6.0:compile
[INFO] org.geotools:gt-api:jar:13-RC1:compile
[INFO] org.geotools:gt-coverage:jar:13-RC1:compile
[INFO] org.geotools:gt-cql:jar:13-RC1:compile
[INFO] org.geotools:gt-data:jar:13-RC1:compile
[INFO] org.geotools:gt-epsg-hsql:jar:13-RC1:compile
[INFO] org.geotools:gt-graph:jar:13-RC1:compile
[INFO] org.geotools:gt-main:jar:13-RC1:compile
[INFO] org.geotools:gt-metadata:jar:13-RC1:compile
[INFO] org.geotools:gt-opengis:jar:13-RC1:compile
[INFO] org.geotools:gt-referencing:jar:13-RC1:compile
[INFO] org.geotools:gt-wfs-ng:jar:13-RC1:compile
[INFO] org.geotools:gt-xml:jar:13-RC1:compile
[INFO] org.geotools.ogc:net.opengis.fes:jar:13-RC1:compile
[INFO] org.geotools.ogc:net.opengis.ows:jar:13-RC1:compile
[INFO] org.geotools.ogc:net.opengis.wfs:jar:13-RC1:compile
[INFO] org.geotools.ogc:org.w3.xlink:jar:13-RC1:compile
[INFO] org.geotools.xsd:gt-xsd-core:jar:13-RC1:compile
[INFO] org.geotools.xsd:gt-xsd-fes:jar:13-RC1:compile
[INFO] org.geotools.xsd:gt-xsd-filter:jar:13-RC1:compile
[INFO] org.geotools.xsd:gt-xsd-gml2:jar:13-RC1:compile
[INFO] org.geotools.xsd:gt-xsd-gml3:jar:13-RC1:compile
[INFO] org.geotools.xsd:gt-xsd-ows:jar:13-RC1:compile
[INFO] org.geotools.xsd:gt-xsd-wfs:jar:13-RC1:compile
[INFO] org.hsqldb:hsqldb:jar:2.2.8:compile
[INFO] org.jaitools:jt-utils:jar:1.3.1:compile
[INFO] org.jaitools:jt-zonalstats:jar:1.3.1:compile
[INFO] org.jdom:jdom:jar:1.1.3:compile
[INFO] picocontainer:picocontainer:jar:1.2:compile
[INFO] xml-apis:xml-apis:jar:1.0.b2:compile
[INFO] xpp3:xpp3:jar:1.1.3.4.O:compile
关于java - 地理工具java.lang.NoClassDefFoundError : org. hsqldb.lib.FrameworkLogger,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31481834/
在 Tomcat 6/Ubuntu 12.04 上启动 Grails 2.1.0 应用程序时出现以下错误。 Error 500 - Internal Server Error. groovy.lang
在运行 Storm 拓扑时,我收到此错误。拓扑完美运行 5 分钟,没有任何错误,然后失败。我正在使用 Config.TOPOLOGY_TICK_TUPLE_FREQ_SECS as 300 sec i
我有一个 jsp 代码在其中一台机器上运行良好。但是当我复制到另一台机器时,我得到了这个 no such method found 异常。我是 Spring 的新手。有人可以解释我错过了什么吗? 以下
已关闭。此问题需要 debugging details 。目前不接受答案。 编辑问题以包含 desired behavior, a specific problem or error, and the
我的代码在下面给出了一个错误; Exception in thread "main" java.lang.NoSuchMethodError: com/myApp/Client.cypherCBC(L
我正在尝试一个 Restful web 服务示例,所以当我要访问 url 时,我遇到了异常 java.lang.NoSuchMethodError: jersey.repackaged.com.goo
我正在将一个 Spring web 项目转换为一个 Maven 项目,但我收到了这个错误: java.lang.NoSuchMethodError: org.jboss.logging.Logger.
在我的项目中,我有一个像这样的枚举: public enum MyEnum { FIRST(1), SECOND(2); private int value; private MyEnum(int v
我创建了这个简单的示例,用于读取 Linux 正常运行时间: public String getMachineUptime() throws IOException { String[] di
我正在使用 Eclipse,并且正在使用 Java。我的目标是使用 bogoSort 方法对 vector 进行排序在一个 vector (vectorExample)中适应我的 vector 类型,
我正在运行以下查询。它显示一条错误消息。如何解决这个错误? ListrouteList=null; List companyList = session.createS
我有以下模型类: @Entity @Table(name="user_content") @org.hibernate.annotations.NamedQueries({ @org.
我有那个错误。这是我的代码: GmailSettingsService service = new GmailSettingsService(APPLICATION_NAME, DOMAIN_NAME
实际上我在执行我的java程序时遇到了下面提到的错误 Exception in thread "pool-1-thread-1" java.lang.ClassCastException: jav
java.lang.ClassCastException: java.lang.Float cannot be cast to java.lang.String 我在以下代码中遇到此异常: Strin
我正在尝试从 linkedhashset 中检索随机元素。下面是我的代码,但它每次都给我异常。 private static void generateRandomUserId(Set userIds
我已经完成了 Android 中的代码: List spinnerArray = new ArrayList(); for (int i = 0; i item = (LinkedTreeMap)
这个问题已经有答案了: Explanation of ClassCastException in Java (12 个回答) 已关闭 6 年前。 我已经编写了 java 到 Json 的代码,同时从页
这个问题在这里已经有了答案: ClassCastException java.lang.Long cannot be cast to clojure.lang.IFn (4 个答案) 关闭 6 年前
我在运行时遇到问题来编译这段代码,这给我一个错误,java.lang.Integer 无法转换为 Java.lang.Double。如果有人帮助我更正此代码,我将非常高兴 double x; pu
我是一名优秀的程序员,十分优秀!