java.lang.IllegalStateException: Could not evaluate condition on org.springframework.cloud.netflix.zuul.ZuulConfiguration#routeLocator due to javax/servlet/ServletContextListener not found. Make sure your own configuration does not rely on that class. This can also happen if you are @ComponentScanning a springframework package (e.g. if you put a @ComponentScan in the default package by mistake)

Stack Overflow | leo | 2 months ago
  1. 0

    Why this exception happens when start a spring boot admin application?

    Stack Overflow | 2 months ago | leo
    java.lang.IllegalStateException: Could not evaluate condition on org.springframework.cloud.netflix.zuul.ZuulConfiguration#routeLocator due to javax/servlet/ServletContextListener not found. Make sure your own configuration does not rely on that class. This can also happen if you are @ComponentScanning a springframework package (e.g. if you put a @ComponentScan in the default package by mistake)
  2. 0

    Condition evaluation failure when Spring Security except spring-security-web is on the classpath

    GitHub | 2 years ago | wilkinsona
    java.lang.IllegalStateException: Could not evaluate condition on org.springframework.boot.autoconfigure.security.SpringBootWebSecurityConfiguration#ignoredPathsWebSecurityConfigurerAdapter due to internal class not found. This can happen if you are @ComponentScanning a springframework package (e.g. if you put a @ComponentScan in the default package by mistake)
  3. 0

    Spring boot failing to start rest service

    Stack Overflow | 2 years ago | Sivasakthi Jayaraman
    java.lang.IllegalStateException: Could not evaluate condition on org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration#transactionManager due to internal class not found. This can happen if you are @ComponentScanning a springframework package (e.g. if you put a @ComponentScan in the default package by mistake)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Spring cloud consul class not found RestTemplateCustomizer

    Stack Overflow | 2 years ago | iamiddy
    java.lang.IllegalStateException: Could not evaluate condition on org.springframework.cloud.netflix.ribbon.RibbonAutoConfiguration#loadBalancerClient due to internal class not found. This can happen if you are @ComponentScanning a springframework package (e.g. if you put a @ComponentScan in the default package by mistake)
  6. 0

    getting a "Caused by: java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet" when starting springboot project from intellij

    Stack Overflow | 1 year ago | mkarthik415
    java.lang.IllegalStateException: Could not evaluate condition on org.springframework.boot.actuate.autoconfigure.AuditAutoConfiguration$AuditEventRepositoryConfiguration due to internal class not found. This can happen if you are @ComponentScanning a springframework package (e.g. if you put a @ComponentScan in the default package by mistake)

  1. Andreas Häber 3 times, last 2 weeks ago
  2. linxiaolong 6 times, last 2 months ago
  3. poroszd 2 times, last 3 months ago
  4. aldrinleal 2 times, last 4 months ago
  5. davidvanlaatum 15 times, last 6 months ago
