Describe the bug
Comet uses Class.forName(className) to reflectively load Iceberg classes. The single-argument Class.forName uses the classloader of the calling class. When the Comet JAR is placed in Spark's jars/ folder (system classloader) and Iceberg classes are bundled in the user's application uber JAR, these calls fail with ClassNotFoundException because parent classloaders cannot see classes loaded by child classloaders.
Steps to reproduce
- Place the Comet JAR in Spark's
jars/ folder
- Bundle Iceberg classes in the application uber JAR
- Submit the application — Iceberg scan operations fail with
ClassNotFoundException
Expected behavior
Comet should be able to load the Iceberg classes in all cases
Additional context
No response