1 Reply Latest reply on Mar 12, 2014 12:57 PM by Claus Ibsen

    org.osgi.framework.BundleException:missing requirement [260.0] package; (&(package =javax.mail.internet)(version>=1.5.0)(!(version>=2.0.0)))

    Lydie Prevost Newbie

      I am getting this exception when I install a custum jar:

      install -s mvn:com.cgi.horizon/myjar/0.0.1

       

      org.osgi.framework.BundleException: Unresolved constraint in bundle XXXX [260]: Unable to resolve 260.0: missing requirement [260.0] package; (&(package

      =javax.mail.internet)(version>=1.5.0)(!(version>=2.0.0)))

       

      I understand that there is some javax.mail installed already with a different version. But 1.5.0 is the latest!

      I am inporting 1.5, the system seems to have 2.0.0 . I am not sure where it comes from

      And the export command gives 1.4

       

      Can somebody help me with that?

      Thank you

       

      here is what I have:

       

      my pom:

       

       

        <build>

        <finalName>${project.artifactId}</finalName>

        <plugin

        <plugin>

        <groupId>org.apache.maven.plugins</groupId>

        <artifactId>maven-compiler-plugin</artifactId>

        <version>2.3.2</version>

        <configuration>

        <source>1.7</source>

        <target>1.7</target>

        </configuration>

        </plugin>

        <plugin>

        <groupId>org.apache.felix</groupId>

        <artifactId>maven-bundle-plugin</artifactId>

        <version>2.3.6</version>

        <extensions>true</extensions>

        <configuration>

        <instructions>

        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>

        <Import-Package>*</Import-Package>

        </instructions>

        </configuration>

        </plugin>

        </plugins>

        </build>

       

        <properties>

        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

        </properties>

       

        <dependencies>

        <dependency>

        <groupId>junit</groupId>

        <artifactId>junit</artifactId>

        <version>3.8.1</version>

        <scope>test</scope>

        </dependency>

        <dependency>

        <groupId>javax.mail</groupId>

        <artifactId>mail</artifactId>

        <version>1.5.0-b01</version>

        </dependency>

        <dependency>

        <groupId>org.springframework.data</groupId>

        <artifactId>spring-data-mongodb</artifactId>

        <version>1.3.3.RELEASE</version>

        <scope>provided</scope>

        </dependency>

        <dependency>

        <groupId>org.codehaus.jackson</groupId>

        <artifactId>jackson-jaxrs</artifactId>

        <version>1.9.13</version>

        <scope>provided</scope>

        </dependency>

        <dependency>

        <groupId>org.apache.camel</groupId>

        <artifactId>camel-cxf</artifactId>

        <version>2.12.2</version>

        <scope>provided</scope>

        </dependency>

        </dependencies>

      </project>

       

       

       

      DynamicImport-Package =

              *

      Import-Package =

              com.mongodb;version="[2.10,3)",

              javax.mail;version="[1.5,2)",

              javax.mail.internet;version="[1.5,2)",

              javax.ws.rs.core;version="[2.0,3)",

              org.apache.cxf.jaxrs.client;version="[2.7,3)",

              org.codehaus.jackson.jaxrs;version="[1.9,2)",

              org.codehaus.jackson.map;version="[1.9,2)",

              org.springframework.beans.factory.annotation;version="[3.1,4)",

              org.springframework.data.annotation;version="[1.6,2)",

              org.springframework.data.mongodb.core;version="[1.3,2)",

              org.springframework.data.mongodb.core.mapping;version="[1.3,2)",

              org.springframework.data.mongodb.core.query;version="[1.3,2)",

              org.springframework.stereotype;version="[3.1,4)"

      Export-Package =

              com.cgi.horizon.util;

                      uses:="org.springframework.data.mongodb.core.mapping,

                              org.springframework.data.annotation,

                              org.springframework.data.mongodb.core,

                              org.springframework.beans.factory.annotation,

                              org.springframework.data.mongodb.core.query,

                              com.mongodb,

                              org.springframework.stereotype";

                      version=0.0.1,

              com.cgi.horizon.util.log;uses:=com.cgi.horizon.util;version=0.0.1,

              com.cgi.horizon.util.mailer;uses:="com.cgi.horizon.util,javax.mail.internet,javax.mail";version=0.0.1,

              com.cgi.horizon.util.mongo;

                      uses:="org.apache.cxf.jaxrs.client,

                              org.codehaus.jackson.jaxrs,

                              org.codehaus.jackson.map,

                              org.springframework.stereotype,

                              javax.ws.rs.core";

                      version=0.0.1

       

      karaf@root> exports|grep javax.mail

         109 javax.mail.internet; version=1.4.0

         109 javax.mail.util; version=1.4.0

         109 javax.mail.search; version=1.4.0

         109 javax.mail; version=1.4.0

         109 javax.mail.event; version=1.4.0