felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard S. Hall" <he...@ungoverned.org>
Subject Re: missing org.osgi.util.tracker reference, constraint violation
Date Mon, 20 Nov 2006 19:43:43 GMT
Richard S. Hall wrote:
> Toni Menzel wrote:
>> 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:
>
> I think I have at least tracked down why this exception is 
> occurring...the compendium bundle is accidentally getting the 
> org.osgi.framework classes included inside of it, which it should not. 
> Perhaps I have created the pom.xml for the new bundle plugin 
> incorrectly, I will investigate it further and get it working.

I committed a new pom.xml file for the OSGi Compendium bundle...this has 
fixed some of the issues for me. Update your copy of the trunk and let 
me know what issues you are still seeing.

-> richard

>
> -> richard
>
>> 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
>>>>
>>>
>>
>>

Mime
View raw message