Scenario : Facing bellow exception, While running hibernate sample application
log4j:WARN No appenders could be found for logger (org.hibernate.cfg.Environment).
log4j:WARN Please initialize the log4j system properly.
java.lang.AbstractMethodError: org.slf4j.impl.Log4jLoggerAdapter.isTraceEnabled()Z
Solution :
We guess that the slf4j-log4j bridge version you are using (usually a jar named slf4j-log4j
Thanks, yes that was the problem. I had two different version of jar in my path and I need to add both slf4j-log4j12-1.5.8.jar and slf4j-api-1.5.8.jar in the classpath.
So, I think Hibernate team should consider adding slf4j-log4j12-1.5.8.jar in the hibernate-distribution-3.3.2.GA distribuition. Currently, slf4j-api-1.5.8.jar is part of the distribution but not slf4j-log4j12-1.5.8.jar.
Jar Location : www.findJar.com -- Search "slf4j-log4j12-1.5.8.jar".
No comments:
Post a Comment
I'm certainly not an expert, but I'll try my hardest to explain what I do know and research what I don't know.