diff --git a/exist-core/src/main/java/org/exist/collections/triggers/XQueryTrigger.java b/exist-core/src/main/java/org/exist/collections/triggers/XQueryTrigger.java index 420dd1f4dc4..0a50ddaf9e1 100644 --- a/exist-core/src/main/java/org/exist/collections/triggers/XQueryTrigger.java +++ b/exist-core/src/main/java/org/exist/collections/triggers/XQueryTrigger.java @@ -405,6 +405,7 @@ private void execute(final TriggerPhase phase, final TriggerEvent event, final D compiledQuery = getScript(broker, transaction); if (compiledQuery == null) { // NOTE: can occur if there is no such XQueryTrigger library module available in the database + TriggerStatePerThread.clearIfFinished(phase); return; } } catch (final TriggerException e) {