You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Lydie Prevost <lp...@completegenomics.com> on 2014/03/11 18:34:04 UTC

bundle exception

Hello,

I am trying to figure out why I get this exception when I install my custom jar in karaf :

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


Here is 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>
My manifest:
    Manifest-Version: 1.0
Bnd-LastModified: 1394496459530
Build-Jdk: 1.6.0_43
Built-By: lprevost
Bundle-ManifestVersion: 2
Bundle-Name: horizon-util
Bundle-SymbolicName: horizon-util
Bundle-Version: 0.0.1
Created-By: Apache Maven Bundle Plugin
Export-Package: com.cgi.horizon.util;uses:="org.springframework.data.mon
godb.core.mapping,org.springframework.data.annotation,org.springframewo
rk.data.mongodb.core,org.springframework.beans.factory.annotation,org.s
pringframework.data.mongodb.core.query,com.mongodb,org.springframework.
stereotype";version="0.0.1",com.cgi.horizon.util.log;uses:="com.cgi.hor
izon.util";version="0.0.1",com.cgi.horizon.util.mailer;uses:="com.cgi.h
orizon.util,javax.mail.internet,javax.mail";version="0.0.1",com.cgi.hor
izon.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"
Import-Package: com.mongodb;version="[2.10,3)",javax.mail;version="[1.4.
0,2.1.0)",javax.mail.internet;version="[1.5,2)",javax.ws.rs.core;versio
n="[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.d
ata.mongodb.core;version="[1.3,2)",org.springframework.data.mongodb.cor
e.mapping;version="[1.3,2)",org.springframework.data.mongodb.core.query
;version="[1.3,2)",org.springframework.stereotype;version="[3.1,4)"
Tool: Bnd-1.50.0


I also tried to have javax.* optional in the import but in this case I get the following exception:
org.osgi.framework.BundleException: Unresolved constraint in bundle XXXX[261]: Unable to resolve 261.0: mis
=org.apache.cxf.jaxrs.client)(version>=2.7.0)(!(version>=3.0.0)))


Any pointer would be appreciated.

Thank you


________________________________

The contents of this e-mail and any attachments are confidential and only for use by the intended recipient. Any unauthorized use, distribution or copying of this message is strictly prohibited. If you are not the intended recipient please inform the sender immediately by reply e-mail and delete this message from your system. Thank you for your co-operation.

Re: bundle exception

Posted by da...@apache.org.
Hi Lydie,

The javax.mail package is not part of the JRE, so you need to install
a bundle that provides this package. You can get it from [1]. BTW I
used http://jpm4j.org to find this information.

The next bundle that is missing in your list
(org.apache.cxf.jaxrs.client) can be found in the Apache CXF project
(http://cxf.apache.org).

Hope this helps,

David

[1] http://repo1.maven.org/maven2/com/sun/mail/javax.mail/1.5.1/javax.mail-1.5.1.jar

On 11 March 2014 17:34, Lydie Prevost <lp...@completegenomics.com> wrote:
> Hello,
>
> I am trying to figure out why I get this exception when I install my custom jar in karaf :
>
> 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)))
>
>
> Here is 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>
> My manifest:
>     Manifest-Version: 1.0
> Bnd-LastModified: 1394496459530
> Build-Jdk: 1.6.0_43
> Built-By: lprevost
> Bundle-ManifestVersion: 2
> Bundle-Name: horizon-util
> Bundle-SymbolicName: horizon-util
> Bundle-Version: 0.0.1
> Created-By: Apache Maven Bundle Plugin
> Export-Package: com.cgi.horizon.util;uses:="org.springframework.data.mon
> godb.core.mapping,org.springframework.data.annotation,org.springframewo
> rk.data.mongodb.core,org.springframework.beans.factory.annotation,org.s
> pringframework.data.mongodb.core.query,com.mongodb,org.springframework.
> stereotype";version="0.0.1",com.cgi.horizon.util.log;uses:="com.cgi.hor
> izon.util";version="0.0.1",com.cgi.horizon.util.mailer;uses:="com.cgi.h
> orizon.util,javax.mail.internet,javax.mail";version="0.0.1",com.cgi.hor
> izon.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"
> Import-Package: com.mongodb;version="[2.10,3)",javax.mail;version="[1.4.
> 0,2.1.0)",javax.mail.internet;version="[1.5,2)",javax.ws.rs.core;versio
> n="[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.d
> ata.mongodb.core;version="[1.3,2)",org.springframework.data.mongodb.cor
> e.mapping;version="[1.3,2)",org.springframework.data.mongodb.core.query
> ;version="[1.3,2)",org.springframework.stereotype;version="[3.1,4)"
> Tool: Bnd-1.50.0
>
>
> I also tried to have javax.* optional in the import but in this case I get the following exception:
> org.osgi.framework.BundleException: Unresolved constraint in bundle XXXX[261]: Unable to resolve 261.0: mis
> =org.apache.cxf.jaxrs.client)(version>=2.7.0)(!(version>=3.0.0)))
>
>
> Any pointer would be appreciated.
>
> Thank you
>
>
> ________________________________
>
> The contents of this e-mail and any attachments are confidential and only for use by the intended recipient. Any unauthorized use, distribution or copying of this message is strictly prohibited. If you are not the intended recipient please inform the sender immediately by reply e-mail and delete this message from your system. Thank you for your co-operation.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org