mkhalil / log4jdbc

Automatically exported from code.google.com/p/log4jdbc
0 stars 0 forks source link

IllegalAccessError StaticLoggerBinder.SINGLETON #57

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Download latest log4jdbc
2. Download the latest slf4j
3. Conmnect any driver.

The latest slf4j now does not support the methods in log4dbc
See : http://slf4j.org/faq.html
 or just google the details below.

Why cant a logging APPLICATION AT LEAST JUST DEFAUlT TO STDOUT?

Here are the exception details.

Exception in thread "main" 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)

Original issue reported on code.google.com by rozzamo...@gmail.com on 19 Nov 2012 at 11:29

GoogleCodeExporter commented 8 years ago
Caused by: 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 net.sf.log4jdbc.Slf4jSpyLogDelegator.<init>(Slf4jSpyLogDelegator.java:45)
    at net.sf.log4jdbc.SpyLogFactory.<clinit>(SpyLogFactory.java:37)
    at net.sf.log4jdbc.DriverSpy.<clinit>(DriverSpy.java:106)

Original comment by rozzamo...@gmail.com on 19 Nov 2012 at 11:29

GoogleCodeExporter commented 8 years ago
It looks like you did not configure slf4j properly. (Notice exception is being 
thrown from slf4j itself.) Please provide more info. Exactly which jars did you 
include from slf4j?

Original comment by arthur.b...@gmail.com on 19 Nov 2012 at 1:06

GoogleCodeExporter commented 8 years ago
Setting status of this issue to invalid until you respond. Again I think you 
probably configured slf4j incorrectly (possibly only including only one of the 
required jars.)

Original comment by arthur.b...@gmail.com on 21 Nov 2012 at 2:40

GoogleCodeExporter commented 8 years ago
See http://slf4j.org/faq.html for details of the method that has changed.
Version 1.7 of SLF4j has changed the internals.

I got log4jdbc working correctly with 1.4.3 version of slf4j. All works well 
thank you.

Original comment by rozzamo...@gmail.com on 21 Nov 2012 at 4:03