Uploaded image for project: 'ServiceMix'
  1. ServiceMix
  2. SM-3856

OSGi bundle for spring-core 5.1.1 is missing import of "org.apache.commons.logging.impl"

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Duplicate
    • bundles-2018.10
    • None
    • bundles
    • None

    Description

      The CompositeLog class of spring-core statically initializes an instance of org.apache.commons.logging.impl.NoOpLog. The bundle thus requires the impl package. Sample stacktrace:

      org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter': Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: Could not initialize class org.springframework.core.log.CompositeLog
      

      The import should be in the form

      org.apache.commons.logging.impl;version="[1.1.1,2)"
      

      I also noted that the commons logging imports are currently on resolution=optional. I believe they are not optional any more.

      Attachments

        Issue Links

          Activity

            People

              ffang Freeman Yue Fang
              o.otto Olaf Otto
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: