Index initialization fails unexpectedly during platform startup
Received problem report contained the following exception. We have seen these index initialization problems before but they have been hard to replicate and debug.
The stack trace seems to be missing some of the most inner stack frames.
org.simantics.PlatformException: org.simantics.project.exception.ProjectException: org.simantics.db.exception.DatabaseException: org.simantics.db.layer0.genericrelation.IndexException: Searcher is in problematic state
Caused by: org.simantics.project.exception.ProjectException: org.simantics.db.exception.DatabaseException: org.simantics.db.layer0.genericrelation.IndexException: Searcher is in problematic state
at org.simantics.modeling.LifeCycleProcesses.configure(LifeCycleProcesses.java:61)
at org.simantics.project.impl.Project.activate(Project.java:124)
at org.simantics.SimanticsPlatform.startUp(SimanticsPlatform.java:913)
at org.simantics.workbench.internal.SimanticsWorkbenchAdvisor.startPlatform(SimanticsWorkbenchAdvisor.java:438)
at org.simantics.workbench.internal.SimanticsWorkbenchAdvisor.openWindows(SimanticsWorkbenchAdvisor.java:328)
at org.eclipse.ui.internal.Workbench$19.runWithException(Workbench.java:1690)
at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:32)
at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233)
at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144)
at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889)
at org.eclipse.ui.internal.StartupThreading.runWithoutExceptions(StartupThreading.java:95)
at org.eclipse.ui.internal.Workbench.init(Workbench.java:1682)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2848)
at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:667)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
at org.simantics.workbench.internal.SimanticsWorkbenchApplication.start(SimanticsWorkbenchApplication.java:152)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590)
at org.eclipse.equinox.launcher.Main.run(Main.java:1499)
Caused by: org.simantics.db.exception.DatabaseException: org.simantics.db.layer0.genericrelation.IndexException: Searcher is in problematic state
at org.simantics.db.impl.query.CacheEntryBase.checkAndThrow(CacheEntryBase.java:123)
at org.simantics.db.impl.query.ReadEntry.get(ReadEntry.java:154)
at org.simantics.db.impl.query.QueryProcessor.performForEach(QueryProcessor.java:1068)
at org.simantics.db.impl.query.QueryProcessor.queryRead(QueryProcessor.java:858)
at org.simantics.db.impl.graph.ReadGraphImpl.syncRequest(ReadGraphImpl.java:2027)
at org.simantics.db.impl.graph.ReadGraphImpl.syncRequest(ReadGraphImpl.java:2014)
at org.simantics.modeling.ModelingUtils.searchByTypeShallow(ModelingUtils.java:756)
at org.simantics.modeling.LifeCycleProcesses$1.run(LifeCycleProcesses.java:35)
at org.simantics.db.common.request.ReadRequest.perform(ReadRequest.java:21)
at fi.vtt.simantics.procore.internal.SessionImplSocket$6.run(SessionImplSocket.java:1541)
at fi.vtt.simantics.procore.internal.SessionRequestManager$1.run(SessionRequestManager.java:123)
at org.simantics.db.impl.query.QueryThread.run(QueryThread.java:251)
Caused by: org.simantics.db.layer0.genericrelation.IndexException: Searcher is in problematic state
at org.simantics.db.indexing.IndexedRelationsImpl.waitLoaded(IndexedRelationsImpl.java:160)
at org.simantics.db.indexing.IndexedRelationsImpl.queryResources(IndexedRelationsImpl.java:308)
at org.simantics.db.layer0.genericrelation.DependenciesRelation.queryResources(DependenciesRelation.java:253)
at org.simantics.db.layer0.genericrelation.DependencyResources.apply(DependencyResources.java:70)
at org.simantics.db.layer0.genericrelation.DependencyResources.apply(DependencyResources.java:54)
at org.simantics.db.layer0.genericrelation.DependencyResources.apply(DependencyResources.java:1)
at org.simantics.db.layer0.adapter.impl.EntityInstances$QueryIndex.perform(EntityInstances.java:86)
at org.simantics.db.layer0.adapter.impl.EntityInstances$QueryIndex.perform(EntityInstances.java:1)
at org.simantics.db.impl.query.QueryProcessor.performForEach(QueryProcessor.java:1058)
... 9 more
Caused by: java.lang.IllegalStateException: Immutable index cannot be cleared