andygrove commented on code in PR #1000:
URL: https://github.com/apache/datafusion-comet/pull/1000#discussion_r1810954452


##########
common/src/main/java/org/apache/comet/NativeBase.java:
##########
@@ -46,15 +46,24 @@ public abstract class NativeBase {
 
   private static final String libraryToLoad = 
System.mapLibraryName(NATIVE_LIB_NAME);
   private static boolean loaded = false;
+  private static Throwable loadErr = null;
   private static final String searchPattern = "libcomet-";
 
   static {
-    if (!isLoaded()) {
+    try {
       load();
+    } catch (Throwable th) {
+      LOG.warn("Failed to load comet library", th);
+      // logging may not be initialized yet, so also write to stderr
+      System.err.println("Failed to load comet library: " + th.getMessage());
+      loadErr = th;
     }
   }
 
-  public static synchronized boolean isLoaded() {
+  public static synchronized boolean isLoaded() throws Throwable {

Review Comment:
   Correction: calling isLoaded could have resulted in the 
`NoClassDefFoundError` but this did not have details of root cause.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to