SLF4J NoSuchMethodError on LocationAwareLogger

前端 未结 8 1773

This is a question that has been asked before, but unfortunately no solution seems to work for me. I am facing this exception (with abridged stack trace):

ja         


        
8条回答
  •  广开言路
    2020-12-03 07:28

    This usually happens when you have dependencies that both use the same transitive dependency. This means that 2 of your dependencies (or your app, and a transitive dependency) are both using SLF4J internally with different versions. But your app can only use a single version of the class at the same time so it has to choose (don't know the rules here... random?)

    To solve the problem, you usually need to do a mvn dependency:tree to see which are using different versions of SLF4J.

    Adding this dependency solved the issue for me

    
        org.slf4j
        slf4j-api
        1.7.25
    
    
    
        org.slf4j
        slf4j-log4j12
        1.7.5
    
    

提交回复
热议问题