Pax Logging
  1. Pax Logging
  2. PAXLOGGING-28

Pax-Logging unusable with Spring 2.5.4.A

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.1
    • Fix Version/s: 1.1.1
    • Component/s: None
    • Labels:
      None

      Description

      Spring Framework 2.5.4.A requires Apache JCL 1.1.1

      [Framework Event Dispatcher] INFO org.springframework.beans - FrameworkEvent ERROR
      org.osgi.framework.BundleException: The bundle could not be resolved. Reason: Missing Constraint: Import-Package: org.apache.commons.logging; version="[1.1.1,2.0.0)"
      at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:305)
      at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:350)
      at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1118)
      at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:634)
      at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:508)
      at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:282)
      at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:468)
      at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:195)
      at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:297)

      While Pax-Logging exports Apache JCL 1.0.4:

      bundle 3
      initial@reference:file:org.ops4j.pax.logging.pax-logging-api_1.1.0.jar/ [3]
      Id=3, Status=ACTIVE Data Root=/home/ceefour/project/hr3d/extras/vendor/runner/equinox/org.eclipse.osgi/bundles/3/data
      No registered services.
      Services in use:

      {org.osgi.service.log.LogService, org.knopflerfish.service.log.LogService, org.ops4j.pax.logging.PaxLoggingService, org.osgi.service.cm.ManagedService}

      =

      {service.id=21, service.pid=org.ops4j.pax.logging}

      Exported packages
      org.apache.juli.logging; version="1.0.0"[exported]
      org.knopflerfish.service.log; version="1.1.0"[exported]
      org.slf4j.spi; version="1.4.3"[exported]
      org.apache.log4j.spi; version="1.2.13"[exported]
      org.apache.avalon.framework.logger; version="4.3.0"[exported]
      org.apache.log4j.xml; version="1.2.13"[exported]
      org.apache.commons.logging; version="1.0.4"[exported]
      org.ops4j.pax.logging; version="1.1.0"[exported]
      org.apache.commons.logging.impl; version="1.0.4"[exported]
      org.apache.log4j; version="1.2.13"[exported]
      org.osgi.service.log; version="1.3.0"[exported]
      org.slf4j; version="1.4.3"[exported]
      org.slf4j.helpers; version="1.4.3"[exported]
      org.ops4j.pax.logging.avalon; version="1.1.0"[exported]
      Imported packages
      javax.xml.parsers; version="0.0.0"<System Bundle [0]>
      org.ops4j.pax.logging; version="1.1.0"<initial@reference:file:org.ops4j.pax.logging.pax-logging-api_1.1.0.jar/ [3]>
      org.ops4j.pax.logging.avalon; version="1.1.0"<initial@reference:file:org.ops4j.pax.logging.pax-logging-api_1.1.0.jar/ [3]>
      org.osgi.framework; version="1.4.0"<System Bundle [0]>
      org.osgi.service.event; version="1.1.0"<initial@reference:file:org.eclipse.osgi.services_3.1.200.v20070605.jar/ [2]>
      org.osgi.service.log; version="1.3.0"<initial@reference:file:org.eclipse.osgi.services_3.1.200.v20070605.jar/ [2]>
      org.osgi.util.tracker; version="1.3.3"<System Bundle [0]>
      org.w3c.dom; version="0.0.0"<System Bundle [0]>
      No fragment bundles
      Named class space
      org.ops4j.pax.logging.pax-logging-api; bundle-version="1.1.0"[provided]
      No required bundles

      Detailed diag on Spring 2.5.4.A:

      osgi> diag 9
      initial@reference:file:org.springframework.core_2.5.4.A.jar/ [9]
      Missing imported package edu.emory.mathcs.backport.java.util.concurrent_[3.0.0,4.0.0).
      Missing imported package org.apache.commons.attributes_[2.2.0,3.0.0).
      Missing imported package org.apache.commons.collections_[3.2.0,4.0.0).
      Missing imported package org.apache.commons.collections.map_[3.2.0,4.0.0).
      Missing imported package org.apache.commons.logging_[1.1.1,2.0.0).
      Missing imported package org.apache.log4j_[1.2.15,2.0.0).
      Missing imported package org.apache.log4j.xml_[1.2.15,2.0.0).
      Missing imported package org.aspectj.bridge_[1.5.4,2.0.0).
      Missing imported package org.aspectj.weaver_[1.5.4,2.0.0).
      Missing imported package org.aspectj.weaver.bcel_[1.5.4,2.0.0).
      Missing imported package org.aspectj.weaver.patterns_[1.5.4,2.0.0).

        Activity

        Hide
        Alin Dreghiciu added a comment -

        Resolved by exporting commons logging version 1.1.1 instead on 1.0.4 (actually it should work to export both versions but bnd seems to only export one, first one)
        Th only drawback will be for those bundles that imported a strict 1.0.4 version as in:
        org.apache.commons.logging;version="[1.0.4]"
        but the "usual":
        org.apache.commons.logging;version="1.0.4"
        will still work and will be wired to the 1.1.1 export from pax logging.

        I tested with spring 2.5.4.A that imports 1.1.1 and also with pax web which imports "1.0.4".

        Show
        Alin Dreghiciu added a comment - Resolved by exporting commons logging version 1.1.1 instead on 1.0.4 (actually it should work to export both versions but bnd seems to only export one, first one) Th only drawback will be for those bundles that imported a strict 1.0.4 version as in: org.apache.commons.logging;version=" [1.0.4] " but the "usual": org.apache.commons.logging;version="1.0.4" will still work and will be wired to the 1.1.1 export from pax logging. I tested with spring 2.5.4.A that imports 1.1.1 and also with pax web which imports "1.0.4".

          People

          • Assignee:
            Alin Dreghiciu
            Reporter:
            Hendy Irawan
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development