From cb01eb225d7b30bedcdbaa46737c813fd62a0d75 Mon Sep 17 00:00:00 2001 From: rjung Date: Tue, 3 Nov 2009 00:00:18 +0000 Subject: [PATCH] Port r671153 and r671459 from tcnative branch 1.1.x to Tomcat trunk: Log the exception when the file we dlopen exists. Otherwise errors like: +++ java.lang.UnsatisfiedLinkError: /home/jfclere/jbossweb_trunk/output/build/bin/META-INF/lib/linux2/x64/libaprutil-1.so.0.2.8: libpq.so.3: cannot open shared object file: No such file or directory +++ Can't be traced. git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@832211 13f79535-47bb-0310-9956-ffa450edef68 --- java/org/apache/tomcat/jni/Library.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/java/org/apache/tomcat/jni/Library.java b/java/org/apache/tomcat/jni/Library.java index d178c7892..749df3fac 100644 --- a/java/org/apache/tomcat/jni/Library.java +++ b/java/org/apache/tomcat/jni/Library.java @@ -33,6 +33,7 @@ public final class Library { static private Library _instance = null; private Library() + throws Exception { boolean loaded = false; String err = ""; @@ -42,6 +43,16 @@ public final class Library { loaded = true; } catch (Throwable e) { + String name = System.mapLibraryName(NAMES[i]); + String path = System.getProperty("java.library.path"); + String sep = System.getProperty("path.separator"); + String [] paths = path.split(sep); + for (int j=0; j 0) err += ", "; err += e.getMessage(); -- 2.11.0