Author: jfclere
Date: Tue Jun 24 05:26:55 2008
New Revision: 671153

URL: http://svn.apache.org/viewvc?rev=671153&view=rev
Log:
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.

Modified:
    tomcat/connectors/trunk/jni/java/org/apache/tomcat/jni/Library.java

Modified: tomcat/connectors/trunk/jni/java/org/apache/tomcat/jni/Library.java
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jni/java/org/apache/tomcat/jni/Library.java?rev=671153&r1=671152&r2=671153&view=diff
==============================================================================
--- tomcat/connectors/trunk/jni/java/org/apache/tomcat/jni/Library.java 
(original)
+++ tomcat/connectors/trunk/jni/java/org/apache/tomcat/jni/Library.java Tue Jun 
24 05:26:55 2008
@@ -33,6 +33,7 @@
     static private Library _instance = null;
 
     private Library()
+        throws Exception
     {
         boolean loaded = false;
         String err = "";
@@ -42,6 +43,16 @@
                 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<paths.length; j++) {
+                    java.io.File fd = new java.io.File(paths[j] + 
System.getProperty("file.separator") + name);
+                    if (fd.exists()) {
+                        e.printStackTrace();
+                    }
+                }
                 if ( i > 0)
                     err += ", ";
                 err +=  e.getMessage();



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to