Cannot Log In Error Message javax.servlet.ServletException: java.lang.ExceptionInInitializerError
Symptoms
When users try to log in to the application, it always raises the error javax.servlet.ServletException: java.lang.ExceptionInInitializerError.
Cause
This error happens when something goes wrong while starting the OpenKM repository. Possible causes are:
- Unexpected or improper server shutdown that has corrupted the Lucene search engine.
- The OpenKM application stopped unexpectedly. Usually the process was killed while the Lucene search engine was still performing some operations in the background.
Diagnosis
Check the application log for Lucene search engine errors.
Caused by: org.apache.lucene.store.LockObtainFailedException: Lock obtain timed out: SimpleFSLock@/opt/tomcat/repository/index/com.openkm.dao.bean.NodeBase/write.lock
at org.apache.lucene.store.Lock.obtain(Lock.java:84)
at org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:1097)
at org.hibernate.search.store.DirectoryProviderHelper.initializeIndexIfNeeded(DirectoryProviderHelper.java:159)
... 33 more
Solution
If the log file shows a "write.lock" error, simply - with OpenKM stopped - remove the two write.lock files from $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 previous step does not solve the error, you must rebuild the entire search index. To do this - with OpenKM stopped - delete the folder $TOMCAT_HOME/repository/index. Start OpenKM and then, from Administration, execute the action "Rebuild Indexes".
Take into consideration that the Rebuild Indexes action can take a long time - hours - depending on your repository size. During the process, the repository is in read-only status and users are not recommended to access it until the action is finished.
Properties
Properties | |
---|---|
Date |
2016-07-31 |
Applies to |
|
Keywords
- AllVersions