Devkit gives a ClassCastException running my plugin
Hey all, giving this devkit/plugin module a bash for the first time, my
plugin deploys and runs fine within IDEA but if I run it via IDEA I get:
ERROR - com.intellij.ide.IdeEventQueue - Error during
dispatching of
java.awt.event.InvocationEvent[INVOCATION_DEFAULT,runnable=com.intellij.idea.Main$3@1eca32a,notifier=null,catchExceptions=false,when=1122176371674]
on sun.awt.X11.XToolkit@cc4364
ERROR - com.intellij.ide.IdeEventQueue - IntelliJ IDEA 5.0
RC1 #3419 Build #3419
ERROR - com.intellij.ide.IdeEventQueue - JDK: 1.5.0_03
ERROR - com.intellij.ide.IdeEventQueue - VM: Java HotSpot(TM)
Client VM
ERROR - com.intellij.ide.IdeEventQueue - Vendor: Sun
Microsystems Inc.
ERROR - com.intellij.ide.IdeEventQueue - OS: Linux
ERROR - com.intellij.ide.IdeEventQueue - Last Action:
ERROR - com.intellij.ide.IdeEventQueue - Error during
dispatching of
java.awt.event.InvocationEvent[INVOCATION_DEFAULT,runnable=com.intellij.idea.Main$3@1eca32a,notifier=null,catchExceptions=false,when=1122176371674]
on sun.awt.X11.XToolkit@cc4364
java.lang.ClassCastException:
com.theoryinpractice.testng.TestNGConfigurationType
at
com.intellij.openapi.components.impl.ComponentManagerImpl.instantiateComponent(ComponentManagerImpl.java:172)
at
com.intellij.openapi.components.impl.ComponentManagerImpl.a(ComponentManagerImpl.java:260)
at
com.intellij.openapi.components.impl.ComponentManagerImpl.getComponentFromContainer(ComponentManagerImpl.java:178)
at
com.intellij.openapi.components.impl.ComponentManagerImpl.getComponent(ComponentManagerImpl.java:111)
at
com.intellij.openapi.components.impl.ComponentManagerImpl.getComponent(ComponentManagerImpl.java:51)
at
com.intellij.openapi.components.impl.ComponentManagerImpl.getComponents(ComponentManagerImpl.java:188)
at
com.intellij.openapi.components.impl.ComponentManagerImpl.initComponents(ComponentManagerImpl.java:152)
at
com.intellij.openapi.application.impl.ApplicationImpl.initComponents(ApplicationImpl.java:21)
at
com.intellij.openapi.application.impl.ApplicationImpl.load(ApplicationImpl.java:379)
at com.intellij.idea.IdeaApplication.run(IdeaApplication.java:45)
at com.intellij.idea.Main$3.run(Main.java:2)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
at
com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:45)
Am I missing something simple? I've added my IDEA SDK, set the sandbox,
and hit run/debug. It should just work right?
Please sign in to leave a comment.
Mark Derricutt wrote:
It works for me on my plugin projects. Do you have any source available
to try?
Bas
Mark Derricutt wrote:
Mark,
please verify that you don't use any IDEA jar (openapi.jar, idea.jar, etc.) in your plugin
module's libraries. If you need idea.jar for non-OpenAPI classes, you should add it to the
IDEA-JDK to prevent it from being copied into your sandbox. You might have to manually
clean the plugin's lib folder in the sandbox if that was the case.
HTH,
Sascha
Sascha Weinreuter wrote:
Ahh that'd be it. I had global libraries pointing to the idea/idea_rt
jars which I'd been using before switching to a plugin module. cheers.