zoukankan      html  css  js  c++  java
  • Detected both log4j-over-slf4j.jar AND slf4j-log4j12.jar on the class path, preempting StackOverflowError

    SLF4J: Detected both log4j-over-slf4j.jar AND slf4j-log4j12.jar on the class path, preempting StackOverflowError. 
    SLF4J: See also http://www.slf4j.org/codes.html#log4jDelegationLoop for more details.
    Exception in thread "main" java.lang.ExceptionInInitializerError
        at org.apache.log4j.LogManager.getLogger(LogManager.java:44)
        at org.slf4j.impl.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:66)
        at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:277)
        at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:156)
        at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:132)
        at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:274)
        at org.springframework.context.support.AbstractApplicationContext.<init>(AbstractApplicationContext.java:164)
        at org.springframework.context.support.AbstractApplicationContext.<init>(AbstractApplicationContext.java:228)
        at org.springframework.context.support.AbstractRefreshableApplicationContext.<init>(AbstractRefreshableApplicationContext.java:89)
        at org.springframework.context.support.AbstractRefreshableConfigApplicationContext.<init>(AbstractRefreshableConfigApplicationContext.java:58)
        at org.springframework.context.support.AbstractXmlApplicationContext.<init>(AbstractXmlApplicationContext.java:61)
        at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:136)
        at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93)
        at com.solr.service.test.UserFeedBackQueryTest.main(UserFeedBackQueryTest.java:23)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
    Caused by: java.lang.IllegalStateException: Detected both log4j-over-slf4j.jar AND slf4j-log4j12.jar on the class path, preempting StackOverflowError. See also http://www.slf4j.org/codes.html#log4jDelegationLoop for more details.
        at org.apache.log4j.Log4jLoggerFactory.<clinit>(Log4jLoggerFactory.java:51)
        ... 19 more


    jar包冲突

     <exclusions>
                    <exclusion>
                        <groupId>org.slf4j</groupId>
                        <artifactId>slf4j-log4j12</artifactId>
                    </exclusion>
     </exclusions>
  • 相关阅读:
    FreeRTOS 移植到WIN10
    Keil debug command SAVE 命令保存文件的解析
    VS2017 编译 Visual Leak Detector + VLD 使用示例
    LaTeX 中插入GIF图片
    VS2017 + Qt5 + OpenCV400 环境配置
    记一次C++编程引用obj文件作为静态库文件
    Qt 多语言支持
    vscode 解决符号无法识别的问题
    带FIFO的UART数据接收
    MySQL Connector/Python 接口 (三)
  • 原文地址:https://www.cnblogs.com/sagech/p/5761709.html
Copyright © 2011-2022 走看看