Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » javax.annotation package
javax.annotation package [message #1004995] Thu, 24 January 2013 09:29 Go to next message
Mickael Istria is currently offline Mickael IstriaFriend
Messages: 865
Registered: July 2009
Location: Grenoble, France
Senior Member

Hi all,

As I'm trying to work on some API Tools for Tycho build, I'm hitting an
OSGi issue: Equinox can't load org.eclipse.e4.core.di bundle because of
missing javax.annotation package, whereas I use Java 6, which provide
this package:

$ java -jar plugins/org.eclipse.osgi_3.7.2.v20120110-1415.jar -console
osgi> packages
....
javax.annotation; version="0.0.0"<org.eclipse.osgi_3.7.2.v20120110-1415 [0]>
....

osgi> install
file:/home/mistria/git/apitooling/maven-plugins/apitools-plugin/src/test/resources/org.eclipse.e4.core.di_1.1.0.v20120627-124443.jar
Bundle id is 1

osgi> start org.eclipse.e4.core.di
org.osgi.framework.BundleException: The bundle
"org.eclipse.e4.core.di_1.1.0.v20120627-124443 [1]" could not be
resolved. Reason: Missing Constraint: Import-Package: javax.annotation;
version="1.0.0"
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.getResolverError(AbstractBundle.java:1327)
....


I thought this Import-Package could resolve to the JRE/System bundle. It
seems that it's not the case.
Is the only (good) way to get this bundle started to install also the
javax.annotation bunde?

Cheers,
--
Mickael Istria
JBoss, by Red Hat
My blog: http://mickaelistria.wordpress.com
My Tweets: http://twitter.com/mickaelistria
Re: javax.annotation package [message #1005083 is a reply to message #1004995] Thu, 24 January 2013 13:05 Go to previous message
BJ Hargrave is currently offline BJ HargraveFriend
Messages: 60
Registered: July 2009
Member
The package versions don't match. The system bundle exports at version 0 while you import at version 1. Since there are no standards for the package versions for the JRE packages, they are exported by the system bundle without version (which is version 0).
Previous Topic:Installable Unit Version - feature of plugin?
Next Topic:Equinox Issue and Question
Goto Forum:
  


Current Time: Thu Apr 18 03:18:01 GMT 2024

Powered by FUDForum. Page generated in 0.02026 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top