0

After updating Spring libraries, I see below exception:

java.lang.ClassCastException: org.apache.commons.logging.LogAdapter$Slf4jLocationAwareLog cannot be cast to org.apache.commons.logging.impl.Log4JLogger

I'd appreciate your helpful thoughts.

סטנלי גרונן
  • 2,917
  • 23
  • 46
  • 68

1 Answers1

1

I found the issue. It is because of spring.jcl jar which supports log 2.x but currently, I'm using 1.x, removing the jar makes it to work.

Spring Framework 5.0 comes with its own Commons Logging bridge out of the box: spring-jcl instead of standard Commons Logging; still excludable/overridable. Autodetecting Log4j 2.x, SLF4J, JUL (java.util.logging) without any extra bridges.