diff --git a/src/main/java/org/htmlunit/javascript/JavaScriptEngine.java b/src/main/java/org/htmlunit/javascript/JavaScriptEngine.java
index 23b5379804..08ad52480d 100644
--- a/src/main/java/org/htmlunit/javascript/JavaScriptEngine.java
+++ b/src/main/java/org/htmlunit/javascript/JavaScriptEngine.java
@@ -529,7 +529,7 @@ private static void removePrototypeProperties(final Scriptable scope, final Stri
* @throws IllegalArgumentException
*/
public static HtmlUnitScriptable configureClass(final ClassConfiguration config, final Scriptable window)
- throws InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException, SecurityException {
+ throws Exception {
final HtmlUnitScriptable prototype = config.getHostClass().getDeclaredConstructor().newInstance();
prototype.setParentScope(window);