Hi Andrea, Thanks for getting back with me. I know we have other libraries compiled in Java 8 that work, so that must not be the problem.
Do you have any thoughts about why I would be getting the error: java.lang.NoClassDefFoundError: org/geotools/data/shapefile/files/FileReader? I’ve added all JAR files that came with the geotools-21.2-bin.zip to my class path except I removed the extra epsg jars (only have gt-epsg-extension and gt-epsg-hsql), all gdal jars since I am using gdal in the project as well (I have tried removing gdal from my project and still get the same error), the arcsde jars, and the oracle jars mentioned in the quick start guide. Which jar is org/geotools/data/shapefile/files/FileReader located in? I really need to get this figured out since we have begun to move our clients to a packaged install of our application and just discovered this past week that all or our shapefile handling is not working due to the version of GeoTools we were using. Any suggestions would be appreciated. Thanks, Rob From: Andrea Aime <andrea.a...@geo-solutions.it> Sent: Sunday, August 11, 2019 1:42 AM To: Rob <rob_mil...@hotmail.com> Cc: ijtur...@gmail.com; geotools-gt2-users@lists.sourceforge.net Subject: Re: [Geotools-gt2-users] GeoTools 21.2 and Java 12 They are built with java 8, but work fine with java 11 too, I've run a GeoServer with java 11 just yesterday for some tests. Cheers Andrea On Sun, Aug 11, 2019 at 3:52 AM Rob <rob_mil...@hotmail.com<mailto:rob_mil...@hotmail.com>> wrote: Are the JAR files that are in the geotools-21.2-bin.zip from SOURCEFORGE compiled with Java 11 with source/binary format JDK 11? Or are they compiled with source/binary format JDK 8? From: Rob Sent: Saturday, August 10, 2019 7:12 PM To: andrea.a...@geo-solutions.it<mailto:andrea.a...@geo-solutions.it>; ijtur...@gmail.com<mailto:ijtur...@gmail.com> Cc: geotools-gt2-users@lists.sourceforge.net<mailto:geotools-gt2-users@lists.sourceforge.net> Subject: RE: [Geotools-gt2-users] GeoTools 21.2 and Java 12 So I spent time removing a bunch of other dependencies and moving the references to the GeoTools dependencies as first in the list (using NetBeans IDE). Now when I attempt to load a shapefile which initializes a class that has imported org.geotools.data.FeatureSource I get the following error: Exception in thread "Thread-40" java.lang.NoClassDefFoundError: org/geotools/data/shapefile/files/FileReader at module.GeoImageLoader.GeoImageLoader$1.run(GeoImageLoader.java:759) at java.base/java.lang.Thread.run(Thread.java:834) Caused by: java.lang.ClassNotFoundException: org.geotools.data.shapefile.files.FileReader at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521) ... 2 more From: Rob Sent: Saturday, August 10, 2019 6:15 PM To: andrea.a...@geo-solutions.it<mailto:andrea.a...@geo-solutions.it>; ijtur...@gmail.com<mailto:ijtur...@gmail.com> Cc: geotools-gt2-users@lists.sourceforge.net<mailto:geotools-gt2-users@lists.sourceforge.net> Subject: RE: [Geotools-gt2-users] GeoTools 21.2 and Java 12 Hi Andrea and Ian, Thank you both for the responses. Supporting only the LTSs makes perfect sense. I’m also part of a very small development team working on a Java project that started with Java 6 and includes dozens of 3rd party libraries… as we try to make the transition to Java 9+. So I understand limited resources and the issues of responding to all the Java changes. Based on your responses I have modified our project to use Java 11. I’ve also verified that the correct imports exist for the features/classes being used. However, after these changes I’m getting the exact same error that I first reported. My suspicion is that this is the result of a dependencies conflict. But I’m not sure how to track that down. I’ve spent literally about 45 hours over the past 3 days trying to figure this out. Any additional ideas or suggestions would be greatly appreciated! Rob From: Andrea Aime <andrea.a...@geo-solutions.it<mailto:andrea.a...@geo-solutions.it>> Sent: Saturday, August 10, 2019 4:39 AM To: Rob <rob_mil...@hotmail.com<mailto:rob_mil...@hotmail.com>> Cc: geotools-gt2-users@lists.sourceforge.net<mailto:geotools-gt2-users@lists.sourceforge.net> Subject: Re: [Geotools-gt2-users] GeoTools 21.2 and Java 12 On Sat, Aug 10, 2019 at 7:22 AM Rob <rob_mil...@hotmail.com<mailto:rob_mil...@hotmail.com>> wrote: Exception in thread "Thread-41" java.lang.NoClassDefFoundError: Could not initialize class org.geotools.referencing.cs.DefaultCoordinateSystemAxis Says here "could not initialize", means the class is actually found but creation of some static field failed. Can well be an issue specific to java 12, adding to what Ian said, we support only Java 8 and 11, not because we don't like the others, but due to lack of developers dedicated to the task. If you like to investigate and propose changes to make it run on java 8, 11 and also 12, they would be appreciated! The idea is that GeoTools will only support LTSs, so the next target will be Java 14, once it's out and we can gather enough people to run another code sprint for upgrading to it. Cheers Andrea == 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. -- 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