java.lang.ClassCastException: com.intellij.psi.impl.source.tree.PsiCommentImpl cannot be cast to com.jetbrains.php.lang.psi.elements.StringLiteralExpression

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

Samebug tips

Do you know how to solve this issue? Write a tip to help other users and build your expert profile.

Solutions on the web

via GitHub by samdark
, 9 months ago
com.intellij.psi.impl.source.tree.PsiCommentImpl cannot be cast to com.jetbrains.php.lang.psi.elements.StringLiteralExpression
java.lang.ClassCastException: com.intellij.psi.impl.source.tree.PsiCommentImpl cannot be cast to com.jetbrains.php.lang.psi.elements.StringLiteralExpression
at com.yii2support.views.PsiReference.getViewPsiFile(PsiReference.java:43)
at com.yii2support.views.PsiReference.resolve(PsiReference.java:26)
at com.intellij.psi.PsiReferenceBase.isReferenceTo(PsiReferenceBase.java:125)
at com.intellij.psi.search.SingleTargetRequestResultProcessor.processTextOccurrence(SingleTargetRequestResultProcessor.java:52)
at com.intellij.psi.impl.search.PsiSearchHelperImpl$8.lambda$execute$0(PsiSearchHelperImpl.java:734)
at com.intellij.psi.impl.search.LowLevelSearchUtil.processTreeUp(LowLevelSearchUtil.java:138)
at com.intellij.psi.impl.search.LowLevelSearchUtil.processElementsAtOffsets(LowLevelSearchUtil.java:224)
at com.intellij.psi.impl.search.LowLevelSearchUtil.processElementsContainingWordInElement(LowLevelSearchUtil.java:183)
at com.intellij.psi.impl.search.LowLevelSearchUtil.processInjectedFile(LowLevelSearchUtil.java:64)
at com.intellij.psi.impl.search.LowLevelSearchUtil.processTreeUp(LowLevelSearchUtil.java:133)
at com.intellij.psi.impl.search.LowLevelSearchUtil.processElementsAtOffsets(LowLevelSearchUtil.java:224)
at com.intellij.psi.impl.search.PsiSearchHelperImpl$8.execute(PsiSearchHelperImpl.java:730)
at com.intellij.psi.impl.search.PsiSearchHelperImpl$2.processInReadAction(PsiSearchHelperImpl.java:232)
at com.intellij.psi.impl.search.PsiSearchHelperImpl$2.processInReadAction(PsiSearchHelperImpl.java:228)
at com.intellij.openapi.application.ReadActionProcessor$1.compute(ReadActionProcessor.java:32)
at com.intellij.openapi.application.ReadActionProcessor$1.compute(ReadActionProcessor.java:29)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:895)
at com.intellij.openapi.application.ReadActionProcessor.process(ReadActionProcessor.java:29)
at com.intellij.psi.impl.search.PsiSearchHelperImpl.lambda$processVirtualFile$4(PsiSearchHelperImpl.java:376)
at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1061)
at com.intellij.openapi.application.ex.ApplicationUtil.tryRunReadAction(ApplicationUtil.java:46)
at com.intellij.psi.impl.search.PsiSearchHelperImpl.processVirtualFile(PsiSearchHelperImpl.java:360)
at com.intellij.psi.impl.search.PsiSearchHelperImpl.lambda$processPsiFileRoots$2(PsiSearchHelperImpl.java:313)
at com.intellij.concurrency.ApplierCompleter.b(ApplierCompleter.java:123)
at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:568)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:519)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54)
at com.intellij.concurrency.ApplierCompleter.b(ApplierCompleter.java:106)
at java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:731)
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)

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.

Write tip

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