You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Roland <wg...@ids.de> on 2013/06/03 15:00:12 UTC

Compatibility problem between osgi 4.3 & felix bundle repository 1.6.6

Hello community,
After I integrated the Felix-Bundle-Repository
(org.apache.felix.bundlerepository 1.6.6) some OSGi 4.3 methods could not be
resolved such as Bundle.adapt () or Bundle.getVersion (). The reason is that
Felix-Bundle-Repository requires OSGi-Core-4.1.0.
As short-term solution I deleted the OSGi Core 4.1 dependency from the build
path. However, that is reversed if i run  eclipse:eclipse . Does anyone have
a better idea?

Thank you very much
Roland



--
View this message in context: http://apache-felix.18485.x6.nabble.com/Compatibility-problem-between-osgi-4-3-felix-bundle-repository-1-6-6-tp5003637.html
Sent from the Apache Felix - Users mailing list archive at Nabble.com.

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


Re: Compatibility problem between osgi 4.3 & felix bundle repository 1.6.6

Posted by Roland <wg...@ids.de>.
Problem solved. I reworked the whole dependency management.




--
View this message in context: http://apache-felix.18485.x6.nabble.com/Compatibility-problem-between-osgi-4-3-felix-bundle-repository-1-6-6-tp5003637p5003897.html
Sent from the Apache Felix - Users mailing list archive at Nabble.com.

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


Re: Compatibility problem between osgi 4.3 & felix bundle repository 1.6.6

Posted by Roland <wg...@ids.de>.
I tried to exclude the osgi.core version 4.1.

    <dependency>
      <groupId>org.apache.felix</groupId>
      <artifactId>org.apache.felix.bundlerepository</artifactId>
      <exclusions>
        <exclusion>
          <artifactId>org.osgi.core</artifactId>
          <groupId>org.osgi</groupId>
        </exclusion>
      </exclusions>
    </dependency>

but this has no results.

Is it ever planned in the near future to implement the RepositoryAdmin based
on the OSGi-Core version 4.3? I wanna use both the functionality of the
Core-Version 4.3 and the RepositoryAdmin Service. It seems to me that this
is not possible due to version-conflicts.

Regards
Roland



--
View this message in context: http://apache-felix.18485.x6.nabble.com/Compatibility-problem-between-osgi-4-3-felix-bundle-repository-1-6-6-tp5003637p5003879.html
Sent from the Apache Felix - Users mailing list archive at Nabble.com.

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


Re: Compatibility problem between osgi 4.3 & felix bundle repository 1.6.6

Posted by Roland <wg...@ids.de>.
Thank you for your reply...
The framework version is specified. This is not the reason for my problem, I
think.

<dependencies>
    <dependency>
      <groupId>org.osgi</groupId>
      <artifactId>org.osgi.compendium</artifactId>
    </dependency>
    <dependency>
      <groupId>org.osgi</groupId>
      <artifactId>core</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.felix</groupId>
      <artifactId>org.apache.felix.framework</artifactId>
    </dependency>
  </dependencies>
  <dependencyManagement>
    <dependencies>
       <dependency>
        <groupId>org.osgi</groupId>
        <artifactId>org.osgi.compendium</artifactId>
        <version>4.3.0</version>
      </dependency>
      <dependency>
        <groupId>org.osgi</groupId>
        <artifactId>core</artifactId>
        <version>4.3.0</version>
      </dependency>
      <dependency>
        <groupId>org.apache.felix</groupId>
        <artifactId>org.apache.felix.framework</artifactId>
        <version>4.2.1</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

I'll let you know when I've found the reason.



--
View this message in context: http://apache-felix.18485.x6.nabble.com/Compatibility-problem-between-osgi-4-3-felix-bundle-repository-1-6-6-tp5003637p5003660.html
Sent from the Apache Felix - Users mailing list archive at Nabble.com.

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


Re: Compatibility problem between osgi 4.3 & felix bundle repository 1.6.6

Posted by Holger Hoffstätte <ho...@googlemail.com>.
On 03.06.2013 15:00, Roland wrote:
> Hello community,
> After I integrated the Felix-Bundle-Repository
> (org.apache.felix.bundlerepository 1.6.6) some OSGi 4.3 methods could not be
> resolved such as Bundle.adapt () or Bundle.getVersion (). The reason is that
> Felix-Bundle-Repository requires OSGi-Core-4.1.0.
> As short-term solution I deleted the OSGi Core 4.1 dependency from the build
> path. However, that is reversed if i run  eclipse:eclipse . Does anyone have
> a better idea?

>From your description it sounds like you're using maven with the
old-style eclipse plugin (sane good choice btw) and the OBR jar simply
pulls in a transitive dependency, which due to classpath flattening &
maybe lexicographic sorting ends up in front of the classpath. This has
probably nothing to do with OSGi. :)

Most likely the problem is that your project does not explicitly depend
on a framework version and relies on one or more transitive
dependencies; consequently you're getting exactly what you asked for..or
more precisely *didn't* ask for.

Therefore the solution is probably simply to add the framework version
of choice as top-level dependency to your project. This should override
the inclusion of the older transitive version via OBR. If it does not,
dependency:tree will show you why the old framework is getting pulled
in. See [1] for more.

Ich hoffe das hilft weiter :)
Holger

[1] http://blog.sonatype.com/people/2010/05/maven-101-dependency-management/


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