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;
         }
     }
     


Reply via email to