Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled.
2025-06-27T16:28:16.031-04:00 ERROR 19860 --- [mysb] [ restartedMain] o.s.b.d.LoggingFailureAnalysisReporter :
***************************
APPLICATION FAILED TO START
***************************
Description:
An attempt was made to call a method that does not exist. The attempt was made from the following location:
org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer.<init>(ContentNegotiationConfigurer.java:109)
The following method did not exist:
'void org.springframework.web.accept.ContentNegotiationManagerFactoryBean.setServletContext(jakarta.servlet.ServletContext)'
The calling method's class, org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer, was loaded from the following location:
jar:file:/C:/Users/me/.m2/repository/org/springframework/spring-webmvc/6.2.8/spring-webmvc-6.2.8.jar!/org/springframework/web/servlet/config/annotation/ContentNegotiationConfigurer.class
The called method's class, org.springframework.web.accept.ContentNegotiationManagerFactoryBean, is available from the following locations:
jar:file:/C:/Users/me/.m2/repository/org/springframework/spring-web/7.0.0-M6/spring-web-7.0.0-M6.jar!/org/springframework/web/accept/ContentNegotiationManagerFactoryBean.class
The called method's class hierarchy was loaded from the following locations:
org.springframework.web.accept.ContentNegotiationManagerFactoryBean: file:/C:/Users/me/.m2/repository/org/springframework/spring-web/7.0.0-M6/spring-web-7.0.0-M6.jar
Action:
Correct the classpath of your application so that it contains compatible versions of the classes org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer and org.springframework.web.accept.ContentNegotiationManagerFactoryBean
Process finished with exit code 0
Experience keeps a dear School, but Fools will learn in no other.
---
Benjamin Franklin - Postal official and Weather observer
Experience keeps a dear School, but Fools will learn in no other.
---
Benjamin Franklin - Postal official and Weather observer
Tim Holloway wrote:Spring Boot Initilizr is a web site (start.spring.io). You fill in the form and it generates a complete Spring Boot project. You download it and import it into IntelliJ (or Eclipse, or whatever).
Helpful Hint: for a Maven project, run the goal "mvn intellij:intellij" and it will generate the Intellij metadata files so you don't have to manually set up stuff like project directory paths and the like.
Experience keeps a dear School, but Fools will learn in no other.
---
Benjamin Franklin - Postal official and Weather observer
Tim Holloway wrote:Let's start from the command line.
First, generate/download your Spring Boot app using initializr. I'm assuming you chose Maven to build the app and have Maven installed.
Now cd into the project directory and run "mvn spring-boot:run". That should build and run your prototype app. Probably displays a "hello world" page or something.
Now that you've built the app from the command line, run "mvn intellij:intellij". That will add IntelliJ metadata files to your Spring Boot project so that IntelliJ will know where your source files and other project resources are located.
At this point, launch IntelliJ and tell it to import your project. That should be all you need to get up and ready to develop your actual project code.
Tim Holloway wrote:Let's start from the command line.
First, generate/download your Spring Boot app using initializr. I'm assuming you chose Maven to build the app and have Maven installed.
Now cd into the project directory and run "mvn spring-boot:run". That should build and run your prototype app. Probably displays a "hello world" page or something.
Now that you've built the app from the command line, run "mvn intellij:intellij". That will add IntelliJ metadata files to your Spring Boot project so that IntelliJ will know where your source files and other project resources are located.
At this point, launch IntelliJ and tell it to import your project. That should be all you need to get up and ready to develop your actual project code.
...
java: cannot access org.springframework.beans.factory.BeanRegistrar
class file for org.springframework.com.beans.factory.BeanRegistrar not found
Experience keeps a dear School, but Fools will learn in no other.
---
Benjamin Franklin - Postal official and Weather observer
Tim Holloway wrote:Spring Boot has an embedded Tomcat server and it shouldn't be using server.xml. Tomcat can be embedded by instantiating the root Tomcat JavaBean and injecting properties into it. Which is basically what the stand-alone Tomcat launcher does after it digests server.xml.
That's assuming you set up to run Spring Boot as a JAR. If you set it up to run as a WAR, then you'd deploy that WAR into your own instance of Tomcat (or in IntelliJ's).
Or, in IntelliJ, if you set up to build a JAR, run/debug your Spring Boot app as a regular Java app, NOT as a webapp. Only run it as a webapp if you built a WAR.
You should not have to be adding any Spring dependencies to your POM at this level.
***************************
APPLICATION FAILED TO START
***************************
Description:
An attempt was made to call a method that does not exist. The attempt was made from the following location:
org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer.<init>(ContentNegotiationConfigurer.java:109)
The following method did not exist:
'void org.springframework.web.accept.ContentNegotiationManagerFactoryBean.setServletContext(jakarta.servlet.ServletContext)'
The calling method's class, org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer, was loaded from the following location:
jar:file:/C:/Users/PhillipPowell/.m2/repository/org/springframework/spring-webmvc/6.2.8/spring-webmvc-6.2.8.jar!/org/springframework/web/servlet/config/annotation/ContentNegotiationConfigurer.class
The called method's class, org.springframework.web.accept.ContentNegotiationManagerFactoryBean, is available from the following locations:
jar:file:/C:/Users/PhillipPowell/.m2/repository/org/springframework/spring-web/7.0.0-M6/spring-web-7.0.0-M6.jar!/org/springframework/web/accept/ContentNegotiationManagerFactoryBean.class
The called method's class hierarchy was loaded from the following locations:
org.springframework.web.accept.ContentNegotiationManagerFactoryBean: file:/C:/Users/PhillipPowell/.m2/repository/org/springframework/spring-web/7.0.0-M6/spring-web-7.0.0-M6.jar
Action:
Correct the classpath of your application so that it contains compatible versions of the classes org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer and org.springframework.web.accept.ContentNegotiationManagerFactoryBean
Process finished with exit code 0
Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled.
2025-06-30T11:44:58.761-04:00 ERROR 24588 --- [fvaplocal] [ restartedMain] o.s.boot.SpringApplication : Application run failed
java.lang.IllegalStateException: Error processing condition on org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration$WebMvcAutoConfigurationAdapter.defaultViewResolver
at org.springframework.boot.autoconfigure.condition.SpringBootCondition.matches(SpringBootCondition.java:60) ~[spring-boot-autoconfigure-3.5.3.jar:3.5.3]
at org.springframework.context.annotation.ConditionEvaluator.shouldSkip(ConditionEvaluator.java:99) ~[spring-context-6.2.8.jar:6.2.8]
at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForBeanMethod(ConfigurationClassBeanDefinitionReader.java:186) ~[spring-context-6.2.8.jar:6.2.8]
at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForConfigurationClass(ConfigurationClassBeanDefinitionReader.java:147) ~[spring-context-6.2.8.jar:6.2.8]
at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitions(ConfigurationClassBeanDefinitionReader.java:123) ~[spring-context-6.2.8.jar:6.2.8]
at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:430) ~[spring-context-6.2.8.jar:6.2.8]
at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:290) ~[spring-context-6.2.8.jar:6.2.8]
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:349) ~[spring-context-6.2.8.jar:6.2.8]
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:118) ~[spring-context-6.2.8.jar:6.2.8]
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:791) ~[spring-context-6.2.8.jar:6.2.8]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:609) ~[spring-context-6.2.8.jar:6.2.8]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146) ~[spring-boot-3.5.3.jar:3.5.3]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:752) ~[spring-boot-3.5.3.jar:3.5.3]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:439) ~[spring-boot-3.5.3.jar:3.5.3]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:318) ~[spring-boot-3.5.3.jar:3.5.3]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1361) ~[spring-boot-3.5.3.jar:3.5.3]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1350) ~[spring-boot-3.5.3.jar:3.5.3]
at gov.fvap.fvaplocal.FvapLocalApplication.main(FvapLocalApplication.java:91) ~[classes/:na]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na]
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
at java.base/java.lang.reflect.Method.invoke(Method.java:569) ~[na:na]
at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:50) ~[spring-boot-devtools-3.5.3.jar:3.5.3]
Caused by: java.lang.IllegalStateException: Failed to introspect Class [org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration$EnableWebMvcConfiguration] from ClassLoader [jdk.internal.loader.ClassLoaders$AppClassLoader@60e53b93]
at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:483) ~[spring-core-6.2.8.jar:6.2.8]
at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:360) ~[spring-core-6.2.8.jar:6.2.8]
at org.springframework.util.ReflectionUtils.getUniqueDeclaredMethods(ReflectionUtils.java:417) ~[spring-core-6.2.8.jar:6.2.8]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.lambda$getTypeForFactoryMethod$1(AbstractAutowireCapableBeanFactory.java:757) ~[spring-beans-6.2.8.jar:6.2.8]
at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1740) ~[na:na]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getTypeForFactoryMethod(AbstractAutowireCapableBeanFactory.java:756) ~[spring-beans-6.2.8.jar:6.2.8]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineTargetType(AbstractAutowireCapableBeanFactory.java:689) ~[spring-beans-6.2.8.jar:6.2.8]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:660) ~[spring-beans-6.2.8.jar:6.2.8]
at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1716) ~[spring-beans-6.2.8.jar:6.2.8]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doGetBeanNamesForType(DefaultListableBeanFactory.java:639) ~[spring-beans-6.2.8.jar:6.2.8]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:611) ~[spring-beans-6.2.8.jar:6.2.8]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:596) ~[spring-beans-6.2.8.jar:6.2.8]
at org.springframework.boot.autoconfigure.condition.OnBeanCondition.collectBeanDefinitionsForType(OnBeanCondition.java:322) ~[spring-boot-autoconfigure-3.5.3.jar:3.5.3]
at org.springframework.boot.autoconfigure.condition.OnBeanCondition.getBeanDefinitionsForType(OnBeanCondition.java:314) ~[spring-boot-autoconfigure-3.5.3.jar:3.5.3]
at org.springframework.boot.autoconfigure.condition.OnBeanCondition.getMatchingBeans(OnBeanCondition.java:214) ~[spring-boot-autoconfigure-3.5.3.jar:3.5.3]
at org.springframework.boot.autoconfigure.condition.OnBeanCondition.evaluateConditionalOnMissingBean(OnBeanCondition.java:197) ~[spring-boot-autoconfigure-3.5.3.jar:3.5.3]
at org.springframework.boot.autoconfigure.condition.OnBeanCondition.getMatchOutcome(OnBeanCondition.java:144) ~[spring-boot-autoconfigure-3.5.3.jar:3.5.3]
at org.springframework.boot.autoconfigure.condition.SpringBootCondition.matches(SpringBootCondition.java:47) ~[spring-boot-autoconfigure-3.5.3.jar:3.5.3]
... 22 common frames omitted
Caused by: java.lang.NoClassDefFoundError: org/springframework/web/servlet/ThemeResolver
at java.base/java.lang.Class.getDeclaredMethods0(Native Method) ~[na:na]
at java.base/java.lang.Class.privateGetDeclaredMethods(Class.java:3402) ~[na:na]
at java.base/java.lang.Class.getDeclaredMethods(Class.java:2504) ~[na:na]
at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:465) ~[spring-core-6.2.8.jar:6.2.8]
... 39 common frames omitted
Caused by: java.lang.ClassNotFoundException: org.springframework.web.servlet.ThemeResolver
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641) ~[na:na]
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188) ~[na:na]
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525) ~[na:na]
... 43 common frames omitted
Experience keeps a dear School, but Fools will learn in no other.
---
Benjamin Franklin - Postal official and Weather observer
Stephen Morris wrote:Have you looked at the Spring Boot tutorials?
They offer two learning paths. One is to follow along and type in the code and the other is to use a complete example.
Getting Started | Building an Application with Spring Boot https://spring.io/guides/gs/spring-boot/
Experience keeps a dear School, but Fools will learn in no other.
---
Benjamin Franklin - Postal official and Weather observer
Roland Mueller wrote:
Does the integration provide anything in addition to this manual approach?
Experience keeps a dear School, but Fools will learn in no other.
---
Benjamin Franklin - Postal official and Weather observer
Tim Holloway wrote:
Roland Mueller wrote:
Does the integration provide anything in addition to this manual approach?
It creates the metadata files used by IntelliJ. If memory serves and they haven't changed since I last looked closely (a LONG time ago!). IntelliJ had 3 primary XML metadata files. One was to define the project, one to define the current user's GUI state, and I forget the use of the third.
...
Experience keeps a dear School, but Fools will learn in no other.
---
Benjamin Franklin - Postal official and Weather observer
...
Experience keeps a dear School, but Fools will learn in no other.
---
Benjamin Franklin - Postal official and Weather observer
get schwifty. tiny ad:
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
|