0
votes

I get the following exception when running my Eclipse RCP application. Has somebody already met such an error?

I think it may come from multiple plugin importing the VNative class, is it possible ?

java.lang.LinkageError: loader constraint violation: loader (instance of org/eclipse/osgi/internal/loader/EquinoxClassLoader) previously initiated loading for a different type with name "org/eclipse/nebula/cwt/v/VNative"
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
    at org.eclipse.osgi.internal.loader.ModuleClassLoader.defineClass(ModuleClassLoader.java:276)
    at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.defineClass(ClasspathManager.java:655)
    at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findClassImpl(ClasspathManager.java:578)
    at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClassImpl(ClasspathManager.java:538)
    at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:525)
    at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:328)
    at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:368)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:446)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:395)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:387)
    at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:150)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    at org.eclipse.nebula.widgets.cdatetime.CDateTime.removeTextListener(CDateTime.java:1429)
    at org.eclipse.nebula.widgets.cdatetime.CDateTime.addTextListener(CDateTime.java:391)
    at org.eclipse.nebula.widgets.cdatetime.CDateTime.init(CDateTime.java:1339)
    at org.eclipse.nebula.widgets.cdatetime.CDateTime.<init>(CDateTime.java:346)
1

1 Answers

2
votes

Multiple bundles importing the same class should not be a problem. Exporting is the problem here.

The error means that there is more than 1 bundle that provides (exports) the class org.eclipse.nebula.cwt.v.VNative.

For instance this can happen if you have multiple bundles with a dependency to the nebula bundle and both bundles re-export it. --> Both bundles provide the same classes. In this case you can for example modify the dependencies to nebula to not re-export it.

If this isn't your problem, please provide more information about MANIFEST.MF files of your bundles that do something with nebula.