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 YouTrack by Unknown author, 1 year ago
org.jetbrains.kotlin.psi.KtObjectDeclaration cannot be cast to org.jetbrains.kotlin.psi.KtClass
java.lang.ClassCastException: org.jetbrains.kotlin.psi.KtObjectDeclaration cannot be cast to org.jetbrains.kotlin.psi.KtClass	at org.jetbrains.kotlin.resolve.OverrideResolver.findDataModifierForDataClass(OverrideResolver.java:1060)	at org.jetbrains.kotlin.resolve.OverrideResolver.checkOverrideForComponentFunction(OverrideResolver.java:1015)	at org.jetbrains.kotlin.resolve.OverrideResolver.checkOverrideForMember(OverrideResolver.java:801)	at org.jetbrains.kotlin.resolve.OverrideResolver.checkOverridesInAClass(OverrideResolver.java:291)	at org.jetbrains.kotlin.resolve.OverrideResolver.checkOverrides(OverrideResolver.java:284)	at org.jetbrains.kotlin.resolve.OverrideResolver.check(OverrideResolver.java:67)	at org.jetbrains.kotlin.resolve.LazyTopDownAnalyzer.analyzeDeclarations(LazyTopDownAnalyzer.kt:193)	at org.jetbrains.kotlin.resolve.LazyTopDownAnalyzerForTopLevel.analyzeDeclarations(LazyTopDownAnalyzerForTopLevel.java:74)	at org.jetbrains.kotlin.idea.caches.resolve.KotlinResolveDataProvider.analyze(KotlinResolveCache.kt:179)	at org.jetbrains.kotlin.idea.caches.resolve.PerFileAnalysisCache.analyze(KotlinResolveCache.kt:94)	at org.jetbrains.kotlin.idea.caches.resolve.PerFileAnalysisCache.getAnalysisResults(KotlinResolveCache.kt:79)	at org.jetbrains.kotlin.idea.caches.resolve.ProjectResolutionFacade.getAnalysisResultsForElements(ProjectResolutionFacade.kt:81)	at org.jetbrains.kotlin.idea.caches.resolve.ResolutionFacadeImpl.analyzeFullyAndGetResult(ProjectResolutionFacade.kt:113)	at org.jetbrains.kotlin.idea.caches.resolve.ResolutionUtils.analyzeFullyAndGetResult(resolutionApi.kt:77)	at org.jetbrains.kotlin.idea.highlighter.KotlinPsiChecker.annotate(KotlinPsiChecker.kt:63)	at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.a(DefaultHighlightVisitor.java:142)	at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.visit(DefaultHighlightVisitor.java:105)	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:334)	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:269)	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:293)	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:296)	at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.analyze(DefaultHighlightVisitor.java:80)	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:296)	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:268)	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectInformationWithProgress(GeneralHighlightingPass.java:207)	at com.intellij.codeInsight.daemon.impl.ProgressableTextEditorHighlightingPass.doCollectInformation(ProgressableTextEditorHighlightingPass.java:82)	at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:70)	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.c(PassExecutorService.java:437)	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1040)	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.a(PassExecutorService.java:430)	at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:494)	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:443)	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54)	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.b(PassExecutorService.java:429)	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:405)	at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:154)	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)