org.springframework.beans.factory.CannotLoadBeanClassException: Error loading class [org.springframework.boot.actuate.autoconfigure.ManagementSecurityAutoConfiguration$ManagementSecurityPropertiesConfiguration] for bean with name 'org.springframework.boot.actuate.autoconfigure.ManagementSecurityAutoConfiguration$ManagementSecurityPropertiesConfiguration' defined in null: problem with class file or dependent class; nested exception is java.lang.NoClassDefFoundError: org/springframework/boot/autoconfigure/security/SecurityPrerequisite

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

,
Expert tip

Look if your classpath is correct, and check if the versions of your libraries match the version you described in your pom.xml

Solutions on the web

via Stack Overflow by Sonam Daultani
, 1 year ago
$ManagementSecurityPropertiesConfiguration' defined in null: problem with class file or dependent class; nested exception is java.lang.NoClassDefFoundError: org/springframework/boot/autoconfigure/security/SecurityPrerequisite
via GitHub by gghai
, 2 years ago
Error loading class [com.marklogic.samplestack.web.security.SamplestackSecurityFilters] for bean with name 'samplestackSecurityFilters' defined in file [/space/builder/builds/macosx-64/HEAD/qa/marklogic-samplestack/appserver/java-spring/build
via Stack Overflow by barthuin
, 9 months ago
Cannot find class [org.springframework.orm.hibernate5.HibernateTrasactionManager] for bean with name 'transactionManager' defined in ServletContext resource [/WEB-INF/application-context-servlet.xml]; nested exception is java.lang.ClassNotFoundException: org.springframework.orm.hibernate5.HibernateTrasactionManager
via Stack Overflow by abdou amer
, 1 year ago
Error loading class [bo.boimpl.EngineBOImpl] for bean with name 'engineBo' defined in class path resource [spring/beans/engine.xml]: problem with class file or dependent class; nested exception is java.lang.NoClassDefFoundError: bo/EngineBO (wrong name: bo/engineBo)
via Stack Overflow by sunny
, 1 year ago
Cannot find class [com.tutorialspoint.HelloWorld] for bean with name 'helloWorld' defined in class path resource [Beans.xml]; nested exception is java.lang.ClassNotFoundException: com.tutorialspoint.HelloWorld
via Stack Overflow by Jahanzaib Suleman
, 2 years ago
Cannot find class [com.tutorialspoint.HelloWorld] for bean with name 'helloWorld' defined in class path resource [Beans.xml]; nested exception is java.lang.ClassNotFoundException: com.tutorialspoint.HelloWorld
java.lang.NoClassDefFoundError: org/springframework/boot/autoconfigure/security/SecurityPrerequisite
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2479)
at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:880)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1294)
at org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:395)
at org.springframework.beans.factory.support.AbstractBeanFactory.doResolveBeanClass(AbstractBeanFactory.java:1349)
at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1320)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineTargetType(AbstractAutowireCapableBeanFactory.java:622)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:591)
at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1397)
at org.springframework.boot.autoconfigure.condition.BeanTypeRegistry$OptimizedBeanTypeRegistry.addBeanTypeForNonAliasDefinition(BeanTypeRegistry.java:257)
at org.springframework.boot.autoconfigure.condition.BeanTypeRegistry$OptimizedBeanTypeRegistry.addBeanType(BeanTypeRegistry.java:246)
at org.springframework.boot.autoconfigure.condition.BeanTypeRegistry$OptimizedBeanTypeRegistry.getNamesForType(BeanTypeRegistry.java:227)
at org.springframework.boot.autoconfigure.condition.OnBeanCondition.collectBeanNamesForType(OnBeanCondition.java:154)
at org.springframework.boot.autoconfigure.condition.OnBeanCondition.getBeanNamesForType(OnBeanCondition.java:143)
at org.springframework.boot.autoconfigure.condition.OnBeanCondition.getMatchingBeans(OnBeanCondition.java:115)
at org.springframework.boot.autoconfigure.condition.OnBeanCondition.getMatchOutcome(OnBeanCondition.java:90)
at org.springframework.context.annotation.ConditionEvaluator.shouldSkip(ConditionEvaluator.java:102)
at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForBeanMethod(ConfigurationClassBeanDefinitionReader.java:190)
at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForConfigurationClass(ConfigurationClassBeanDefinitionReader.java:148)
at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitions(ConfigurationClassBeanDefinitionReader.java:124)
at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:318)
at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:239)
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:254)
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:94)
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:606)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:109)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:691)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:321)
at org.springframework.boot.context.web.SpringBootServletInitializer.run(SpringBootServletInitializer.java:117)
at org.springframework.boot.context.web.SpringBootServletInitializer.createRootApplicationContext(SpringBootServletInitializer.java:108)
at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:175)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5173)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1396)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Users with the same issue

Once, 5 months ago
Once, 6 months ago
12 times, 7 months ago
Once, 1 year ago
14 times, 1 year ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.