Great resources on solving OSGi „Uses“ constraint violations

I recently had the „famous“ „uses“ constraint violation when building my OSGI application with PDE Build. It was complaining about:

Package uses conflict: Import-Package: javax.mail; version=“1.4.1″

The following resources have helped me locating the root cause and understanding the problem:

In my case the culprit was the following effect:

  • one bundle was doing a Require-Bundle: org.eclipse.osgi which is also referred to as the „OSGI system“ bundle. According to the first article in Java 6 it automatically exports some core packages of the JDK / JRE into the classpath like javax.activation
  • The problem was that in our OSGI target platform we also had the jar com.springsource.javax.activation-1.1.1.jar which also exports javax.activation
  • The bundle which caused the problem seems to need something from javax.activation (most likely through the import-package of javax.mail and OSGI was not able to resolve this dependency because javax.activation was exported from two sources (JDK because of Require-bundle: org.eclipse.osgi and the jar com.springsource.javax.activation-1.1.1.jar)


  • Modify MANIFEST.MF
  • replace Require-Bundle: org.eclipse.osgi with Import-package: org.osgi.framework

After that change the build was successful again.


Dieser Beitrag wurde unter Software-Development veröffentlicht. Setze ein Lesezeichen auf den Permalink.

2 Antworten auf Great resources on solving OSGi „Uses“ constraint violations

  1. Découvrez votre destinée avec le Tarot de Marseille qui sert de support de prédiction de ses puissantes arcanes révélatrices.
    Don de voyance extra lucide votre voyant vous propose des tirages de tarot de Marseille en consultations à domicile et en ligne et travaux occultes
    voyant médium consultations et services parapsychologie, bien-être et développement personnel

  2. Its onerous to search out knowledgeable people on this matter, but you sound like you understand what you

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.