1

The generation of the native image with GraalVM of my application in Quarkus breaks when I'm using the geotools library

I need to find a workarround because I use geotools to read shapefile (SHP format) and convert it to WKT format.

Does anyone know of an alternative to solve this?

I reference these classes in my code:

import org.geotools.data.DataStore;
import org.geotools.data.DataStoreFinder;
import org.geotools.data.FeatureSource;
import org.geotools.feature.FeatureCollection;
import org.geotools.feature.FeatureIterator;
Aloisio
  • 51
  • 1
  • 3
  • what breaks exactly? Is there an error message? – Ian Turton May 05 '22 at 07:16
  • It starts with "java.lang.NoClassDefFoundError: Could not initialize class javax.media.jai.JAI" But after thar others NoClassDefFoundError appear The problem is Quarkus cannot compile natively if there are handcrafted Singletons like public class MyClass { public static final INSTANCE = new MyClass() ... } – Aloisio May 05 '22 at 14:37
  • I guess I will give up Geotools... but first I need to find another library that reads shapefiles – Aloisio May 05 '22 at 14:40
  • I've no idea what Quarkus is, but that sounds like a bug at their end to me – Ian Turton May 05 '22 at 15:34
  • Quarkus is a modern java framework, developed by RedHat and taylored to be a container-first solution. You cab know more in https://quarkus.io/ – Aloisio May 05 '22 at 16:43

0 Answers0