java.lang.ClassCastException

com.intellij.psi.impl.source.PsiJavaFileImpl cannot be cast to com.ansorgit.plugins.bash.lang.psi.api.BashFile

Solutions on the web19030

  • com.intellij.psi.impl.source.PsiJavaFileImpl cannot be cast to com.ansorgit.plugins.bash.lang.psi.api.BashFile
  • com.intellij.psi.impl.source.PsiJavaFileImpl cannot be cast to com.intellij.lang.javascript.psi.JSFile
  • com.intellij.psi.impl.source.PsiJavaFileImpl cannot be cast to org.intellij.plugins.ceylon.ide.ceylonCode.psi.CeylonFile
  • Stack trace

    • java.lang.ClassCastException: com.intellij.psi.impl.source.PsiJavaFileImpl cannot be cast to com.ansorgit.plugins.bash.lang.psi.api.BashFile at com.ansorgit.plugins.bash.lang.psi.impl.BashElementSharedImpl.getElementGlobalSearchScope(BashElementSharedImpl.java:30) at com.ansorgit.plugins.bash.lang.psi.impl.BashBaseStubElementImpl.getResolveScope(BashBaseStubElementImpl.java:77) at com.intellij.psi.impl.PsiClassImplUtil.processDeclarationsInClass(PsiClassImplUtil.java:463) at com.intellij.psi.impl.source.PsiClassImpl.processDeclarations(PsiClassImpl.java:491) at com.intellij.psi.util.PsiTreeUtil.treeWalkUp(PsiTreeUtil.java:992) at com.ansorgit.plugins.bash.lang.psi.impl.command.AbstractBashCommand$CachedFunctionReference.resolveInner(AbstractBashCommand.java:302) at com.intellij.psi.impl.source.resolve.reference.impl.CachingReference$MyResolver.resolve(CachingReference.java:63) at com.intellij.psi.impl.source.resolve.reference.impl.CachingReference$MyResolver.resolve(CachingReference.java:58) at com.intellij.psi.impl.source.resolve.ResolveCache.resolve(ResolveCache.java:144) at com.intellij.psi.impl.source.resolve.ResolveCache.resolveWithCaching(ResolveCache.java:213) at com.intellij.psi.impl.source.resolve.reference.impl.CachingReference.resolve(CachingReference.java:33) at com.ansorgit.plugins.bash.lang.psi.impl.command.AbstractBashCommand$1.compute(AbstractBashCommand.java:76) at com.intellij.psi.impl.PsiCachedValueImpl.doCompute(PsiCachedValueImpl.java:49) at com.intellij.util.CachedValueBase.getValueWithLock(CachedValueBase.java:222) at com.intellij.psi.impl.PsiCachedValue.getValueWithLock(PsiCachedValue.java:48) at com.intellij.psi.impl.PsiCachedValueImpl.getValue(PsiCachedValueImpl.java:38) at com.intellij.util.CachedValuesManagerImpl.getCachedValue(CachedValuesManagerImpl.java:83) at com.ansorgit.plugins.bash.lang.psi.impl.command.AbstractBashCommand.isFunctionCall(AbstractBashCommand.java:66) at com.ansorgit.plugins.bash.editor.annotator.BashAnnotator.annotateCommand(BashAnnotator.java:165) at com.ansorgit.plugins.bash.editor.annotator.BashAnnotator.annotate(BashAnnotator.java:77) at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.runAnnotators(DefaultHighlightVisitor.java:159) at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.visit(DefaultHighlightVisitor.java:102) at com.intellij.codeInsight.daemon.impl.InjectedGeneralHighlightingPass$4.run(InjectedGeneralHighlightingPass.java:376) at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.analyze(DefaultHighlightVisitor.java:86) at com.intellij.codeInsight.daemon.impl.InjectedGeneralHighlightingPass.runHighlightVisitorsForInjected(InjectedGeneralHighlightingPass.java:371) at com.intellij.codeInsight.daemon.impl.InjectedGeneralHighlightingPass.addInjectedPsiHighlights(InjectedGeneralHighlightingPass.java:247) at com.intellij.codeInsight.daemon.impl.InjectedGeneralHighlightingPass.access$000(InjectedGeneralHighlightingPass.java:55) at com.intellij.codeInsight.daemon.impl.InjectedGeneralHighlightingPass$3.process(InjectedGeneralHighlightingPass.java:217) at com.intellij.codeInsight.daemon.impl.InjectedGeneralHighlightingPass$3.process(InjectedGeneralHighlightingPass.java:214) at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:122) at com.intellij.concurrency.ApplierCompleter.access$000(ApplierCompleter.java:44) at com.intellij.concurrency.ApplierCompleter$1.run(ApplierCompleter.java:85) at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1182) at com.intellij.concurrency.ApplierCompleter$2.run(ApplierCompleter.java:94) at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:446) at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:443) at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:392) at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54) at com.intellij.concurrency.ApplierCompleter.wrapInReadActionAndIndicator(ApplierCompleter.java:106) at com.intellij.concurrency.ApplierCompleter.compute(ApplierCompleter.java:82) at jsr166e.CountedCompleter.exec(CountedCompleter.java:684) at jsr166e.ForkJoinTask.doExec(ForkJoinTask.java:260) at jsr166e.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:858) at jsr166e.ForkJoinPool.scan(ForkJoinPool.java:1687) at jsr166e.ForkJoinPool.runWorker(ForkJoinPool.java:1642) at jsr166e.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:109)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    You are the first who have seen this exception. Write a tip to help other users and build your expert profile.