Dependecy on com.intellij.javaee throws an exception in a loop

Hi

I have a new strange problem when I launch my plugin project. It throws following exception in a loop:

com.intellij.diagnostic.PluginException: com/intellij/javaee/dataSource/DataSource
at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentsRegistry.a(ComponentManagerImpl.java:40)
at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentsRegistry.a(ComponentManagerImpl.java:22)
at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentsRegistry.access$100(ComponentManagerImpl.java:61)
at com.intellij.openapi.components.impl.ComponentManagerImpl.a(ComponentManagerImpl.java:39)
at com.intellij.openapi.components.impl.ComponentManagerImpl.initComponents(ComponentManagerImpl.java:124)
at com.intellij.openapi.components.impl.stores.ApplicationStoreImpl.load(ApplicationStoreImpl.java:1)
at com.intellij.openapi.application.impl.ApplicationImpl.load(ApplicationImpl.java:16)
at com.intellij.idea.IdeaApplication.run(IdeaApplication.java:40)
at com.intellij.idea.MainImpl$3.run(MainImpl.java:3)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at com.intellij.ide.IdeEventQueue.c(IdeEventQueue.java:111)
at com.intellij.ide.IdeEventQueue.b(IdeEventQueue.java:53)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:92)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
Caused by: java.lang.NoClassDefFoundError: com/intellij/javaee/dataSource/DataSource
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentsRegistry.a(ComponentManagerImpl.java:37)
... 19 more
Caused by: java.lang.ClassNotFoundException: com.intellij.javaee.dataSource.DataSource
at com.intellij.util.lang.UrlClassLoader.loadClass(UrlClassLoader.java:82)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
... 22 more
ERROR - ij.components.ComponentManager -
com.intellij.diagnostic.PluginException: com/intellij/javaee/dataSource/DataSource
at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentsRegistry.a(ComponentManagerImpl.java:40)
at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentsRegistry.a(ComponentManagerImpl.java:22)
at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentsRegistry.access$100(ComponentManagerImpl.java:61)
at com.intellij.openapi.components.impl.ComponentManagerImpl.a(ComponentManagerImpl.java:39)
at com.intellij.openapi.components.impl.ComponentManagerImpl.initComponents(ComponentManagerImpl.java:124)
at com.intellij.openapi.components.impl.stores.ApplicationStoreImpl.load(ApplicationStoreImpl.java:1)
at com.intellij.openapi.application.impl.ApplicationImpl.load(ApplicationImpl.java:16)
at com.intellij.idea.IdeaApplication.run(IdeaApplication.java:40)
at com.intellij.idea.MainImpl$3.run(MainImpl.java:3)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at com.intellij.ide.IdeEventQueue.c(IdeEventQueue.java:111)
at com.intellij.ide.IdeEventQueue.b(IdeEventQueue.java:53)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:92)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
Caused by: java.lang.NoClassDefFoundError: com/intellij/javaee/dataSource/DataSource
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentsRegistry.a(ComponentManagerImpl.java:37)
... 19 more
Caused by: java.lang.ClassNotFoundException: com.intellij.javaee.dataSource.DataSource
at com.intellij.util.lang.UrlClassLoader.loadClass(UrlClassLoader.java:82)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
... 22 more
ERROR - ij.components.ComponentManager - JDK: 1.6.0_05
ERROR - ij.components.ComponentManager - VM: Java HotSpot(TM) Client VM
ERROR - ij.components.ComponentManager - Vendor: Sun Microsystems Inc.
ERROR - ij.components.ComponentManager - OS: Windows XP
ERROR - ij.components.ComponentManager - Original exception:
.
.
.
.
.
.

it continues until a message box appears telling:

Plugin com.intellij.javaee failed to initialize:
com/intellij/javaee/module/view/ejb/editor/InterceptorAsVirtualFile.

Please remove the plugin and restart intellij idea.

After hitting ok button, another message box appears with following message:

Fatal error initializing class com.intellij.openapi.vfs.VirtualFileManager:
org.picocontainer.defaults.CyclicDependencyException: Cyclic dependency:

Complete stacktrace was written to idea.log

I didn't change any serious configuration or library in my project from my last succesfull run. My plugin is a web facet and depends on com.intellij.javaee plugin.

I needed to use WebDirectoryUtil class. I founded it at javaee-impl.jar file. So I added it as a library to my project. And it works fine. I don't know whether this matters or not, but my problem exists even when I remove this file from my classpath, and comment all WebDirectoryUtil usages in my sources.

2 comments
Comment actions Permalink

Hello Ehsan,

I needed to use WebDirectoryUtil class. I founded it at
javaee-impl.jar file. So I added it as a library to my project.


Don't do that. If you need to use any code from any plugin, you need to add
the plugin JAR to the classpath of the IDEA JDK, not as a library to your
project.

--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0
Comment actions Permalink

Hi

I tried every thing I though could have some meaningfull relation with my problem. I doubted that it was a more general problem. So I tried to make a new plugin project from scrach, and as I guested it was due to some problems in my IntelliJ, the new project had same problem too. I've reinstalled my IntelliJ, and now it works fine.

0

Please sign in to leave a comment.