java.lang.IllegalArgumentException: Unable to use SearchStrategy.PARENTS Object of class [null] must be an instance of interface org.springframework.beans.factory.config.ConfigurableListableBeanFactory

SpringSource Issue Tracker | Martin Lippert | 2 years 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

    I imported spring-boot-actuator (among several other spring-boot projects) and doing a clean build produces a number of these exceptions: {noformat} java.lang.IllegalArgumentException: Unable to use SearchStrategy.PARENTS Object of class [null] must be an instance of interface org.springframework.beans.factory.config.ConfigurableListableBeanFactory at org.springframework.util.Assert.isInstanceOf(Assert.java:339) at org.springframework.boot.autoconfigure.condition.OnBeanCondition.getMatchingBeans(OnBeanCondition.java:104) at org.springframework.boot.autoconfigure.condition.OnBeanCondition.getMatchOutcome(OnBeanCondition.java:75) at org.springframework.boot.autoconfigure.condition.SpringBootCondition.matches(SpringBootCondition.java:44) at org.springframework.context.annotation.ConditionEvaluator.shouldSkip(ConditionEvaluator.java:92) at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader$TrackedConditionEvaluator.shouldSkip(ConfigurationClassBeanDefinitionReader.java:400) at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForConfigurationClass(ConfigurationClassBeanDefinitionReader.java:127) at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitions(ConfigurationClassBeanDefinitionReader.java:116) at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:324) at org.springframework.ide.eclipse.metadata.process.JdtConfigurationClassPostProcessor.postProcess(JdtConfigurationClassPostProcessor.java:87) at org.springframework.ide.eclipse.beans.core.internal.model.BeansJavaConfig$3.run(BeansJavaConfig.java:320) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.springframework.ide.eclipse.beans.core.internal.model.BeansJavaConfig.executePostProcessor(BeansJavaConfig.java:313) at org.springframework.ide.eclipse.beans.core.internal.model.BeansJavaConfig.access$5(BeansJavaConfig.java:311) at org.springframework.ide.eclipse.beans.core.internal.model.BeansJavaConfig$2.call(BeansJavaConfig.java:225) at org.springframework.ide.eclipse.beans.core.internal.model.BeansJavaConfig$2.call(BeansJavaConfig.java:1) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) {noformat}

    SpringSource Issue Tracker | 2 years ago | Martin Lippert (c)
    java.lang.IllegalArgumentException: Unable to use SearchStrategy.PARENTS Object of class [null] must be an instance of interface org.springframework.beans.factory.config.ConfigurableListableBeanFactory
  2. 0

    I imported spring-boot-actuator (among several other spring-boot projects) and doing a clean build produces a number of these exceptions: {noformat} java.lang.IllegalArgumentException: Unable to use SearchStrategy.PARENTS Object of class [null] must be an instance of interface org.springframework.beans.factory.config.ConfigurableListableBeanFactory at org.springframework.util.Assert.isInstanceOf(Assert.java:339) at org.springframework.boot.autoconfigure.condition.OnBeanCondition.getMatchingBeans(OnBeanCondition.java:104) at org.springframework.boot.autoconfigure.condition.OnBeanCondition.getMatchOutcome(OnBeanCondition.java:75) at org.springframework.boot.autoconfigure.condition.SpringBootCondition.matches(SpringBootCondition.java:44) at org.springframework.context.annotation.ConditionEvaluator.shouldSkip(ConditionEvaluator.java:92) at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader$TrackedConditionEvaluator.shouldSkip(ConfigurationClassBeanDefinitionReader.java:400) at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForConfigurationClass(ConfigurationClassBeanDefinitionReader.java:127) at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitions(ConfigurationClassBeanDefinitionReader.java:116) at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:324) at org.springframework.ide.eclipse.metadata.process.JdtConfigurationClassPostProcessor.postProcess(JdtConfigurationClassPostProcessor.java:87) at org.springframework.ide.eclipse.beans.core.internal.model.BeansJavaConfig$3.run(BeansJavaConfig.java:320) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.springframework.ide.eclipse.beans.core.internal.model.BeansJavaConfig.executePostProcessor(BeansJavaConfig.java:313) at org.springframework.ide.eclipse.beans.core.internal.model.BeansJavaConfig.access$5(BeansJavaConfig.java:311) at org.springframework.ide.eclipse.beans.core.internal.model.BeansJavaConfig$2.call(BeansJavaConfig.java:225) at org.springframework.ide.eclipse.beans.core.internal.model.BeansJavaConfig$2.call(BeansJavaConfig.java:1) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) {noformat}

    SpringSource Issue Tracker | 2 years ago | Martin Lippert
    java.lang.IllegalArgumentException: Unable to use SearchStrategy.PARENTS Object of class [null] must be an instance of interface org.springframework.beans.factory.config.ConfigurableListableBeanFactory
  3. 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.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 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

    Unable to use SearchStrategy.PARENTS Object of class [null] must be an instance of interface org.springframework.beans.factory.config.ConfigurableListableBeanFactory

    at org.springframework.util.Assert.isInstanceOf()
  2. Spring Core
    Assert.isInstanceOf
    1. org.springframework.util.Assert.isInstanceOf(Assert.java:339)
    1 frame
  3. Spring Boot AutoConfigure
    SpringBootCondition.matches
    1. org.springframework.boot.autoconfigure.condition.OnBeanCondition.getMatchingBeans(OnBeanCondition.java:104)
    2. org.springframework.boot.autoconfigure.condition.OnBeanCondition.getMatchOutcome(OnBeanCondition.java:75)
    3. org.springframework.boot.autoconfigure.condition.SpringBootCondition.matches(SpringBootCondition.java:44)
    3 frames
  4. Spring Context
    ConfigurationClassPostProcessor.processConfigBeanDefinitions
    1. org.springframework.context.annotation.ConditionEvaluator.shouldSkip(ConditionEvaluator.java:92)
    2. org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader$TrackedConditionEvaluator.shouldSkip(ConfigurationClassBeanDefinitionReader.java:400)
    3. org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForConfigurationClass(ConfigurationClassBeanDefinitionReader.java:127)
    4. org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitions(ConfigurationClassBeanDefinitionReader.java:116)
    5. org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:324)
    5 frames
  5. org.springframework.ide
    BeansJavaConfig$3.run
    1. org.springframework.ide.eclipse.metadata.process.JdtConfigurationClassPostProcessor.postProcess(JdtConfigurationClassPostProcessor.java:87)
    2. org.springframework.ide.eclipse.beans.core.internal.model.BeansJavaConfig$3.run(BeansJavaConfig.java:320)
    2 frames
  6. Eclipse Core
    SafeRunner.run
    1. org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    1 frame
  7. org.springframework.ide
    BeansJavaConfig$2.call
    1. org.springframework.ide.eclipse.beans.core.internal.model.BeansJavaConfig.executePostProcessor(BeansJavaConfig.java:313)
    2. org.springframework.ide.eclipse.beans.core.internal.model.BeansJavaConfig.access$5(BeansJavaConfig.java:311)
    3. org.springframework.ide.eclipse.beans.core.internal.model.BeansJavaConfig$2.call(BeansJavaConfig.java:225)
    4. org.springframework.ide.eclipse.beans.core.internal.model.BeansJavaConfig$2.call(BeansJavaConfig.java:1)
    4 frames
  8. Java RT
    Thread.run
    1. java.util.concurrent.FutureTask.run(FutureTask.java:266)
    2. java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    3. java.util.concurrent.FutureTask.run(FutureTask.java:266)
    4. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    5. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    6. java.lang.Thread.run(Thread.java:745)
    6 frames