plugin classloading
i was wondering why doesnt idea have separate classloader spaces for each plugin.. instead of the following exception:
ava.lang.LinkageError: Class org/jdom/Element violates loader constraints
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.lang.ClassLoader.defineClass(ClassLoader.java:465)
at com.intellij.ide.plugins.cl.IdeaClassLoader.a(IdeaClassLoader.java:44)
at com.intellij.ide.plugins.cl.IdeaClassLoader.findClass(IdeaClassLoader.java:43)
at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:39)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at com.kiwisoft.sqlPlugin.config.SQLPluginAppConfig.writeExternal(SQLPluginAppConfig.java:118)
at
thanks
Please sign in to leave a comment.
bin zhu wrote:
I thought/hoped so too. But the problem is that the idea interfaces for
plugins depend on JDOM classes, and so, even if the plugin was
completely isolated, you would still need idea's jdom.
i mean i added the old jdom.jar to ks-sql lib dir..
bin zhu wrote:
That cannot work. However you can replace the lib/jdom.jar from the
IDEA-distribution with the one posted here http://tinyurl.com/ddvov
which is patched to be compatible with the old as well as the new
JDOM API.
HTH,
Sascha
i know it does not work.. but shouldnt it? isnt it a bug?
thanks,
bin zhu wrote:
that won't work because the jdom objects being passed to your components
(those that are JDOMExternalizable) are jdom 1.0 objects, and yours are
0.8, hence the class errors.
try using the patched jdom jar sacha has posted.