NoSuchMethodError with SLF4J API

前端 未结 8 2084
醉梦人生
醉梦人生 2021-01-03 19:19

When Use with slf4j,

String test = blahblahblah;
logger.info(\"{}\",test);

Trace as below

java.lang.NoSuchMethodError: org.         


        
8条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-03 20:12

    I expect that this is because of uncompatible version, like (if you are running your application 6.0 and holding a jar file (slf4j 1.5) or holding both (slf4j 1.5 and 1.6)) then exception might raised.

    suggestion is go for proper version dont place more than one version file (slf4f 1.5 and slf4j 1.6) file in the build path, delete the appropriate one

    and

    then run sure, you will get it.

提交回复
热议问题