diff --git a/boon/src/main/java/org/boon/core/Sys.java b/boon/src/main/java/org/boon/core/Sys.java
index <HASH>..<HASH> 100644
--- a/boon/src/main/java/org/boon/core/Sys.java
+++ b/boon/src/main/java/org/boon/core/Sys.java
@@ -214,7 +214,7 @@ public class Sys {
             Class.forName ( "javax.servlet.http.HttpServlet" );
 
             _inContainer = true;
-        } catch ( ClassNotFoundException e ) {
+        } catch ( Throwable e ) {
             _inContainer = false;
         }
         if ( !_inContainer ) {
@@ -222,7 +222,7 @@ public class Sys {
                 Class.forName ( "javax.ejb.EJBContext" );
 
                 _inContainer = true;
-            } catch ( ClassNotFoundException e ) {
+            } catch ( Throwable e ) {
                 _inContainer = false;
             }
Protect against unloadable classes, close #<I>