0

Eclipse+Maven+Tomcat. I have some Geotools code that runs fine when run as "Java Application". The same code fails when running within a servlet. So it must be an issue with the Jar Loader of geotools.

using org.geotools.metadata.iso.citation.Citations throws

java.lang.AbstractMethodError: org.geotools.metadata.iso.citation.ContactImpl.getOnlineResource()Lorg/opengis/metadata/citation/OnlineResource;

The error is thrown in the static part of Citations

  final CitationImpl c = new CitationImpl(ResponsiblePartyImpl.OGC);

Has anyone any idea?

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:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.geotools.metadata.PropertyAccessor.get(PropertyAccessor.java:450) at org.geotools.metadata.PropertyAccessor.hashCode(PropertyAccessor.java:773) at org.geotools.metadata.MetadataStandard.hashCode(MetadataStandard.java:303) at org.geotools.metadata.AbstractMetadata.hashCode(AbstractMetadata.java:198) at org.geotools.metadata.PropertyAccessor.hashCode(PropertyAccessor.java:775) at org.geotools.metadata.MetadataStandard.hashCode(MetadataStandard.java:303) at org.geotools.metadata.AbstractMetadata.hashCode(AbstractMetadata.java:198) at java.util.HashMap.hash(HashMap.java:339) at java.util.HashMap.put(HashMap.java:612) at java.util.HashSet.add(HashSet.java:220) at org.geotools.util.CheckedHashSet.add(CheckedHashSet.java:190) at org.geotools.metadata.iso.citation.CitationImpl.(CitationImpl.java:156) at org.geotools.metadata.iso.citation.Citations.(Citations.java:76)

  • How are you building your war file? – Ian Turton Apr 2 at 16:20
0

Using version 22-SNAPSHOT solved the problem !

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.