I am not exactly sure what you are seeing here with the following
exception trace, but the original constraint violation is most likely
due to the fact that you have multiple sources for the same package,
which are getting crossed wired. Unfortunately, it is not always easy to
give a good error report when it comes to a constraint violation.
I will keep your email message and try to investigate this a little more
to see what the precise issues are, but right now I am traveling so it
may take a little while.
-> richard
Toni Menzel wrote:
Hi,
thanks for the hint but this gives another, maybe similar problem:
I first installed the compendium (started successfully this time),
then I tried to start the fileInstall Bundle, that gives me that
exception:
DEBUG: WIRE: 6.0 -> org.osgi.util.tracker -> 4.0
org.osgi.framework.BundleException: Activator start error.
at org.apache.felix.framework.Felix._startBundle(Felix.java:1269)
at org.apache.felix.framework.Felix.startBundle(Felix.java:1165)
at
org.apache.felix.framework.BundleImpl.start(BundleImpl.java:345)
at
org.apache.felix.shell.impl.StartCommandImpl.execute(StartCommandImpl.java:82)
at
org.apache.felix.shell.impl.Activator$ShellServiceImpl.executeCommand(Activator.java:265)
at
org.apache.felix.shell.tui.Activator$ShellTuiRunnable.run(Activator.java:167)
at java.lang.Thread.run(Thread.java:613)
Caused by: java.lang.LinkageError: Class
org/osgi/framework/BundleContext 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
org.apache.felix.framework.searchpolicy.ContentClassLoader.findClass(ContentClassLoader.java:149)
at
org.apache.felix.framework.searchpolicy.ContentClassLoader.loadClassFromModule(ContentClassLoader.java:51)
at
org.apache.felix.framework.searchpolicy.ContentLoaderImpl.getClass(ContentLoaderImpl.java:121)
at
org.apache.felix.framework.searchpolicy.R4SearchPolicyCore.findClassOrResource(R4SearchPolicyCore.java:358)
at
org.apache.felix.framework.searchpolicy.R4SearchPolicyCore.findClass(R4SearchPolicyCore.java:136)
at
org.apache.felix.framework.searchpolicy.R4SearchPolicy.findClass(R4SearchPolicy.java:45)
at
org.apache.felix.framework.searchpolicy.ContentClassLoader.loadClass(ContentClassLoader.java:70)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at
org.osgi.util.tracker.ServiceTracker.<init>(ServiceTracker.java:169)
at aQute.fileinstall.FileInstall.start(FileInstall.java:36)
at
org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:482)
at org.apache.felix.framework.Felix._startBundle(Felix.java:1224)
... 6 more
java.lang.LinkageError: Class org/osgi/framework/BundleContext
violates loader constraints
Does anyone tried that bundle successfully on felix before?
thx,Toni
Clement Escoffier schrieb:
Hello,
I had this problem with iPOJO in the previous version. It is a
modularity (i.e. import / export packages) problem. For me, it was
when my bundle imports and exports a package who is exported by the
compendium too. But my bundle does not specify the version number of
the imported and exported bundle.
Try the same scenario, but begin by installing the compendium. If it
works, check the imported and exported package from the fileInstall
bundle.
Regards,
Clement Escoffier
Toni Menzel a écrit :
Hi,
I just tried to install the "fileinstall" bundle from aqute.
For that I need org.osgi.util.tracker.
The only bundle I found in the felix-trunk is osgi-compendium.
(found the necessary bundle with grep -R
"Export-Package.*org.osgi.util.tracker" * .. there must be a
better..???)
Trying to install that bundle, it results into a constraint
violation exception.
here is what I've done:
-> install http://www.aqute.biz/uploads/Code/aQute.fileinstall-1.0.jar
-> ps
START LEVEL 1
ID State Level Name
[ 0] [Active ] [ 0] System Bundle (0.8.0.SNAPSHOT)
[ 1] [Active ] [ 1] ShellService (0.8.0.SNAPSHOT)
[ 2] [Active ] [ 1] ShellTUI (0.8.0.SNAPSHOT)
[ 3] [Active ] [ 1] BundleRepository (0.8.0.SNAPSHOT)
[ 4] [Active ] [ 1] HTTP Service (0.8.0.SNAPSHOT)
[ 5] [Installed ] [ 1] aQute.fileinstall (1.0)
-> start 5
org.osgi.framework.BundleException: Unresolved package in bundle 5:
org.osgi.util.tracker [version=1.3.0]
-> install
file:////Users/tmenzel/devel/felix/felix/trunk/org.osgi.compendium/target/org.osgi.compendium-0.8.0-SNAPSHOT.jar
-> start 6
DEBUG: Constraint violation detected, will try to repair.
org.osgi.framework.BundleException: Unable to resolve due to
constraint violation.
Where is the constraint violation and how do I get that information ??
Kind regards,
Toni