Index: exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/MultiIndex.java
===================================================================
--- exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/MultiIndex.java	(revision 5928)
+++ exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/MultiIndex.java	(working copy)
@@ -3300,7 +3300,7 @@
          switch (mode)
          {
             case READ_ONLY :
-               setReadOny();
+               setReadOnly();
                break;
             case READ_WRITE :
                setReadWrite();
@@ -3316,7 +3316,7 @@
    /**
     * Sets mode to READ_ONLY, discarding flush task
     */
-   protected void setReadOny()
+   protected void setReadOnly()
    {
       // try to stop merger in safe way
       if (merger != null)
@@ -3325,7 +3325,10 @@
          merger = null;
       }
 
-      flushTask.cancel();
+      if (flushTask != null)
+      {
+         flushTask.cancel();
+      }
       FLUSH_TIMER.purge();
       this.redoLog = null;
    }
