concordion / idea-concordion-support

Concordion support IntelliJ Idea plugin https://plugins.jetbrains.com/plugin/7978
Other
13 stars 9 forks source link

NoClassDefFound error when re-opening Concordion project with open Concordion HTML files #25

Closed PaulCribdonFlooid closed 3 years ago

PaulCribdonFlooid commented 3 years ago

IntelliJ is reporting the following NoClassDefFoundError consistently when re-opening an existing project which has currently-open Concordion HTML files.

If I close the HTML files in the editor, shutdown IntelliJ and then re-open the project (so the editor doesn't instantly load the Concordion HTML files) then I don't get the error.

java.lang.NoClassDefFoundError: Could not initialize class org.concordion.plugin.idea.ConcordionPsiUtils at org.concordion.plugin.idea.ConcordionNavigationService.correspondingTestFixture(ConcordionNavigationService.java:42) at org.concordion.plugin.idea.patterns.ConcordionElementPattern$1.accepts(ConcordionElementPattern.java:47) at org.concordion.plugin.idea.patterns.ConcordionElementPattern$1.accepts(ConcordionElementPattern.java:37) at com.intellij.patterns.ObjectPattern.accepts(ObjectPattern.java:69) at com.intellij.patterns.ObjectPattern.accepts(ObjectPattern.java:51) at org.concordion.plugin.idea.injection.ConcordionToHtmlInjector.getLanguagesToInject(ConcordionToHtmlInjector.java:30) at com.intellij.psi.impl.source.tree.injected.InjectedLanguageManagerImpl.processInPlaceInjectorsFor(InjectedLanguageManagerImpl.java:418) at com.intellij.psi.impl.source.tree.injected.InjectedLanguageUtilBase.probeElementsUp(InjectedLanguageUtilBase.java:207) at com.intellij.psi.impl.source.tree.injected.InjectedLanguageUtilBase.enumerate(InjectedLanguageUtilBase.java:137) at com.intellij.psi.impl.source.tree.injected.InjectedLanguageUtilBase.findInside(InjectedLanguageUtilBase.java:371) at com.intellij.psi.impl.source.tree.injected.InjectedLanguageUtilBase.tryOffset(InjectedLanguageUtilBase.java:350) at com.intellij.psi.impl.source.tree.injected.InjectedLanguageUtilBase.findInjectedElementNoCommit(InjectedLanguageUtilBase.java:330) at com.intellij.psi.impl.source.tree.injected.InjectedLanguageManagerImpl.findInjectedElementAt(InjectedLanguageManagerImpl.java:290) at com.intellij.openapi.editor.EditorMouseHoverPopupManager.createContext(EditorMouseHoverPopupManager.java:374) at com.intellij.openapi.editor.EditorMouseHoverPopupManager.lambda$handleMouseMoved$3(EditorMouseHoverPopupManager.java:163) at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.insideReadAction(NonBlockingReadActionImpl.java:521) at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.lambda$attemptComputation$3(NonBlockingReadActionImpl.java:468) at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1137) at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runInReadActionWithWriteActionPriority$0(ProgressIndicatorUtils.java:76) at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runActionAndCancelBeforeWrite(ProgressIndicatorUtils.java:152) at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runWithWriteActionPriority$1(ProgressIndicatorUtils.java:113) at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:59) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:178) at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:658) at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:610) at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:65) at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:165) at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:59) at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runWithWriteActionPriority(ProgressIndicatorUtils.java:110) at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runInReadActionWithWriteActionPriority(ProgressIndicatorUtils.java:76) at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.attemptComputation(NonBlockingReadActionImpl.java:486) at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.lambda$transferToBgThread$1(NonBlockingReadActionImpl.java:408) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668) at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665) at java.base/java.lang.Thread.run(Thread.java:834)

IntelliJ details: IntelliJ IDEA 2020.3 Beta (Community Edition) Build #IC-203.5784.10, built on November 10, 2020 Runtime version: 11.0.9+11-b1145.10 amd64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. Windows 10 10.0 GC: ParNew, ConcurrentMarkSweep Memory: 1967M Cores: 8 Non-Bundled Plugins: org.intellij.plugins.hcl, gherkin, cucumber-java, org.concordion.plugin.idea.lang

nigelcharman commented 3 years ago

I'm seeing this too with 2020.3 Beta, along with:

