UniFormal / IntelliJ-MMT

An IntelliJ-Plugin for MMT (under development)
3 stars 1 forks source link

ScalaReflectionException: class info.kwarc.mmt.intellij.MMTPluginInterface [...] not found #22

Closed ComFreek closed 4 years ago

ComFreek commented 4 years ago

When building the mmt.jar from my latest commit at MMT@devel and using it for your IntelliJ-MMT plugin, I get the error below immediately upon project opening. After that happens, the plugin-related panes are not visible anymore. I guess, the plugin completely crashes.

scala.ScalaReflectionException: class info.kwarc.mmt.intellij.MMTPluginInterface in JavaMirror with java.net.URLClassLoader@30fc2aa2 of type class java.net.URLClassLoader with classpath [file:/C:/Users/ComFreek/Desktop/kwarc-project/code/mmt.jar] and parent being PluginClassLoader[info.kwarc.mmt.intellij.MMTPlugin, 18.0.1] com.intellij.ide.plugins.cl.PluginClassLoader@50efa682 of type class com.intellij.ide.plugins.cl.PluginClassLoader with classpath [<unknown>] and parent being primordial classloader with boot classpath [<unknown>] not found.
    at scala.reflect.internal.Mirrors$RootsBase.staticClass(Mirrors.scala:122)
    at scala.reflect.internal.Mirrors$RootsBase.staticClass(Mirrors.scala:22)
    at info.kwarc.mmt.utils.Reflection$ThisReflectedClass.<init>(Reflection.scala:13)
    at info.kwarc.mmt.utils.Reflection.getClass(Reflection.scala:10)
    at info.kwarc.mmt.intellij.MMTJar.<init>(Plugin.scala:95)
    at info.kwarc.mmt.intellij.MMT.mmtjar$lzycompute(Plugin.scala:144)
    at info.kwarc.mmt.intellij.MMT.mmtjar(Plugin.scala:144)
    at info.kwarc.mmt.intellij.language.URIElement_impl.getReference(References.scala:55)
    at info.kwarc.mmt.intellij.language.URIElement_impl.getReferences(References.scala:71)
    at com.intellij.codeInsight.highlighting.HyperlinkAnnotator.annotate(HyperlinkAnnotator.java:28)
    at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.runAnnotators(DefaultHighlightVisitor.java:121)
    at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.visit(DefaultHighlightVisitor.java:86)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.runVisitors(GeneralHighlightingPass.java:351)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.lambda$collectHighlights$5(GeneralHighlightingPass.java:284)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.analyzeByVisitors(GeneralHighlightingPass.java:311)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.lambda$analyzeByVisitors$6(GeneralHighlightingPass.java:314)
    at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.analyze(DefaultHighlightVisitor.java:70)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.analyzeByVisitors(GeneralHighlightingPass.java:314)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectHighlights(GeneralHighlightingPass.java:281)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectInformationWithProgress(GeneralHighlightingPass.java:225)
    at com.intellij.codeInsight.daemon.impl.ProgressableTextEditorHighlightingPass.doCollectInformation(ProgressableTextEditorHighlightingPass.java:84)
    at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:55)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$null$1(PassExecutorService.java:429)
    at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1106)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$2(PassExecutorService.java:422)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:591)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:537)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:59)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:421)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$run$0(PassExecutorService.java:397)
    at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:164)
    at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:204)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:395)
    at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:161)
    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:177)
ComFreek commented 4 years ago

I completely rebuilt MMT at the commit referenced above using "sbt clean" and then "sbt deploy" -- to no success.

Perhaps this is system-specific:

@rappatoni Could you, as another Windows user, perhaps test whether building mmt.jar from the latest devel commit works (via sbt deploy) and whether the IntelliJ-MMT plugin accepts it?

ComFreek commented 4 years ago

Silly me - I manually wanted to relocate the mmt.jar and did not edit the multiple locations specfying the mmt.jar in the IntelliJ-MMT project of IntelliJ. Best to not do this manully, mea culpa.