java.lang.IllegalAccessError

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • javatalks.ru / Spring + mvn + integration tests
    via by Unknown author,
  • slf4j Illegal Access Exception
    via unitils by *anonymous
    ,
  • Crunch with Elastic MapReduce
    via by Shawn Smith,
  • 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.
    via by James Roper [Atlassian],
    • 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 p.ka.test.test_jstorm.TestSpout.<clinit>(TestSpout.java:19) at p.ka.test.test_jstorm.TestCommitTopology.main(TestCommitTopology.java:28)

    Users with the same issue

    mauritius
    2 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,