Uploaded image for project: 'SLF4J'
  1. SLF4J
  2. SLF4J-178

OSGi meta data in 1.6

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: log4j-over-slf4j
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

      Description

      I'm working on integrating slf4j 1.6 in an osgi environment and have
      hit a stumbling block using the log4j-over-slf4j legacy support.

      The bundle exports the org.apache.log4j package using the default
      version (0.0.0) this causes problems when client code tries to use
      these packages if they declare an explicit import version range - in
      our case the imports are:

      Import-Package: org.apache.log4j;version=[1.2.14,1.3)

      0.0.0 is not in the range 1.2.14->1.3

      In my environment I've rebuilt the log4j-over-slf4j bundle with the
      following manifest which fixes the problem:

      $ cat log4j-over-slf4j/src/main/resources/META-INF/MANIFEST.MF
      Implementation-Title: log4j-over-slf4j
      Bundle-SymbolicName: log4j.over.slf4j
      Bundle-Name: log4j-over-slf4j
      Bundle-Vendor: SLF4J.ORG
      Export-Package: org.apache.log4j;version=1.2.14
      Import-Package: org.slf4j, org.slf4j.helpers, org.slf4j.spi

      However I'm just taking a wild guess that 1.2.14 is the version of the
      log4j api that this bundle provides.

        Attachments

          Activity

            People

            Assignee:
            slf4j-dev SLF4J developers list
            Reporter:
            davemssavage@googlemail.com David Savage
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: