contextbuddy
contextbuddy copied to clipboard
NoClassDefFoundError: com/virtuslab/contextbuddy/ContextBuddy$
Hi, many thanks for the tool! I can't run it in my IDEA for some reason though, would you have any advice?
This is what I'm getting when I try shift shift
and type context buddy
:
java.lang.NoClassDefFoundError: Could not initialize class com.virtuslab.contextbuddy.smarthistory.SmartHistoryModel$
at com.virtuslab.contextbuddy.smarthistory.actions.StateBasedAction.$anonfun$current$3(StateBasedAction.scala:17)
at scala.Option.fold(Option.scala:175)
at com.virtuslab.contextbuddy.smarthistory.actions.StateBasedAction.current(StateBasedAction.scala:17)
at com.virtuslab.contextbuddy.smarthistory.actions.StateBasedAction.current$(StateBasedAction.scala:12)
at com.virtuslab.contextbuddy.smarthistory.actions.BuddyAnActionGroup.current(BuddyAnActionGroup.scala:7)
at com.virtuslab.contextbuddy.smarthistory.actions.BuddyAnAction.doUpdate(BuddyAnAction.scala:14)
at com.virtuslab.contextbuddy.smarthistory.actions.BuddyAnAction.doUpdate$(BuddyAnAction.scala:13)
at com.virtuslab.contextbuddy.smarthistory.actions.BuddyAnActionGroup.doUpdate(BuddyAnActionGroup.scala:7)
at com.virtuslab.contextbuddy.smarthistory.actions.BuddyAnActionGroup.update(BuddyAnActionGroup.scala:19)
at com.intellij.openapi.actionSystem.ex.ActionUtil.performDumbAwareUpdate(ActionUtil.java:177)
at com.intellij.ide.util.gotoByName.GotoActionModel.updateActionBeforeShow(GotoActionModel.java:314)
at com.intellij.ide.util.gotoByName.GotoActionModel$ActionWrapper.lambda$getPresentation$0(GotoActionModel.java:655)
at com.intellij.ide.util.gotoByName.GotoActionModel.lambda$updateOnEdt$4(GotoActionModel.java:464)
at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:201)
at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:831)
at com.intellij.openapi.application.impl.ApplicationImpl.lambda$invokeLater$4(ApplicationImpl.java:310)
at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:80)
at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:128)
at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:46)
at com.intellij.openapi.application.impl.FlushQueue$FlushNow.run(FlushQueue.java:184)
at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:740)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:974)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:847)
at com.intellij.ide.IdeEventQueue.lambda$null$8(IdeEventQueue.java:449)
at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:739)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$9(IdeEventQueue.java:448)
at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:831)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:496)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
I get a NoClassDefFoundError immediately after starting up IntelliJ.
Stack trace:
java.lang.NoClassDefFoundError: com/virtuslab/contextbuddy/ContextBuddy$
at com.virtuslab.contextbuddy.StateManager.<init>(StateManager.scala:12)
at com.virtuslab.contextbuddy.StateManager$.$anonfun$apply$1(StateManager.scala:27)
at scala.util.Try$.apply(Try.scala:213)
at com.virtuslab.contextbuddy.StateManager$.apply(StateManager.scala:27)
at com.virtuslab.contextbuddy.ContextBuddyComponent.projectOpened(ContextBuddyComponent.scala:31)
IntelliJ 2020.1, Java 11 on Linux
Complete log available at https://ipfs.io/ipfs/QmTbcS9bQT6pdxDkN3oeEhtsY8DMNMqRwWuZTNuA1Y2xMq
Is context buddy open source? I wonder if I could contribute a fix for that..
I need to add that this error occurs after I try to install Context Buddy using IntelliJ's Plugin Marketplace. I noticed that the blog recommends to download the plugin from some other place. Can it be due to that? If so, can the version at the marketplace be updated?
By the way, the pasted stacktrace doesn't show up when I did the following:
- uninstalled the plugin, restarted the IDE
- installed the plugin, but without restarting the IDE
- modified the downloaded zip in
~/.cache/JetBrains/IdeaIC2020.1/plugins
the following way:
- packaged the
classes
directory into acontext-buddy.jar
- removed the
classes
directory - pasted the created jar into
lib
next to other jars
- restarted the IDE
Then the menu actions are available though I can click on anything and nothing happens, apart of the help.
/cc @romanowski @odisseus
The plugin downloaded from the link at the blog also generates this error.
IntelliJ IDEA 2020.1.1 (Community Edition)
Build #IC-201.7223.91, built on April 30, 2020
Runtime version: 11.0.7+10-post-Ubuntu-3ubuntu1 amd64
VM: OpenJDK 64-Bit Server VM by Ubuntu
Linux 5.4.0-29-generic
GC: ParNew, ConcurrentMarkSweep
Memory: 1979M
Cores: 12
Non-Bundled Plugins: AceJump, org.intellij.scala, org.jetbrains.kotlin, com.jetbrains.ChooseRuntime, Docker, PythonCore
Current Desktop: ubuntu:GNOME
When I repackaged the version mentioned at the blog post (moved contents of classes
into a jar in lib
), the Context Buddy was able to display some UI elements:
but then I can't do anything useful with that and I can see the following in the Idea log:
2020-05-08 15:09:28,541 [ 173851] WARN - marthistory.SmartHistoryModel$ - No data for com.intellij.openapi.editor.impl.EditorImpl@b25e044, cannot set enable to true