Okay, this is really weird. I found that the exception is related to: 
https://github.com/geotools/geotools/blob/master/modules/library/metadata/src/main/java/org/geotools/util/NIOUtilities.java#L208
 
<https://github.com/geotools/geotools/blob/master/modules/library/metadata/src/main/java/org/geotools/util/NIOUtilities.java#L208>

where there is no  `JavaVersion.JAVA_9` field.



> On 31 Mar 2019, at 4:55 pm, Chris Zheng <z...@caudate.me> wrote:
> 
> I’m using the latest version of the geotools jar (22-SNAPSHOT) and JDK 11 and 
> a call to will result in an exception.
> 
> This code will trigger the exception:
> 
>       FileDataStoreFinder.getDataStore(new 
> java.io.File("geotools/maps/countries.shp”)).getFeatureSource().getFeatures()
> 
> ----------------------
> 
> Unhandled java.lang.NoSuchFieldError
>    JAVA_9
> 
>          NIOUtilities.java:  207  org.geotools.util.NIOUtilities/clean
>          NIOUtilities.java:  185  org.geotools.util.NIOUtilities/clean
>       DbaseFileReader.java:  300  
> org.geotools.data.shapefile.dbf.DbaseFileReader/close
> ShapefileFeatureSource.java:  586  
> org.geotools.data.shapefile.ShapefileFeatureSource/readAttributes
> ShapefileFeatureSource.java:  479  
> org.geotools.data.shapefile.ShapefileFeatureSource/buildFeatureType
> ShapefileFeatureStore.java:  137  
> org.geotools.data.shapefile.ShapefileFeatureStore/buildFeatureType
>  ContentFeatureSource.java:  327  
> org.geotools.data.store.ContentFeatureSource/getAbsoluteSchema
>  ContentFeatureSource.java:  296  
> org.geotools.data.store.ContentFeatureSource/getSchema
> ContentFeatureCollection.java:   69  
> org.geotools.data.store.ContentFeatureCollection/<init>
>  ContentFeatureSource.java:  545  
> org.geotools.data.store.ContentFeatureSource/getFeatures
> 
> Is there anything I’m missing?
> _______________________________________________
> GeoTools-Devel mailing list
> GeoTools-Devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geotools-devel

_______________________________________________
GeoTools-Devel mailing list
GeoTools-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to