[logback-user] org.slf4j.impl.StaticLoggerBinder.SINGLETON

stlecho stlecho at gmail.com
Tue Oct 25 12:34:06 CEST 2011


I'm using the underneath listed dependencies and I'm receiving the same error
message: "java.lang.reflect.InvocationTargetException:
java.lang.IllegalAccessError: tried to access field
org.slf4j.impl.StaticLoggerBinder.SINGLETON from class
org.slf4j.LoggerFactory". 

What could I do to correct this ?

		<dependency>
		  <groupId>org.slf4j</groupId>
		  <artifactId>slf4j-api</artifactId>
		  <version>1.6.3</version>
		</dependency>
		<dependency>
		  <groupId>ch.qos.logback</groupId>
		  <artifactId>logback-core</artifactId>
		  <version>0.9.30</version>
		</dependency>
		<dependency>
		  <groupId>ch.qos.logback</groupId>
		  <artifactId>logback-classic</artifactId>
		  <version>0.9.30</version>
		</dependency>



Rusty Wright-2 wrote:
> 
> Upgrading to slf4j 1.5.6 fixes the problem for me.  I just discovered that
> 1.5.6 is available.
> 
> 
> Rusty Wright wrote:
>> I'm unable to create a bugzilla account at 
>> http://bugzilla.slf4j.org/createaccount.cgi
>> 
>> Could someone enter this bug report for me?
>> 
>> If I change my version of logback to 0.9.11 I don't get this.  I get it 
>> when I use logback version 0.9.13.  I'm using version 1.5.5 of slf4j.
>> 
>> Thanks
>> 
>> 
>> Running TestSuite
>> org.apache.maven.surefire.booter.SurefireExecutionException:
>> Cannot instantiate class edu.berkeley.ist.cars.net.email.EmailTest; 
>> nested exception is org.testng.TestNGException:
>> Cannot instantiate class edu.berkeley.ist.cars.net.email.EmailTest
>> org.testng.TestNGException:
>> Cannot instantiate class edu.berkeley.ist.cars.net.email.EmailTest
>>        at 
>> org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:35) 
>> 
>>        at 
>> org.testng.internal.ClassHelper.createInstance(ClassHelper.java:330)
>>        at 
>> org.testng.internal.ClassImpl.getDefaultInstance(ClassImpl.java:62)
>>        at org.testng.internal.ClassImpl.getInstances(ClassImpl.java:81)
>>        at 
>> org.testng.internal.TestNGClassFinder.<init>(TestNGClassFinder.java:114)
>>        at org.testng.TestRunner.initMethods(TestRunner.java:281)
>>        at org.testng.TestRunner.init(TestRunner.java:227)
>>        at org.testng.TestRunner.init(TestRunner.java:189)
>>        at org.testng.TestRunner.<init>(TestRunner.java:138)
>>        at 
>> org.testng.SuiteRunner$DefaultTestRunnerFactory.newTestRunner(SuiteRunner.java:477) 
>> 
>>        at org.testng.SuiteRunner.privateRun(SuiteRunner.java:244)
>>        at org.testng.SuiteRunner.run(SuiteRunner.java:198)
>>        at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:821)
>>        at org.testng.TestNG.runSuitesLocally(TestNG.java:788)
>>        at org.testng.TestNG.run(TestNG.java:708)
>>        at 
>> org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:62)
>>        at 
>> org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:141) 
>> 
>>        at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
>>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>        at 
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 
>> 
>>        at 
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 
>> 
>>        at java.lang.reflect.Method.invoke(Method.java:585)
>>        at 
>> org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:338) 
>> 
>>        at 
>> org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:997) 
>> 
>> Caused by: java.lang.reflect.InvocationTargetException
>>        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native 
>> Method)
>>        at 
>> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) 
>> 
>>        at 
>> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) 
>> 
>>        at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
>>        at 
>> org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:26) 
>> 
>>        ... 23 more
>> Caused by: java.lang.IllegalAccessError: tried to access field 
>> org.slf4j.impl.StaticLoggerBinder.SINGLETON from class 
>> org.slf4j.LoggerFactory
>>        at org.slf4j.LoggerFactory.staticInitialize(LoggerFactory.java:83)
>>        at org.slf4j.LoggerFactory.<clinit>(LoggerFactory.java:73)
>>        at 
>> org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:155) 
>> 
>>        at 
>> org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:131) 
>> 
>>        at
>> org.apache.commons.logging.LogFactory.getLog(LogFactory.java:272)
>>        at 
>> org.springframework.test.context.testng.AbstractTestNGSpringContextTests.<init>(AbstractTestNGSpringContextTests.java:77) 
>> 
>>        at 
>> edu.berkeley.ist.cars.net.email.EmailTest.<init>(EmailTest.java:21)
>>        ... 28 more
> _______________________________________________
> Logback-user mailing list
> Logback-user at qos.ch
> http://qos.ch/mailman/listinfo/logback-user
> 
> 

-- 
View this message in context: http://old.nabble.com/org.slf4j.impl.StaticLoggerBinder.SINGLETON-tp20987705p32716495.html
Sent from the Logback User mailing list archive at Nabble.com.



More information about the Logback-user mailing list