IndexNotReadyException
Answered
when open a project , I want do some analysis on all project java file, so I found all psiClasses, but when do the analysis by using psielement (such as psiclass#getAllField), I got IndexNotReadyExceptions , how to resvole it , is it possible?
Please sign in to leave a comment.
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:67)
at com.intellij.util.indexing.FileBasedIndexImpl.handleDumbMode(FileBasedIndexImpl.java:779)
at com.intellij.util.indexing.FileBasedIndexImpl.ensureUpToDate(FileBasedIndexImpl.java:731)
at com.intellij.psi.stubs.StubIndexImpl.getContainingIds(StubIndexImpl.java:487)
at com.intellij.psi.stubs.StubIndexImpl.processElements(StubIndexImpl.java:302)
at com.intellij.psi.stubs.StubIndex.getElements(StubIndex.java:92)
at com.intellij.psi.stubs.StubIndex.getElements(StubIndex.java:80)
at com.intellij.psi.impl.java.stubs.index.JavaFullClassNameIndex.get(JavaFullClassNameIndex.java:30)
at com.intellij.psi.impl.file.impl.JavaFileManagerImpl.doFindClasses(JavaFileManagerImpl.java:86)
at com.intellij.psi.impl.file.impl.JavaFileManagerImpl.findClass(JavaFileManagerImpl.java:112)
at com.intellij.psi.impl.PsiElementFinderImpl.findClass(PsiElementFinderImpl.java:51)
at com.intellij.psi.impl.JavaPsiFacadeImpl.doFindClass(JavaPsiFacadeImpl.java:91)
at com.intellij.psi.impl.JavaPsiFacadeImpl.findClass(JavaPsiFacadeImpl.java:69)
at com.intellij.psi.impl.PsiClassImplUtil.findSpecialSuperClass(PsiClassImplUtil.java:721)
at com.intellij.psi.impl.PsiClassImplUtil.getEnumSuperType(PsiClassImplUtil.java:813)
at com.intellij.psi.impl.PsiClassImplUtil.getExtendsListTypes(PsiClassImplUtil.java:926)
at com.intellij.psi.impl.source.PsiClassImpl.getExtendsListTypes(PsiClassImpl.java:185)
at com.intellij.psi.impl.PsiClassImplUtil.getSupersInner(PsiClassImplUtil.java:733)
at com.intellij.psi.impl.PsiClassImplUtil.getSupers(PsiClassImplUtil.java:725)
at com.intellij.psi.impl.source.PsiClassImpl.getSupers(PsiClassImpl.java:210)
at com.intellij.psi.impl.PsiClassImplUtil$MemberCache.lambda$new$1(PsiClassImplUtil.java:329)
at com.intellij.util.containers.FilteredTraverserBase$Meta.childrenImpl(FilteredTraverserBase.java:436)
at com.intellij.util.containers.FilteredTraverserBase$Meta.children(FilteredTraverserBase.java:422)
at com.intellij.util.containers.FilteredTraverserBase.children(FilteredTraverserBase.java:303)
at com.intellij.util.containers.TreeTraversal$2$1WrappedTree.fun(TreeTraversal.java:121)
at com.intellij.util.containers.TreeTraversal$2$1WrappedTree.fun(TreeTraversal.java:108)
at com.intellij.util.containers.TreeTraversal$P.iterable(TreeTraversal.java:805)
at com.intellij.util.containers.TreeTraversal$P.iterator(TreeTraversal.java:799)
at com.intellij.util.containers.TreeTraversal$BiOrderIt.nextImpl(TreeTraversal.java:540)
at com.intellij.util.containers.JBIterator.peekNext(JBIterator.java:150)
at com.intellij.util.containers.JBIterator.hasNext(JBIterator.java:110)
at com.intellij.util.containers.ContainerUtil.newArrayList(ContainerUtil.java:176)
at com.intellij.util.containers.JBIterable.toList(JBIterable.java:837)
at com.intellij.util.containers.FilteredTraverserBase.toList(FilteredTraverserBase.java:308)
at com.intellij.psi.impl.PsiClassImplUtil$MemberCache.<init>(PsiClassImplUtil.java:332)
See https://plugins.jetbrains.com/docs/intellij/indexing-and-psi-stubs.html#dumb-mode + javadoc on IndexNotReadyException
I use the method runWhenSmart 、runReadActionInSmartMode,but got the same result
Please link your plugin sources and exact point in your code.
hi,i got the same problem , you can click the url below for detail message , wish you can help, thank you ,sir!
https://intellij-support.jetbrains.com/hc/en-us/requests/5765934