java.lang.IllegalArgumentException: LoggerFactory is not a Logback LoggerContext but Logback is on the classpath. Either remove Logback or the competing implementation (class org.apache.logging.slf4j.Log4jLoggerFactory loaded from file:/home/nurgasemetey/.m2/repository/org/apache/logging/log4j/log4j-slf4j-impl/2.6.2/log4j-slf4j-impl-2.6.2.jar). If you are using WebLogic you will need to add 'org.slf4j' to prefer-application-packages in WEB-INF/weblogic.xml Object of class [org.apache.logging.slf4j.Log4jLoggerFactory] must be an instance of class ch.qos.logback.classic.LoggerContext

GitHub | nurgasemetey | 8 months ago
tip
Do you find the tips below useful? Click on the to mark them and say thanks to rafael . Or join the community to write better ones.
  1. 0

    Multiple SLF4J bindings due Stream Kafka

    GitHub | 8 months ago | nurgasemetey
    java.lang.IllegalArgumentException: LoggerFactory is not a Logback LoggerContext but Logback is on the classpath. Either remove Logback or the competing implementation (class org.apache.logging.slf4j.Log4jLoggerFactory loaded from file:/home/nurgasemetey/.m2/repository/org/apache/logging/log4j/log4j-slf4j-impl/2.6.2/log4j-slf4j-impl-2.6.2.jar). If you are using WebLogic you will need to add 'org.slf4j' to prefer-application-packages in WEB-INF/weblogic.xml Object of class [org.apache.logging.slf4j.Log4jLoggerFactory] must be an instance of class ch.qos.logback.classic.LoggerContext
  2. 0
    samebug tip
    There's some conflicting dependencies in your pom.xml. Try adding an entry to exclude org.eclipse.jetty.aggregate from dependencies, as this seems to solve the problem.
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    Spring boot with cloudera hive jdbc pom issues

    Stack Overflow | 2 years ago | Amogh RAO
    java.lang.IllegalArgumentException: LoggerFactory is not a Logback LoggerContext but Logback is on the classpath. Either remove Logback or the competing implementation (class org.slf4j.impl.Log4jLoggerFactory loaded from file:/C:/Users/amoghrao/.m2/repository/org/slf4j/slf4j-log4j12/1.7.12/slf4j-log4j12-1.7.12.jar). If you are using Weblogic you will need to add 'org.slf4j' to prefer-application-packages in WEB-INF/weblogic.xml Object of class [org.slf4j.impl.Log4jLoggerFactory] must be an instance of class ch.qos.logback.classic.LoggerContext
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.IllegalArgumentException

    LoggerFactory is not a Logback LoggerContext but Logback is on the classpath. Either remove Logback or the competing implementation (class org.apache.logging.slf4j.Log4jLoggerFactory loaded from file:/home/nurgasemetey/.m2/repository/org/apache/logging/log4j/log4j-slf4j-impl/2.6.2/log4j-slf4j-impl-2.6.2.jar). If you are using WebLogic you will need to add 'org.slf4j' to prefer-application-packages in WEB-INF/weblogic.xml Object of class [org.apache.logging.slf4j.Log4jLoggerFactory] must be an instance of class ch.qos.logback.classic.LoggerContext

    at org.springframework.util.Assert.isInstanceOf()
  2. Spring Core
    Assert.isInstanceOf
    1. org.springframework.util.Assert.isInstanceOf(Assert.java:346)
    1 frame
  3. Spring Boot
    LoggingApplicationListener.onApplicationEvent
    1. org.springframework.boot.logging.logback.LogbackLoggingSystem.getLoggerContext(LogbackLoggingSystem.java:221)
    2. org.springframework.boot.logging.logback.LogbackLoggingSystem.getLogger(LogbackLoggingSystem.java:213)
    3. org.springframework.boot.logging.logback.LogbackLoggingSystem.beforeInitialize(LogbackLoggingSystem.java:98)
    4. org.springframework.boot.logging.LoggingApplicationListener.onApplicationStartedEvent(LoggingApplicationListener.java:222)
    5. org.springframework.boot.logging.LoggingApplicationListener.onApplicationEvent(LoggingApplicationListener.java:204)
    5 frames
  4. Spring Context
    SimpleApplicationEventMulticaster.multicastEvent
    1. org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:166)
    2. org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:138)
    3. org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:121)
    3 frames
  5. Spring Boot
    SpringApplication.run
    1. org.springframework.boot.context.event.EventPublishingRunListener.started(EventPublishingRunListener.java:62)
    2. org.springframework.boot.SpringApplicationRunListeners.started(SpringApplicationRunListeners.java:48)
    3. org.springframework.boot.SpringApplication.run(SpringApplication.java:303)
    4. org.springframework.boot.SpringApplication.run(SpringApplication.java:1185)
    5. org.springframework.boot.SpringApplication.run(SpringApplication.java:1174)
    5 frames
  6. com.parabol.iot
    CustomhttpApplication.main
    1. com.parabol.iot.customhttp.CustomhttpApplication.main(CustomhttpApplication.java:26)
    1 frame