Cannot Login Error Message javax.servlet.ServletException: java.lang.ExceptionInInitializerError


When the users are trying to login into the application is always raising the error javax.servlet.ServletException: java.lang.ExceptionInInitializerError.


This error happens when something has gone wrong while starting the openkm repository, possible causes are:

  • Unexpected or wrong server shutdown what has corrupted Lucene Search Engine.
  • The OpenKM application has stopped incorrectly. Usually the process has been killed while the Lucene Search Engine was still perfoming some operations in background.


Check the log of the application looking for Lucene Search Engine errors.

Caused by: Lock obtain timed out: SimpleFSLock@/opt/tomcat/repository/index/com.openkm.dao.bean.NodeBase/write.lock
    at org.apache.lucene.index.IndexWriter.<init>(
    ... 33 more


In case in log file is shown a "write.lock" error, simply - with OpenKM stopped - remove the two write.lock files into $TOMCAT_HOME/repository/index/com.openkm.dao.bean.NodeBase and $TOMCAT_HOME/repository/index/com.openkm.dao.bean.NodeDocument and start the application again.

If the step before not solves the error, then you must rebuild entire search index. For it - with OpenKM stopped - delete the folder $TOMCAT_HOME/repository/index. Start OpenKM and then from Administration execute the action "Rebuild Indexes".

Take in consideration, the Rebuild Indexes action can take a lot of time - hours - depending your repository size. During the process the repository in under read only status and is not recommended users access on it until the action be finished.





Applies to

  • Frontend
  • Core


  • AllVersions