1 more registered users
84 unregistered visitors
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.ClassNotFoundException

    javax.servlet.ServletContextListener

    at java.net.URLClassLoader.findClass()
  2. Java RT
    Class.getDeclaredMethods
    1. java.net.URLClassLoader.findClass(URLClassLoader.java:381)[?:1.8.0_101]
    2. java.lang.ClassLoader.loadClass(ClassLoader.java:424)[?:1.8.0_101]
    3. sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)[?:1.8.0_101]
    4. java.lang.ClassLoader.loadClass(ClassLoader.java:357)[?:1.8.0_101]
    5. java.lang.ClassLoader.defineClass1(Native Method)[?:1.8.0_101]
    6. java.lang.ClassLoader.defineClass(ClassLoader.java:763)[?:1.8.0_101]
    7. java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)[?:1.8.0_101]
    8. java.net.URLClassLoader.defineClass(URLClassLoader.java:467)[?:1.8.0_101]
    9. java.net.URLClassLoader.access$100(URLClassLoader.java:73)[?:1.8.0_101]
    10. java.net.URLClassLoader$1.run(URLClassLoader.java:368)[?:1.8.0_101]
    11. java.net.URLClassLoader$1.run(URLClassLoader.java:362)[?:1.8.0_101]
    12. java.security.AccessController.doPrivileged(Native Method)[?:1.8.0_101]
    13. java.net.URLClassLoader.findClass(URLClassLoader.java:361)[?:1.8.0_101]
    14. java.lang.ClassLoader.loadClass(ClassLoader.java:424)[?:1.8.0_101]
    15. sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)[?:1.8.0_101]
    16. java.lang.ClassLoader.loadClass(ClassLoader.java:357)[?:1.8.0_101]
    17. java.lang.Class.getDeclaredMethods0(Native Method)[?:1.8.0_101]
    18. java.lang.Class.privateGetDeclaredMethods(Class.java:2701)[?:1.8.0_101]
    19. java.lang.Class.getDeclaredMethods(Class.java:1975)[?:1.8.0_101]
    19 frames
  3. Spring Core
    ReflectionUtils.getUniqueDeclaredMethods
    1. org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:612)[spring-core-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    2. org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:524)[spring-core-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    3. org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:510)[spring-core-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    4. org.springframework.util.ReflectionUtils.getUniqueDeclaredMethods(ReflectionUtils.java:570)[spring-core-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    4 frames
  4. Spring Beans
    AbstractBeanFactory.isFactoryBean
    1. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getTypeForFactoryMethod(AbstractAutowireCapableBeanFactory.java:684)[spring-beans-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    2. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineTargetType(AbstractAutowireCapableBeanFactory.java:628)[spring-beans-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    3. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:597)[spring-beans-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    4. org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1450)[spring-beans-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    5. org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:980)[spring-beans-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    5 frames
  5. Spring Boot AutoConfigure
    SpringBootCondition.matches
    1. org.springframework.boot.autoconfigure.condition.BeanTypeRegistry$OptimizedBeanTypeRegistry.addBeanTypeForNonAliasDefinition(BeanTypeRegistry.java:320)[spring-boot-autoconfigure-1.4.1.RELEASE.jar:1.4.1.RELEASE]
    2. org.springframework.boot.autoconfigure.condition.BeanTypeRegistry$OptimizedBeanTypeRegistry.addBeanType(BeanTypeRegistry.java:309)[spring-boot-autoconfigure-1.4.1.RELEASE.jar:1.4.1.RELEASE]
    3. org.springframework.boot.autoconfigure.condition.BeanTypeRegistry$OptimizedBeanTypeRegistry.getNamesForType(BeanTypeRegistry.java:290)[spring-boot-autoconfigure-1.4.1.RELEASE.jar:1.4.1.RELEASE]
    4. org.springframework.boot.autoconfigure.condition.OnBeanCondition.collectBeanNamesForType(OnBeanCondition.java:184)[spring-boot-autoconfigure-1.4.1.RELEASE.jar:1.4.1.RELEASE]
    5. org.springframework.boot.autoconfigure.condition.OnBeanCondition.getBeanNamesForType(OnBeanCondition.java:173)[spring-boot-autoconfigure-1.4.1.RELEASE.jar:1.4.1.RELEASE]
    6. org.springframework.boot.autoconfigure.condition.OnBeanCondition.getMatchingBeans(OnBeanCondition.java:141)[spring-boot-autoconfigure-1.4.1.RELEASE.jar:1.4.1.RELEASE]
    7. org.springframework.boot.autoconfigure.condition.OnBeanCondition.getMatchOutcome(OnBeanCondition.java:114)[spring-boot-autoconfigure-1.4.1.RELEASE.jar:1.4.1.RELEASE]
    8. org.springframework.boot.autoconfigure.condition.SpringBootCondition.matches(SpringBootCondition.java:47)[spring-boot-autoconfigure-1.4.1.RELEASE.jar:1.4.1.RELEASE]
    8 frames
  6. Spring Context
    AbstractApplicationContext.refresh
    1. org.springframework.context.annotation.ConditionEvaluator.shouldSkip(ConditionEvaluator.java:102)[spring-context-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    2. org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForBeanMethod(ConfigurationClassBeanDefinitionReader.java:178)[spring-context-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    3. org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForConfigurationClass(ConfigurationClassBeanDefinitionReader.java:140)[spring-context-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    4. org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitions(ConfigurationClassBeanDefinitionReader.java:116)[spring-context-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    5. org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:336)[spring-context-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    6. org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:246)[spring-context-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    7. org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:273)[spring-context-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    8. org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:98)[spring-context-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    9. org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:681)[spring-context-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    10. org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:523)[spring-context-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    10 frames
  7. Spring Boot
    SpringApplication.run
    1. org.springframework.boot.SpringApplication.refresh(SpringApplication.java:761)[spring-boot-1.4.1.RELEASE.jar:1.4.1.RELEASE]
    2. org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:371)[spring-boot-1.4.1.RELEASE.jar:1.4.1.RELEASE]
    3. org.springframework.boot.SpringApplication.run(SpringApplication.java:315)[spring-boot-1.4.1.RELEASE.jar:1.4.1.RELEASE]
    4. org.springframework.boot.SpringApplication.run(SpringApplication.java:1186)[spring-boot-1.4.1.RELEASE.jar:1.4.1.RELEASE]
    5. org.springframework.boot.SpringApplication.run(SpringApplication.java:1175)[spring-boot-1.4.1.RELEASE.jar:1.4.1.RELEASE]
    5 frames
  8. com.yaofandai.admin
    AdminApplication.main
    1. com.yaofandai.admin.AdminApplication.main(AdminApplication.java:16)[classes/:?]
    1 frame
  9. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[?:1.8.0_101]
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[?:1.8.0_101]
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[?:1.8.0_101]
    4. java.lang.reflect.Method.invoke(Method.java:498)[?:1.8.0_101]
    4 frames
  10. IDEA
    AppMain.main
    1. com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)[idea_rt.jar:?]
    1 frame