Hi,

I just spent an afternoon resolving a NoSuchMethodError, and I wonder if it 
would make sense to capture what I learned as an FAQ entry to help others who 
might stumble into the same situation.  I am using GeoTools version 22 in a 
Clojure app (using Clojure’s Leiningen tool, which is a wrapper on Maven) that 
also happens to link against a shaded jar containing Apache’s tika-parsers.  
Unbeknownst to me, this brought in GeoAPI 3.0.1, and GeoAPI’s implementation of 
org.opengis.referencing.cs.AxisDirection was taking precedence over GeoTools’ 
version.  This caused:

java.lang.NoSuchMethodError: 
org.opengis.referencing.cs.AxisDirection.absolute()Lorg/opengis/referencing/cs/AxisDirection

At the time, I couldn’t find any similar issues on the places I would normally 
look for help (e.g., stackoverflow) or on the geotools-gt2-users list.  After I 
figured out the issue, I did stumble across this almost 5 year old thread: 
http://osgeo-org.1560.x6.nabble.com/Unethical-use-of-GeoAPI-library-in-Geotools-td5188705.html

Would it make sense to create an FAQ entry that suggests looking for 
GeoAPI/gt-referencing conflicts in the case of unexplained NoSuchMethodError or 
similar exceptions from Java?

Many thanks,
Eric Schoen


—
Eric Schoen
CTO
i2k Connect
Cell: +1 (832) 605-3907
ejsch...@i2kconnect.com<mailto:ejsch...@i2kconnect.com>
i2kconnect.com<http://i2kconnect.com/>


_______________________________________________
GeoTools-GT2-Users mailing list
GeoTools-GT2-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to