Bundle org.eclipse.core.runtime cannot be resolved

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Bundle org.eclipse.core.runtime cannot be resolved

chill
Hi,
 
I want to compile an Eclipse project with Tycho. The problem is that there is a bundle that cannot be resolved: org.eclipse.core.runtime.  My target platform is made up from three repositories:
 
    <repository>
      <id>bundles.local</id>
      <layout>p2</layout>
      <url>file:///D:/eccenca/SMILA.eclipse/svn/SMILA/SMILA.extension/eclipse/repo</url>
    </repository>
 
    <repository>
      <id>Eclipse_3.5</id>
      <layout>p2</layout>
      <url>http://download.eclipse.org/releases/galileo</url>
    </repository>
 
    <repository>
      <id>Eclipse_3.5_upd</id>
      <layout>p2</layout>
      <url>http://download.eclipse.org/eclipse/updates/3.5</url>
    </repository>
 
Actually, the bundle org.eclipse.core.runtime is part of Eclipse core, so it should be available on Eclipse_3.5 or Eclipse_3.5_upd. Any ideas how to fix this problem and what repositories to use?
 
Regards
Christian
 
Reply | Threaded
Open this post in threaded view
|

Re: Bundle org.eclipse.core.runtime cannot be resolved

Brian de Alwis
Hi Christian.

You don't provide any details as to how you're using org.eclipse.core.runtime, whether as a bundle (Require-Bundle) or as a package (Import-Package).  But I'll guess that it's as Import-Package, as that's where I've had problems too.  (As have others, see TYCHO-524.)

org.eclipse.core.runtime is a split bundle [1], where there are three bundles providing the package.  As I understand it, using "Import-Package: org.eclipse.core.runtime" should result in the OSGi resolver wiring your bundle to just the org.eclipse.core.runtime bundle, and not the other 2 split bundles [2].  It would seem that the p2 resolver behaves slightly differently.  

There are details for addressing the issue [2,3], though none of the suggested solutions worked for me (nor others [4]).  I found it easier to just use Require-Bundle instead.

Brian.

[1] http://eclipsesource.com/blogs/2008/08/22/tip-split-packages-and-visibility/
[2] http://dev.eclipse.org/mhonarc/lists/eclipse-dev/msg07469.html
[3] http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse.platform.doc.isv/guide/runtime_components.htm
[4] http://software.2206966.n2.nabble.com/Why-org-eclipse-core-runtime-cannot-be-resolved-by-Tycho-td5770773.html

On 7-Mar-2011, at 5:10 AM, Christian Hill wrote:

> Hi,
>  
> I want to compile an Eclipse project with Tycho. The problem is that there is a bundle that cannot be resolved: org.eclipse.core.runtime.  My target platform is made up from three repositories:
>  
>     <repository>
>       <id>bundles.local</id>
>       <layout>p2</layout>
>       <url>file:///D:/eccenca/SMILA.eclipse/svn/SMILA/SMILA.extension/eclipse/repo</url>
>     </repository>
>  
>     <repository>
>       <id>Eclipse_3.5</id>
>       <layout>p2</layout>
>       <url>http://download.eclipse.org/releases/galileo</url>
>     </repository>
>  
>     <repository>
>       <id>Eclipse_3.5_upd</id>
>       <layout>p2</layout>
>       <url>http://download.eclipse.org/eclipse/updates/3.5</url>
>     </repository>
>  
> Actually, the bundle org.eclipse.core.runtime is part of Eclipse core, so it should be available on Eclipse_3.5 or Eclipse_3.5_upd. Any ideas how to fix this problem and what repositories to use?
>  
> Regards
> Christian
>  

Reply | Threaded
Open this post in threaded view
|

Re: Bundle org.eclipse.core.runtime cannot be resolved

chill
Thank you, Changing the bundle usage to require-bundle works for me as well.