Henry Genet created SEDONA-478: ---------------------------------- Summary: Sedona 1.5.1 context initialization fails without GeoTools coverage Key: SEDONA-478 URL: https://issues.apache.org/jira/browse/SEDONA-478 Project: Apache Sedona Issue Type: Bug Affects Versions: 1.5.1 Reporter: Henry Genet
If GeoTools _coverage_ module isn't on the classpath, UDF registration fails during context initialization: {code:java} [info] java.lang.NoClassDefFoundError: Could not initialize class org.apache.sedona.sql.UDF.Catalog$ [info] at org.apache.sedona.sql.UDF.UdfRegistrator$.registerAll(UdfRegistrator.scala:31) [info] at org.apache.sedona.spark.SedonaContext$.create(SedonaContext.scala:51) [info] ... [info] Cause: java.lang.ExceptionInInitializerError: Exception scala.ScalaReflectionException: class org.geotools.coverage.grid.GridCoverage2D in JavaMirror with jdk.internal.loader.ClassLoaders$AppClassLoader@251a69d7 of type class jdk.internal.loader.ClassLoaders$AppClassLoader with classpath [<unknown>] and parent being jdk.internal.loader.ClassLoaders$PlatformClassLoader@4569b692 of type class jdk.internal.loader.ClassLoaders$PlatformClassLoader with classpath [<unknown>] and parent being primordial classloader with boot classpath [<unknown>] not found. [in thread "pool-1-thread-1"] [info] at scala.reflect.internal.Mirrors$RootsBase.staticClass(Mirrors.scala:141) [info] at scala.reflect.internal.Mirrors$RootsBase.staticClass(Mirrors.scala:29) [info] at org.apache.spark.sql.sedona_sql.expressions.raster.RS_Union_Aggr$$typecreator1$1.apply(AggregateFunctions.scala:123) ... [info] at org.apache.spark.sql.sedona_sql.expressions.raster.RS_Union_Aggr.<init>(AggregateFunctions.scala:123) [info] at org.apache.sedona.sql.UDF.Catalog$.<init>(Catalog.scala:271) [info] at org.apache.sedona.sql.UDF.Catalog$.<clinit>(Catalog.scala) {code} This is an issue for projects that don't want the full GeoTools suite, whether through the wrapper or not. -- This message was sent by Atlassian Jira (v8.20.10#820010)