java.lang.ExceptionInInitializerError
    at org.concordion.plugin.idea.ConcordionPsiUtils.<clinit>(ConcordionPsiUtils.java:31)
    at org.concordion.plugin.idea.ConcordionNavigationService.correspondingTestFixture(ConcordionNavigationService.java:42)
    at org.concordion.plugin.idea.patterns.ConcordionElementPattern$1.accepts(ConcordionElementPattern.java:47)
    at org.concordion.plugin.idea.patterns.ConcordionElementPattern$1.accepts(ConcordionElementPattern.java:37)
    at com.intellij.patterns.ObjectPattern.accepts(ObjectPattern.java:69)
    at com.intellij.patterns.ObjectPattern.accepts(ObjectPattern.java:51)
    at org.concordion.plugin.idea.injection.ConcordionToHtmlInjector.getLanguagesToInject(ConcordionToHtmlInjector.java:30)
    at com.intellij.psi.impl.source.tree.injected.InjectedLanguageManagerImpl.processInPlaceInjectorsFor(InjectedLanguageManagerImpl.java:418)
    at com.intellij.psi.impl.source.tree.injected.InjectedLanguageUtilBase.probeElementsUp(InjectedLanguageUtilBase.java:207)
    at com.intellij.psi.impl.source.tree.injected.InjectedLanguageUtilBase.enumerate(InjectedLanguageUtilBase.java:137)
    at com.intellij.psi.impl.source.tree.injected.InjectedLanguageManagerImpl.enumerateEx(InjectedLanguageManagerImpl.java:318)
    at com.intellij.codeInsight.daemon.impl.InjectedGeneralHighlightingPass.lambda$getInjectedPsiFiles$3(InjectedGeneralHighlightingPass.java:198)
    at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:136)
    at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:149)
    at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:149)
    at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:149)
    at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:149)
    at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1137)
    at com.intellij.concurrency.ApplierCompleter.lambda$wrapInReadActionAndIndicator$1(ApplierCompleter.java:92)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:658)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:610)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:65)
    at com.intellij.concurrency.ApplierCompleter.wrapInReadActionAndIndicator(ApplierCompleter.java:104)
    at com.intellij.concurrency.ApplierCompleter.lambda$compute$0(ApplierCompleter.java:83)
    at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:172)
    at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:183)
    at com.intellij.concurrency.ApplierCompleter.compute(ApplierCompleter.java:83)
    at java.base/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:746)
    at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
    at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
    at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
    at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
    at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
Caused by: java.lang.NullPointerException
    at com.intellij.psi.PsiPrimitiveType.<init>(PsiPrimitiveType.java:32)
    at com.intellij.psi.PsiType.<clinit>(PsiType.java:17)
    ... 33 more

and

java.lang.NoClassDefFoundError: Could not initialize class org.concordion.plugin.idea.ConcordionPsiUtils
    at org.concordion.plugin.idea.ConcordionNavigationService.correspondingTestFixture(ConcordionNavigationService.java:42)
    at org.concordion.plugin.idea.patterns.ConcordionElementPattern$1.accepts(ConcordionElementPattern.java:47)
    at org.concordion.plugin.idea.patterns.ConcordionElementPattern$1.accepts(ConcordionElementPattern.java:37)
    at com.intellij.patterns.ObjectPattern.accepts(ObjectPattern.java:69)
    at com.intellij.patterns.ObjectPattern.accepts(ObjectPattern.java:51)
    at org.concordion.plugin.idea.injection.ConcordionToHtmlInjector.getLanguagesToInject(ConcordionToHtmlInjector.java:30)
    at com.intellij.psi.impl.source.tree.injected.InjectedLanguageManagerImpl.processInPlaceInjectorsFor(InjectedLanguageManagerImpl.java:418)
    at com.intellij.psi.impl.source.tree.injected.InjectedLanguageUtilBase.probeElementsUp(InjectedLanguageUtilBase.java:207)
    at com.intellij.psi.impl.source.tree.injected.InjectedLanguageUtilBase.enumerate(InjectedLanguageUtilBase.java:137)
    at com.intellij.psi.impl.source.tree.injected.InjectedLanguageManagerImpl.enumerateEx(InjectedLanguageManagerImpl.java:318)
    at com.intellij.codeInsight.daemon.impl.InjectedGeneralHighlightingPass.lambda$getInjectedPsiFiles$3(InjectedGeneralHighlightingPass.java:198)
    at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:136)
    at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:149)
    at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:149)
    at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:149)
    at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:149)
    at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1137)
    at com.intellij.concurrency.ApplierCompleter.lambda$wrapInReadActionAndIndicator$1(ApplierCompleter.java:92)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:658)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:610)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:65)
    at com.intellij.concurrency.ApplierCompleter.wrapInReadActionAndIndicator(ApplierCompleter.java:104)
    at com.intellij.concurrency.ApplierCompleter.lambda$compute$0(ApplierCompleter.java:83)
    at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:172)
    at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:183)
    at com.intellij.concurrency.ApplierCompleter.compute(ApplierCompleter.java:83)
    at java.base/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:746)
    at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
    at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
    at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
    at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
    at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)

It makes the Concordion support plugin unusable once the error occurs.

nigelcharman commented 3 years ago

This appears to be fixed in the 2020.3 IntelliJ release. Can you confirm please @PaulForeyFlooid ?

PaulCribdonFlooid commented 3 years ago

Yep I'm now on 2020.3.1 and this is no longer occurring for me :)