FELIX-1988 Better handle situation where ShellService class is not available

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@911384 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/webconsole/src/main/java/org/apache/felix/webconsole/internal/misc/ShellServlet.java b/webconsole/src/main/java/org/apache/felix/webconsole/internal/misc/ShellServlet.java
index e4aecdf..e0c5d7f 100644
--- a/webconsole/src/main/java/org/apache/felix/webconsole/internal/misc/ShellServlet.java
+++ b/webconsole/src/main/java/org/apache/felix/webconsole/internal/misc/ShellServlet.java
@@ -45,7 +45,7 @@
     private static final String LABEL = "shell";
     private static final String TITLE = "Shell";
     private static final String[] CSS = { "/res/ui/shell.css" };
-    
+
     // templates
     private final String TEMPLATE;
 
@@ -55,7 +55,7 @@
         super(LABEL, TITLE, CSS);
 
         // load templates
-        TEMPLATE = readTemplateFile( "/templates/shell.html" ); 
+        TEMPLATE = readTemplateFile( "/templates/shell.html" );
     }
 
 
@@ -128,7 +128,12 @@
 
     private final ShellService getShellService()
     {
-        return ((ShellService) getService(ShellService.class.getName()));
+        try {
+            return ((ShellService) getService(ShellService.class.getName()));
+        } catch (NoClassDefFoundError ncdfe) {
+            // shell service class not available
+        }
+        return null;
     }
 
 }