java.lang.NoSuchMethodError: org/apache/log4j/LogManager.setRepositorySelector(Lorg/apache/log4j/spi/RepositorySelector;Ljava/lang/Object;)V** Please help me know, how can we remove the conflict, so that, It's able to refer proper log4j1.2.15 specific LogManager. And, as jar which is using log4j is external to our system, we don't have much control over that. Below is the complete stack trace. Caused by: java.lang.NoSuchMethodError: org/apache/log4j/LogManager.setRepositorySelector(Lorg/apache/log4j/spi/RepositorySelector;Ljava/lang/Object;)V

Stack Overflow | JRishi | 6 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    log4j and log4j-overslf4j both in classpath conflicts in LogManager

    Stack Overflow | 6 months ago | JRishi
    java.lang.NoSuchMethodError: org/apache/log4j/LogManager.setRepositorySelector(Lorg/apache/log4j/spi/RepositorySelector;Ljava/lang/Object;)V** Please help me know, how can we remove the conflict, so that, It's able to refer proper log4j1.2.15 specific LogManager. And, as jar which is using log4j is external to our system, we don't have much control over that. Below is the complete stack trace. Caused by: java.lang.NoSuchMethodError: org/apache/log4j/LogManager.setRepositorySelector(Lorg/apache/log4j/spi/RepositorySelector;Ljava/lang/Object;)V

    Root Cause Analysis

    1. java.lang.NoSuchMethodError

      org/apache/log4j/LogManager.setRepositorySelector(Lorg/apache/log4j/spi/RepositorySelector;Ljava/lang/Object;)V** Please help me know, how can we remove the conflict, so that, It's able to refer proper log4j1.2.15 specific LogManager. And, as jar which is using log4j is external to our system, we don't have much control over that. Below is the complete stack trace. Caused by: java.lang.NoSuchMethodError: org/apache/log4j/LogManager.setRepositorySelector(Lorg/apache/log4j/spi/RepositorySelector;Ljava/lang/Object;)V

      at com.hsbc.es.logging.def.impl.log4j.Log4jLoggingTypeProvider.setContextualRepositorySelector()
    2. com.hsbc.es
      Log4jLoggingTypeProvider.<clinit>
      1. com.hsbc.es.logging.def.impl.log4j.Log4jLoggingTypeProvider.setContextualRepositorySelector(Log4jLoggingTypeProvider.java:117)
      2. com.hsbc.es.logging.def.impl.log4j.Log4jLoggingTypeProvider.<clinit>(Log4jLoggingTypeProvider.java:97)
      2 frames
    3. Java RT
      Class.newInstance
      1. java.lang.J9VMInternals.newInstanceImpl(Native Method)
      2. java.lang.Class.newInstance(Class.java:1887)
      2 frames
    4. com.hsbc.es
      LoggingTypeFactory.getDebugger
      1. com.hsbc.es.logging.LoggingTypeManagerFactory.discoverContextLoggingTypeManagerSPI(LoggingTypeManagerFactory.java:168)
      2. com.hsbc.es.logging.LoggingTypeManagerFactory.getContextLoggingTypeManagerSPI(LoggingTypeManagerFactory.java:98)
      3. com.hsbc.es.logging.def.LoggingTypeProviderFactory.getContextLoggingTypeProvider(LoggingTypeProviderFactory.java:49)
      4. com.hsbc.es.logging.def.LoggingTypeFactory.getDebugger(LoggingTypeFactory.java:58)
      4 frames