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

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via GitHub by jansorg
, 1 year ago
com.intellij.psi.impl.source.PsiJavaFileImpl cannot be cast to com.ansorgit.plugins.bash.lang.psi.api.BashFile
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.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.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.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 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)

Users with the same issue

You are the first who have seen this exception.

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.