How do I resolve Artifactory startup failure due to database related issues?

If Artifactory does not start and you see an error similar to below in your localhost log, then the issue could be related to the database lock files not being deleted as expected.


Aug 07, 2014 10:34:32 AM org.apache.catalina.core.StandardWrapperValve invoke

SEVERE: Servlet.service() for servlet [default] in context with path [/artifactory] threw exception

org.artifactory.storage.StorageException: Could not execute search query for username=’build_user’

 at org.artifactory.storage.db.security.service.UserGroupServiceImpl.findUser(UserGroupServiceImpl.java:103)

 at sun.reflect.GeneratedMethodAccessor90.invoke(Unknown Source)

 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

…..


To resolve this issue, please delete the db.lck + dbex.lck files from the $ARTIFACTORY_HOME/data/derby/ folder.