Plugin classloader cannot load plugin classes.

On some intellij idea installations plugin fails to start because IDE can not load plugin classes.
For instance one of classes defined as application component (JavaDocWriter) in plugin.xml can not be loaded.
Here is a link to original issue:
https://github.com/setial/intellij-javadocs/issues/29

Full stacktrace:
Plugin 'com.github.setial' failed to initialize and will be disabled.  Please restart IntelliJ IDEA.  java.lang.ClassNotFoundException:  com.github.setial.intellijjavadocs.operation.JavaDocWriter  PluginClassLoader[com.github.setial, 1.0.10]
at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:68)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:266)
at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentsRegistry.loadClasses(ComponentManagerImpl.java:408)
at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentsRegistry.loadClasses(ComponentManagerImpl.java:398)
at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentsRegistry.access$000(ComponentManagerImpl.java:384)
at com.intellij.openapi.components.impl.ComponentManagerImpl.createComponents(ComponentManagerImpl.java:107)
at com.intellij.openapi.components.impl.ComponentManagerImpl.init(ComponentManagerImpl.java:89)
at com.intellij.openapi.components.impl.stores.ApplicationStoreImpl.load(ApplicationStoreImpl.java:87)
at com.intellij.openapi.application.impl.ApplicationImpl.load(ApplicationImpl.java:509)
at com.intellij.idea.IdeaApplication.run(IdeaApplication.java:150)
at com.intellij.idea.MainImpl$1$1$1.run(MainImpl.java:47)

This particular issue reported as for the intellij idea 13.0.2 and jdk 1.7.0_21 on windows.
The weird thing this issue can not be reproduced always. On some workstations it works on some it doesn't work.

Any help would be appretiated.

Thanks,
Sergey.

3 comments

This error probably means that the plugin jar is corrupted. You can check that the mentioned class-file actually exists in the plugin jar.

--
Nikolay Chashnikov
JetBrains
http://www.jetbrains.com
"Develop with pleasure!"

0

The thing is that plugin is installed using intellij-idea plugin manager and it works on some workstations.
So, I can only assume that plugin manager didn't finish plugin downloading and tried to install it.
Is there possibility for other reasons?

0

It may be also caused by virus/antivirus software which modifies jar files, HDD hardware problems, etc.

--
Nikolay Chashnikov
JetBrains
http://www.jetbrains.com
"Develop with pleasure!"

0

Please sign in to leave a comment.