Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ecf-dev] Distributed OSGi with ECF

Oh, forgot to mention I'm using ECF 3.0.1.v20090916-2238


Am Oct 2, 2009 um 14:51  schrieb Scott Lewis:

Hi Eugen,

Eugen Reiswich wrote:
Hi folks,

I'm just trying to get familiar with Distributed OSGi with ECF. I followed the instructions here:

But when I try to launch my example I get the following error:
java.lang.LinkageError: loader constraint violation: loader (instance of org/eclipse/osgi/internal/baseadaptor/ DefaultClassLoader) previously initiated loading for a different type with name "de/c1wps/winterschool/domain/kunde/material/Kunde"
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.defineClass ( at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass ( at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl ( at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl ( at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass_LockClassLoader ( at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass ( at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass ( at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass ( at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal ( at org.eclipse.osgi.internal.loader.BundleLoader.findClass ( at org.eclipse.osgi.internal.loader.BundleLoader.findClass ( at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass (
at java.lang.ClassLoader.loadClass(
at java.lang.ClassLoader.loadClassInternal(
at (Unknown Source) at de.c1wps.winterschool.kundekontoverwalter.KundenVerwalter ._erstelleKunde(
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke ( at sun.reflect.DelegatingMethodAccessorImpl.invoke (
at java.lang.reflect.Method.invoke(
at org.eclipse.osgi.framework.internal.core.FrameworkCommandInterpreter.execute ( at org.eclipse.osgi.framework.internal.core.FrameworkConsole.docommand ( at org.eclipse.osgi.framework.internal.core.FrameworkConsole.console ( at (

I've already double checked that it's not the same error described here:

Everything seem to work fine when I use primitive data types as service interface parameters. By when I change the parameter types to more complex one the above exception is thrown.

A question: which distribution provider are you using? (i.e. r- osgi, ecf generic, jms...something else)? Also...what version of ECF are you currently using?

And are the service types in exported packages? In general, the types of the service interface parameters have to be in exported packages so that the distribution provider can dynamically load the class during parameter marshalling/unmarshalling. And finally...are your service types declared as implementing Serializable?

The classloading error you are getting:

java.lang.LinkageError: loader constraint violation: loader (instance of org/eclipse/osgi/internal/baseadaptor/ DefaultClassLoader) previously initiated loading for a different type with name "de/c1wps/winterschool/domain/kunde/material/Kunde"

makes me suspect that the service parameter types *are* exported, but that somehow you have more than one copy of the given class (de/ c1wps/winterschool/domain/kunde/material/Kunde) in your when the distribution provider goes to load a class with DynamicImport-Package, it finds the wrong version/copy of de/c1wps/ winterschool/domain/kunde/material/Kunde...since perhaps there are two (or more) available to the classloader (resulting in this LinkageError). If this is true (that there is more than one copy/ version of this service class in your runtime...perhaps in more than one bundle), then this duplication should be eliminated.

This may be some other issue/bug with the provider, however...e.g. something associated with the service parameter type not being please do let know which one is being used and whether the service types are Serializable.


ecf-dev mailing list

Back to the top