commit | 87f6013c156b232d8e2667526a4f3e3408ffc798 | [log] [tgz] |
---|---|---|
author | Felix Meschberger <fmeschbe@apache.org> | Tue Jan 12 08:37:43 2010 +0000 |
committer | Felix Meschberger <fmeschbe@apache.org> | Tue Jan 12 08:37:43 2010 +0000 |
tree | a40649682f7ef3cd4cc1ccefec887a5bc522cc92 | |
parent | 02fe056ab75280346c38c4f479e54e5442aa1e62 [diff] |
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 );