java.lang.IllegalAccessError: tried to access field org.slf4j.impl.StaticLoggerBinder.SINGLETON from class org.slf4j.LoggerFactory

Atlassian JIRA | James Roper [Atlassian] | 8 years ago
  1. 0

    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: {noformat} \- 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 {noformat} 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: {noformat} 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) {noformat} and is very strongly warned against by the [slf4j FAQs|http://www.slf4j.org/faq.html#compatibility]. Plugins depending on bamboo web can work around this issue by adding the following to their pom: {code:xml} <dependencyManagement> <dependencies> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> <version>1.5.6</version> </dependency> </dependencies> </dependencyManagement> {code} But really, this should be resolved at the bamboo web level.

    Atlassian JIRA | 8 years ago | James Roper [Atlassian]
    java.lang.IllegalAccessError: tried to access field org.slf4j.impl.StaticLoggerBinder.SINGLETON from class org.slf4j.LoggerFactory
  2. 0

    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: {noformat} \- 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 {noformat} 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: {noformat} 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) {noformat} and is very strongly warned against by the [slf4j FAQs|http://www.slf4j.org/faq.html#compatibility]. Plugins depending on bamboo web can work around this issue by adding the following to their pom: {code:xml} <dependencyManagement> <dependencies> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> <version>1.5.6</version> </dependency> </dependencies> </dependencyManagement> {code} But really, this should be resolved at the bamboo web level.

    Atlassian JIRA | 8 years ago | James Roper [Atlassian]
    java.lang.IllegalAccessError: tried to access field org.slf4j.impl.StaticLoggerBinder.SINGLETON from class org.slf4j.LoggerFactory
  3. 0

    Hibernate Community • View topic - Hibernate Annotations Error

    hibernate.org | 1 year ago
    java.lang.IllegalAccessError: tried to access field org.slf4j.impl.StaticLoggerBinder.SINGLETON from class org.slf4j.LoggerFactory
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Hibernate Community • View topic - Hibernate Annotations Error

    hibernate.org | 7 months ago
    java.lang.IllegalAccessError: tried to access field org.slf4j.impl.StaticLoggerBinder.SINGLETON from class org.slf4j.LoggerFactory
  6. 0

    javatalks.ru / Spring + mvn + integration tests

    javatalks.ru | 11 months ago
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [persistApplicationContext.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.transaction.config.internalTransactionAdvisor': Cannot create inner bean '(inner bean)' of type [org.springframework.transaction.interceptor.TransactionInterceptor] while setting bean property 'transactionInterceptor'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)': Cannot resolve reference to bean 'transactionManager' while setting bean property 'transactionManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager' defined in class path resource [persistApplicationContext.xml]: Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [persistApplicationContext.xml]: Invocation of init method failed; nested exception is java.lang.IllegalAccessError: tried to access field org.slf4j.impl.StaticLoggerBinder.SINGLETON from class org.slf4j.LoggerFactory

  1. mauritius 2 times, last 2 months ago
2 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.IllegalAccessError

    tried to access field org.slf4j.impl.StaticLoggerBinder.SINGLETON from class org.slf4j.LoggerFactory

    at org.slf4j.LoggerFactory.<clinit>()
  2. SLF4J API Module
    LoggerFactory.<clinit>
    1. org.slf4j.LoggerFactory.<clinit>(LoggerFactory.java:60)
    1 frame
  3. Apache Commons Logging
    SLF4JLogFactory.getInstance
    1. org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:155)
    1 frame