Uploaded image for project: 'Bamboo Data Center'
  1. Bamboo Data Center
  2. BAM-3894

Bamboo web imports conflicting versions of slf4j components

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Medium
    • 3.0
    • None
    • None

    Description

      If something (for example a Bamboo plugin) declares a dependency on bamboo-web 2.3-SNAPSHOT, Bamboo web will bring in conflicting versions of slf4j components:

       \- com.atlassian.bamboo:atlassian-bamboo-web:jar:2.3-SNAPSHOT:compile
          +- com.atlassian.bamboo:atlassian-bamboo-core:jar:2.3-SNAPSHOT:compile
          |  \- com.atlassian.bamboo:atlassian-bamboo-api:jar:2.3-SNAPSHOT:compile
          |     +- org.slf4j:slf4j-log4j12:jar:1.5.6:compile
          |     \- org.slf4j:jcl-over-slf4j:jar:1.5.6:compile
          \- com.atlassian.profiling:atlassian-profiling:jar:1.8:compile
             \- org.slf4j:slf4j-api:jar:1.4.3:compile
      

      As you can see, 1.4.3 API is imported while the implementation is 1.5.6. This causes the following error when trying to run jwebunit tests:

      java.lang.IllegalAccessError: tried to access field org.slf4j.impl.StaticLoggerBinder.SINGLETON from class org.slf4j.LoggerFactory
      	at org.slf4j.LoggerFactory.<clinit>(LoggerFactory.java:60)
      	at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:155)
      

      and is very strongly warned against by the slf4j FAQs.

      Plugins depending on bamboo web can work around this issue by adding the following to their pom:

          <dependencyManagement>
              <dependencies>
                  <dependency>
                      <groupId>org.slf4j</groupId>
                      <artifactId>slf4j-api</artifactId>
                      <version>1.5.6</version>
                  </dependency>
              </dependencies>
          </dependencyManagement>
      

      But really, this should be resolved at the bamboo web level.

      Attachments

        Activity

          People

            Unassigned Unassigned
            jroper James Roper [Atlassian]
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: