felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Edelson <justinedel...@gmail.com>
Subject Re: BundleException: Unresolved constraint in bundle (package=org.apache.commons.lang)
Date Sat, 07 May 2011 16:39:30 GMT
You need to deploy a bundle which exports this package with a version within the range specified.
The version specification [2.5,3) means any version equal to or greater than 2.5 and less
than 3.0. Would suggest you read the sections of the OSGi spec describing versioning.

Justin

On May 7, 2011, at 11:02 AM, Bahadir Konu <bah.konu@gmail.com> wrote:

> Hi everybody,
> 
> I am new to Felix. I tried to read mail archive messages and documentation
> but still I couldnt solve the problem and I m losing time.
> 
> I have a bundle created by maven bundle plugin. I put that jar to
> FELIX_HOME/bundle
> When I run felix, I get his error:
> 
> ERROR: Bundle DynamicCalculator [5] Error starting
> file:/C:/tools/felix-framework-3.2.1/bundle/service-1.0.jar
> (org.osgi.framework.BundleException: Unresolved constraint in bundle
> DynamicCalculator [5]: Unable to resolve 5.0: missing requirement [5.0]
> package;
> (&(package=org.apache.commons.lang)(version>=2.5.0)(!(version>=3.0.0))))
> 
> My POM is:
> 
>    <modelVersion>4.0.0</modelVersion>
>    <groupId>com.bkonu.calculator</groupId>
>    <artifactId>service</artifactId>
>    <version>1.0</version>
>    <packaging>bundle</packaging>
> 
>    <dependencies>
>        <dependency>
>            <groupId>commons-lang</groupId>
>            <artifactId>commons-lang</artifactId>
>            <version>2.5</version>
>        </dependency>
>        <dependency>
>            <groupId>org.apache.felix</groupId>
>            <artifactId>org.apache.felix.framework</artifactId>
>            <version>2.0.0</version>
>        </dependency>
> 
>    </dependencies>
> 
>    <build>
>        <plugins>
>            <plugin>
>                <groupId>org.apache.maven.plugins</groupId>
>                <artifactId>maven-compiler-plugin</artifactId>
>                <version>2.0.2</version>
>                <configuration>
>                    <source>1.6</source>
>                    <target>1.6</target>
>                </configuration>
>            </plugin>
> 
>            <plugin>
>                <groupId>org.apache.felix</groupId>
>                <artifactId>maven-bundle-plugin</artifactId>
>                <extensions>true</extensions>
>                <configuration>
>                    <instructions>
> 
> <Bundle-SymbolicName>DynamicCalculatorService</Bundle-SymbolicName>
>                        <Import-Package>*</Import-Package>
> 
> <Export-Package>com.bkonu.calculator.service</Export-Package>
> 
> <Bundle-Activator>com.bkonu.calculator.ExpressionEvaluatorActivator</Bundle-Activator>
> 
>                    </instructions>
>                </configuration>
>            </plugin>
>        </plugins>
>    </build>
> 
> In the error message we see: (version>=2.5.0)(!(version>=3.0.0)   What s the
> meaning of this?
> 
> The manifest file in the jar is:
> 
> Manifest-Version: 1.0
> Export-Package: com.bkonu.calculator.service;uses:="org.apache.commons
> .lang"
> Tool: Bnd-1.15.0
> Bundle-Name: Unnamed - com.bkonu.calculator:service:bundle:1.0
> Created-By: Apache Maven Bundle Plugin
> Build-Jdk: 1.6.0_22
> Bundle-Version: 1.0.0
> Bnd-LastModified: 1304778448213
> Bundle-ManifestVersion: 2
> Bundle-Activator: com.bkonu.calculator.ExpressionEvaluatorActivator
> Bundle-License: http://www.apache.org/licenses/LICENSE-2.0
> Bundle-SymbolicName: DynamicCalculatorService
> Import-Package: com.bkonu.calculator.service,org.apache.commons.lang;v
> ersion="[2.5,3)",org.osgi.framework;version="[1.5,2)"
> 
> Should I change felix's config.properties? (Doesn't sound very logical for a
> maven dependency like apache.commons.lang)
> 
> Can anybody help please?
> 
> Thanks,
> Bahadır Konu

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


Mime
View raw message