【IDEA】com.intellij.openapi.project.IndexNotReadyException 不念不忘少年蓝@ 2021-07-26 11:22 691阅读 0赞 **【问题描述】** 在IDEA中运行基于Maven构建Springboot项目时,报了如下的错误: com.intellij.openapi.project.IndexNotReadyException: Please change caller according to com.intellij.openapi.project.IndexNotReadyException documentation at com.intellij.openapi.project.IndexNotReadyException.create(IndexNotReadyException.java:77) at com.intellij.util.indexing.FileBasedIndexImpl.handleDumbMode(FileBasedIndexImpl.java:777) at com.intellij.util.indexing.FileBasedIndexImpl.ensureUpToDate(FileBasedIndexImpl.java:726) at com.intellij.util.indexing.FileBasedIndexImpl.ensureUpToDate(FileBasedIndexImpl.java:709) at com.intellij.psi.stubs.StubIndexImpl.doProcessStubs(StubIndexImpl.java:305) at com.intellij.psi.stubs.StubIndexImpl.processElements(StubIndexImpl.java:281) at com.intellij.psi.stubs.StubIndex.getElements(StubIndex.java:121) at com.intellij.psi.stubs.StubIndex.getElements(StubIndex.java:109) at com.intellij.psi.impl.java.stubs.index.JavaFullClassNameIndex.get(JavaFullClassNameIndex.java:47) at com.intellij.psi.impl.file.impl.JavaFileManagerImpl.doFindClasses(JavaFileManagerImpl.java:88) at com.intellij.psi.impl.file.impl.JavaFileManagerImpl.findClass(JavaFileManagerImpl.java:123) at com.intellij.psi.impl.PsiElementFinderImpl.findClass(PsiElementFinderImpl.java:38) at com.intellij.psi.impl.JavaPsiFacadeImpl.doFindClass(JavaPsiFacadeImpl.java:116) at com.intellij.psi.impl.JavaPsiFacadeImpl.findClass(JavaPsiFacadeImpl.java:93) at com.intellij.psi.util.InheritanceUtil.isInheritor(InheritanceUtil.java:94) at com.intellij.psi.util.InheritanceUtil.isInheritor(InheritanceUtil.java:85) at in.oneton.idea.spring.assistant.plugin.misc.PsiCustomUtil.isClassSameOrDescendantOf(PsiCustomUtil.java:287) at in.oneton.idea.spring.assistant.plugin.misc.PsiCustomUtil.isMap(PsiCustomUtil.java:277) at in.oneton.idea.spring.assistant.plugin.misc.PsiCustomUtil.getSuggestionNodeType(PsiCustomUtil.java:203) at in.oneton.idea.spring.assistant.plugin.suggestion.metadata.MetadataNonPropertySuggestionNode.updateGroupType(MetadataNonPropertySuggestionNode.java:546) at in.oneton.idea.spring.assistant.plugin.suggestion.metadata.MetadataNonPropertySuggestionNode.setGroup(MetadataNonPropertySuggestionNode.java:445) at in.oneton.idea.spring.assistant.plugin.suggestion.service.SuggestionServiceImpl.addGroupsToIndex(SuggestionServiceImpl.java:578) at in.oneton.idea.spring.assistant.plugin.suggestion.service.SuggestionServiceImpl.buildMetadataHierarchy(SuggestionServiceImpl.java:459) at in.oneton.idea.spring.assistant.plugin.suggestion.service.SuggestionServiceImpl.processContainers(SuggestionServiceImpl.java:412) at in.oneton.idea.spring.assistant.plugin.suggestion.service.SuggestionServiceImpl.reindexModule(SuggestionServiceImpl.java:449) at in.oneton.idea.spring.assistant.plugin.suggestion.service.SuggestionServiceImpl.lambda$null$8(SuggestionServiceImpl.java:154) at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:945) at in.oneton.idea.spring.assistant.plugin.suggestion.service.SuggestionServiceImpl.lambda$reindex$9(SuggestionServiceImpl.java:142) at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:311) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) **【解决办法】** 点击“File”-->“Invalidate Cache / Restart...”即可。 ![watermark_type_ZmFuZ3poZW5naGVpdGk_shadow_10_text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2dka3l4eTIwMTM_size_16_color_FFFFFF_t_70][] 注:导致此问题的原因可能会有很多种,上述解决办法只是其中一种…… [watermark_type_ZmFuZ3poZW5naGVpdGk_shadow_10_text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2dka3l4eTIwMTM_size_16_color_FFFFFF_t_70]: /images/20210726/6fa8843e44b74558b959f4df91185044.png
还没有评论,来说两句吧...