FELIX-1977 Improved log message if a plugin class cannot be loaded.

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@898253 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/webconsole/src/main/java/org/apache/felix/webconsole/internal/servlet/OsgiManager.java b/webconsole/src/main/java/org/apache/felix/webconsole/internal/servlet/OsgiManager.java
index cdb3883..2ce13f8 100644
--- a/webconsole/src/main/java/org/apache/felix/webconsole/internal/servlet/OsgiManager.java
+++ b/webconsole/src/main/java/org/apache/felix/webconsole/internal/servlet/OsgiManager.java
@@ -252,6 +252,16 @@
                     }
                 }
             }
+            catch ( NoClassDefFoundError ncdfe )
+            {
+                String message = ncdfe.getMessage();
+                if ( message.indexOf( ' ' ) < 0 )
+                {
+                    // message is just a class name, try to be more descriptive
+                    message = "Class " + message + " missing";
+                }
+                log.log( LogService.LOG_INFO, pluginClassName + " not installed. Reason: " + message );
+            }
             catch ( Throwable t )
             {
                 log.log( LogService.LOG_INFO, "Failed to instantiate plugin " + pluginClassName + ". Reason: " + t );