org.springframework.beans.factory.BeanDefinitionStoreException

If you like a tip written by other Samebug users, mark is as helpful! Marks help our algorithm provide you better solutions and also help other users.
tip

A few things cause this exception: 1) Check if you have all jars and if they're in the correct path when running. 2) Your classpath might be broken, you can define it in the command line with "java -cp yourClassPath" or at your IDE if you're using one.

tip

Needs to add netty-transport-native-epoll with a OS classifier to the classpath, it's not included in netty-all

tip

This might be an issue with the file location in the Spark submit command. Try it with "spark-submit --master spark://master:7077 hello_world_from_pyspark.py {file location}"

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

  • IntelliJ with spring-boot-jetty-jsp
    via Stack Overflow by Programmer 400
    ,
  • GitHub comment 2#253169889
    via GitHub by pecdew
    ,
  • Problems with rendering JSP in spring boot
    via Stack Overflow by lenach87
    ,
  • Spring Boot JSP
    via Stack Overflow by nowszy94
    ,
  • GitHub comment 5#244719169
    via GitHub by mslosarz
    ,
  • Can't build project in IntelliJ
    via GitHub by intrade
    ,
    • org.springframework.beans.factory.BeanDefinitionStoreException: Failed to parse configuration class [sample.jetty.jsp.SampleJettyJspApplication]; nested exception is java.lang.IllegalStateException: Failed to introspect annotated methods on class org.springframework.boot.web.support.SpringBootServletInitializer at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:187)[spring-context-4.3.2.BUILD-20160715.204924-12.jar:4.3.2.BUILD-SNAPSHOT] at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:321)[spring-context-4.3.2.BUILD-20160715.204924-12.jar:4.3.2.BUILD-SNAPSHOT] at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:243)[spring-context-4.3.2.BUILD-20160715.204924-12.jar:4.3.2.BUILD-SNAPSHOT] at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:273)[spring-context-4.3.2.BUILD-20160715.204924-12.jar:4.3.2.BUILD-SNAPSHOT] at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:98)[spring-context-4.3.2.BUILD-20160715.204924-12.jar:4.3.2.BUILD-SNAPSHOT] at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:681)[spring-context-4.3.2.BUILD-20160715.204924-12.jar:4.3.2.BUILD-SNAPSHOT] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:523)[spring-context-4.3.2.BUILD-20160715.204924-12.jar:4.3.2.BUILD-SNAPSHOT] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759)[spring-boot-1.4.0.BUILD-SNAPSHOT.jar:1.4.0.BUILD-SNAPSHOT] at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:369)[spring-boot-1.4.0.BUILD-SNAPSHOT.jar:1.4.0.BUILD-SNAPSHOT] at org.springframework.boot.SpringApplication.run(SpringApplication.java:313)[spring-boot-1.4.0.BUILD-SNAPSHOT.jar:1.4.0.BUILD-SNAPSHOT] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1185)[spring-boot-1.4.0.BUILD-SNAPSHOT.jar:1.4.0.BUILD-SNAPSHOT] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1174)[spring-boot-1.4.0.BUILD-SNAPSHOT.jar:1.4.0.BUILD-SNAPSHOT] at sample.jetty.jsp.SampleJettyJspApplication.main(SampleJettyJspApplication.java:33)[classes/:na] Caused by: java.lang.IllegalStateException: Failed to introspect annotated methods on class org.springframework.boot.web.support.SpringBootServletInitializer at org.springframework.core.type.StandardAnnotationMetadata.getAnnotatedMethods(StandardAnnotationMetadata.java:163)[spring-core-4.3.2.BUILD-20160715.204924-12.jar:4.3.2.BUILD-SNAPSHOT] at org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:301)[spring-context-4.3.2.BUILD-20160715.204924-12.jar:4.3.2.BUILD-SNAPSHOT] at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:237)[spring-context-4.3.2.BUILD-20160715.204924-12.jar:4.3.2.BUILD-SNAPSHOT] at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:204)[spring-context-4.3.2.BUILD-20160715.204924-12.jar:4.3.2.BUILD-SNAPSHOT] at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:173)[spring-context-4.3.2.BUILD-20160715.204924-12.jar:4.3.2.BUILD-SNAPSHOT] ... 12 more Caused by: java.lang.NoClassDefFoundError: javax/servlet/ServletContext at java.lang.Class.getDeclaredMethods0(Native Method)[na:1.8.0_91] at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)[na:1.8.0_91] at java.lang.Class.getDeclaredMethods(Class.java:1975)[na:1.8.0_91] at org.springframework.core.type.StandardAnnotationMetadata.getAnnotatedMethods(StandardAnnotationMetadata.java:152)[spring-core-4.3.2.BUILD-20160715.204924-12.jar:4.3.2.BUILD-SNAPSHOT] ... 16 more Caused by: java.lang.ClassNotFoundException: javax.servlet.ServletContext at java.net.URLClassLoader.findClass(URLClassLoader.java:381)[na:1.8.0_91] at java.lang.ClassLoader.loadClass(ClassLoader.java:424)[na:1.8.0_91] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)[na:1.8.0_91] at java.lang.ClassLoader.loadClass(ClassLoader.java:357)[na:1.8.0_91] ... 20 more

    Users with the same issue

    jpveejpvee
    1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    SteVio1989SteVio1989
    6 times, last one,
    treefolktreefolk
    6 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    1431 more bugmates