cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r830196 - /cxf/trunk/common/common/src/main/java/org/apache/cxf/common/logging/LogUtils.java
Date Tue, 27 Oct 2009 14:20:40 GMT
Author: dkulp
Date: Tue Oct 27 14:20:39 2009
New Revision: 830196

URL: http://svn.apache.org/viewvc?rev=830196&view=rev
Log:
A NoClassDefFoundError could also be thrown, not just
ClassNotFoundException.   Make sure we catch Throwable.

Modified:
    cxf/trunk/common/common/src/main/java/org/apache/cxf/common/logging/LogUtils.java

Modified: cxf/trunk/common/common/src/main/java/org/apache/cxf/common/logging/LogUtils.java
URL: http://svn.apache.org/viewvc/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/logging/LogUtils.java?rev=830196&r1=830195&r2=830196&view=diff
==============================================================================
--- cxf/trunk/common/common/src/main/java/org/apache/cxf/common/logging/LogUtils.java (original)
+++ cxf/trunk/common/common/src/main/java/org/apache/cxf/common/logging/LogUtils.java Tue
Oct 27 14:20:39 2009
@@ -81,8 +81,10 @@
                                             Thread.currentThread().getContextClassLoader());
                 getLogger(LogUtils.class).fine("Using " + loggerClass.getName() + " for logging.");
             }
-        } catch (Exception ex) {
-            //ignore
+        } catch (Throwable ex) {
+            //ignore - if we get here, some issue prevented the logger class from being loaded.
+            //maybe a ClassNotFound or NoClassDefFound or similar.   Just use j.u.l
+            loggerClass = null;
         }
     }
     



Mime
View raw message