Hi Andrea, Thank you for the response. That was it!
I can confirm that GeoTools is now working in our Java 12 project. We are only using a small subset of GeoTool’s features, but those features are working well. We’re reading and writing shapefiles. We’re also using CRS functions to convert from one CRS to another. Thanks for the help! Rob From: Andrea Aime <andrea.a...@geo-solutions.it> Sent: Wednesday, August 14, 2019 2:59 PM To: Rob <rob_mil...@hotmail.com> Cc: geotools-gt2-users@lists.sourceforge.net; ijtur...@gmail.com Subject: Re: java.lang.NoSuchFieldError: JAVA_9 I'm guessing you have an older version of commons-lang in the classpath, GeoTools uses version 3.8.1, the field is available since version 3.5 Cheers Andrea On Wed, Aug 14, 2019 at 9:07 PM Rob <rob_mil...@hotmail.com<mailto:rob_mil...@hotmail.com>> wrote: Hi guys, I set up the Quickstart project with Maven and then used that to find other dependencies beyond GeoTools. I can now run my project from my development environment without any errors and use the shapefile functions that were causing problems. However, when I build the project and run it from an installation on a PC I now get “NoSuchFieldError” that seems to indicate a field called “JAVA_9” is being searched for. Do you have any thoughts about how to address this? The stack trace is below… Aug 14, 2019 2:00:32 PM org.geotools.data.shapefile.shp.ShapefileReader <init> WARNING: Could not open the .shx file, continuing assuming the .shp file is not sparse java.io.IOException: JAVA_9 at org.geotools.data.shapefile.shp.IndexFile.<init>(IndexFile.java:102) at org.geotools.data.shapefile.shp.ShapefileReader.<init>(ShapefileReader.java:266) at org.geotools.data.shapefile.shp.ShapefileReader.<init>(ShapefileReader.java:237) at utilities.shapeFiles.BN_Shapefile.initialize(BN_Shapefile.java:337) at utilities.shapeFiles.BN_Shapefile.<init>(BN_Shapefile.java:289) at module.GeoImageLoader.GeoImageLoader$1.run(GeoImageLoader.java:760) at java.base/java.lang.Thread.run(Unknown Source) Caused by: java.lang.NoSuchFieldError: JAVA_9 at org.geotools.util.NIOUtilities.clean(NIOUtilities.java:207) at org.geotools.util.NIOUtilities.clean(NIOUtilities.java:185) at org.geotools.data.shapefile.shp.IndexFile.readRecords(IndexFile.java:150) at org.geotools.data.shapefile.shp.IndexFile.<init>(IndexFile.java:95) ... 6 more Aug 14, 2019 2:00:33 PM org.geotools.data.shapefile.shp.ShapefileReader <init> WARNING: Could not open the .shx file, continuing assuming the .shp file is not sparse java.io.IOException: JAVA_9 at org.geotools.data.shapefile.shp.IndexFile.<init>(IndexFile.java:102) at org.geotools.data.shapefile.shp.ShapefileReader.<init>(ShapefileReader.java:266) at org.geotools.data.shapefile.ShapefileSetManager.openShapeReader(ShapefileSetManager.java:48) at org.geotools.data.shapefile.ShapefileFeatureSource.readAttributes(ShapefileFeatureSource.java:520) at org.geotools.data.shapefile.ShapefileFeatureSource.buildFeatureType(ShapefileFeatureSource.java:479) at org.geotools.data.store.ContentFeatureSource.getAbsoluteSchema(ContentFeatureSource.java:327) at org.geotools.data.store.ContentFeatureSource.getSchema(ContentFeatureSource.java:296) at org.geotools.data.store.ContentFeatureCollection.<init>(ContentFeatureCollection.java:69) at org.geotools.data.store.ContentFeatureSource.getFeatures(ContentFeatureSource.java:545) at org.geotools.data.store.ContentFeatureSource.getFeatures(ContentFeatureSource.java:105) at utilities.shapeFiles.BN_Shapefile.initialize(BN_Shapefile.java:365) at utilities.shapeFiles.BN_Shapefile.<init>(BN_Shapefile.java:289) at module.GeoImageLoader.GeoImageLoader$1.run(GeoImageLoader.java:760) at java.base/java.lang.Thread.run(Unknown Source) Caused by: java.lang.NoSuchFieldError: JAVA_9 at org.geotools.util.NIOUtilities.clean(NIOUtilities.java:207) at org.geotools.util.NIOUtilities.clean(NIOUtilities.java:185) at org.geotools.data.shapefile.shp.IndexFile.readRecords(IndexFile.java:150) at org.geotools.data.shapefile.shp.IndexFile.<init>(IndexFile.java:95) ... 13 more Aug 14, 2019 2:00:33 PM org.geotools.data.shapefile.files.ShpFiles logCurrentLockers SEVERE: The following locker still has a lock: read on http://volans.airportnetwork.com/ClientFiles/Heathrow/Projects/$Overlays/egll_ipa27L_4000_lmax55-75.shp by org.geotools.data.shapefile.shp.ShapefileReader Exception in thread "Thread-43" java.lang.NoSuchFieldError: JAVA_9 at org.geotools.util.NIOUtilities.clean(NIOUtilities.java:207) at org.geotools.util.NIOUtilities.clean(NIOUtilities.java:185) at org.geotools.data.shapefile.dbf.DbaseFileReader.close(DbaseFileReader.java:300) at org.geotools.data.shapefile.ShapefileFeatureSource.readAttributes(ShapefileFeatureSource.java:586) at org.geotools.data.shapefile.ShapefileFeatureSource.buildFeatureType(ShapefileFeatureSource.java:479) at org.geotools.data.store.ContentFeatureSource.getAbsoluteSchema(ContentFeatureSource.java:327) at org.geotools.data.store.ContentFeatureSource.getSchema(ContentFeatureSource.java:296) at org.geotools.data.store.ContentFeatureCollection.<init>(ContentFeatureCollection.java:69) at org.geotools.data.store.ContentFeatureSource.getFeatures(ContentFeatureSource.java:545) at org.geotools.data.store.ContentFeatureSource.getFeatures(ContentFeatureSource.java:105) at utilities.shapeFiles.BN_Shapefile.initialize(BN_Shapefile.java:365) at utilities.shapeFiles.BN_Shapefile.<init>(BN_Shapefile.java:289) at module.GeoImageLoader.GeoImageLoader$1.run(GeoImageLoader.java:760) at java.base/java.lang.Thread.run(Unknown Source) -- Regards, Andrea Aime == GeoServer Professional Services from the experts! Visit http://goo.gl/it488V for more information. == Ing. Andrea Aime @geowolf Technical Lead GeoSolutions S.A.S. Via di Montramito 3/A 55054 Massarosa (LU) phone: +39 0584 962313 fax: +39 0584 1660272 mob: +39 339 8844549 http://www.geo-solutions.it http://twitter.com/geosolutions_it ------------------------------------------------------- Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni circostanza inerente alla presente email (il suo contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le sarei comunque grato se potesse darmene notizia. This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. We remind that - as provided by European Regulation 2016/679 “GDPR” - copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you have received this email by mistake, please notify us immediately by telephone or e-mail.
_______________________________________________ GeoTools-GT2-Users mailing list GeoTools-GT2-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users