diff --git a/src/main/java/org/openhab/automation/jrule/internal/engine/JRuleEngine.java b/src/main/java/org/openhab/automation/jrule/internal/engine/JRuleEngine.java index b81ba985..0696e74e 100644 --- a/src/main/java/org/openhab/automation/jrule/internal/engine/JRuleEngine.java +++ b/src/main/java/org/openhab/automation/jrule/internal/engine/JRuleEngine.java @@ -535,7 +535,7 @@ private void invokeRuleInternal(JRuleExecutionContext context, JRuleEvent event) ExceptionUtils.getStackTrace(e)); } catch (InvocationTargetException e) { JRuleLog.error(logger, context.getMethod().getName(), "Error in rule: {}", - ExceptionUtils.getStackTrace(e.getCause())); + ExceptionUtils.getStackTrace(e.getTargetException())); } finally { Arrays.stream(context.getLoggingTags()).forEach(MDC::remove); MDC.remove(MDC_KEY_RULE);