Having trouble starting GeoTools - Beginner

المشرف العام

Administrator
طاقم الإدارة
I've been faced with a problem for a couple of days now that I am having trouble solving. This is my first time dealing with the GeoTools library and not sure how to troubleshoot the issue.

I am trying to save a shape file using the library but I get the following stack trace:

java.lang.AbstractMethodError: org.geotools.metadata.iso.citation.ContactImpl.getOnlineResource()Lorg/opengis/metadata/citation/OnlineResource; at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.geotools.metadata.PropertyAccessor.get(PropertyAccessor.java:474) at org.geotools.metadata.PropertyAccessor.hashCode(PropertyAccessor.java:789) at org.geotools.metadata.MetadataStandard.hashCode(MetadataStandard.java:323) at org.geotools.metadata.AbstractMetadata.hashCode(AbstractMetadata.java:215) at org.geotools.metadata.PropertyAccessor.hashCode(PropertyAccessor.java:791) at org.geotools.metadata.MetadataStandard.hashCode(MetadataStandard.java:323) at org.geotools.metadata.AbstractMetadata.hashCode(AbstractMetadata.java:215) at java.util.HashMap.hash(HashMap.java:362) at java.util.HashMap.put(HashMap.java:492) at java.util.HashSet.add(HashSet.java:217) at org.geotools.util.CheckedHashSet.add(CheckedHashSet.java:216) at org.geotools.metadata.iso.citation.CitationImpl. (CitationImpl.java:177) at org.geotools.metadata.iso.citation.Citations.(Citations.java:86) at org.geotools.referencing.wkt.Parser.parseAuthority(Parser.java:352) at org.geotools.referencing.wkt.Parser.parseProjCS(Parser.java:912) 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.referencing.CRS.parseWKT(CRS.java:504)As you can tell I am using the WKT plugin to parse the EPSG data, but I am still getting this error for some reason.

I am running the code within Apache Tomcat and using Jersey REST to interact with the web service. The code I have written works locally (i.e not using Apache tomcat to execute the code) but only throws this issue when a WAR file is built and deployed.

Anyone here have any suggestions? I am using GeoTools version 8.5 and I have checked that all the Jars are of the same version number.

Thank you.



أكثر...
 
أعلى