diff --git a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/JavaDialect.java b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/JavaDialect.java
index <HASH>..<HASH> 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/JavaDialect.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/JavaDialect.java
@@ -394,6 +394,7 @@ public class JavaDialect
      */
     public void compileAll() {
         if ( this.generatedClassList.isEmpty() ) {
+            this.errorHandlers.clear();
             return;
         }
         final String[] classes = new String[this.generatedClassList.size()];
@@ -429,6 +430,7 @@ public class JavaDialect
 
         // We've compiled everthing, so clear it for the next set of additions
         this.generatedClassList.clear();
+        this.errorHandlers.clear();
     }
 
     /**
Fix ClassLoader leak during incremental compilation