Skip to content

Bump spring-boot from 3.5.5 to 4.0.4 [#2625]#2588

Open
JoranVanBelle wants to merge 1 commit intocomixed:mainfrom
JoranVanBelle:chore/migrate-to-spring-boot-4
Open

Bump spring-boot from 3.5.5 to 4.0.4 [#2625]#2588
JoranVanBelle wants to merge 1 commit intocomixed:mainfrom
JoranVanBelle:chore/migrate-to-spring-boot-4

Conversation

@JoranVanBelle
Copy link
Copy Markdown
Contributor

@JoranVanBelle JoranVanBelle commented Feb 9, 2026

Fixes #2625

Status

READY

Does this PR contain migrations?

YES

Before You Submit Your PR:

  • Have you announced your PR on the comixed-dev mailing list?
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Refactors existing code (code changes for efficiency or maintainability)
  • Updates runtime dependencies but does not add new functionality
  • Security fix (be sure to include the CVE in the commit message)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@JoranVanBelle JoranVanBelle changed the title --wip-- [skip ci] Bump spring-boot version Mar 5, 2026
@JoranVanBelle JoranVanBelle force-pushed the chore/migrate-to-spring-boot-4 branch 2 times, most recently from 600b6aa to 0fc47ba Compare March 20, 2026 08:10
@JoranVanBelle JoranVanBelle force-pushed the chore/migrate-to-spring-boot-4 branch from 0fc47ba to 215f7cf Compare March 20, 2026 12:20
@JoranVanBelle JoranVanBelle force-pushed the chore/migrate-to-spring-boot-4 branch from 215f7cf to 1276ba7 Compare April 2, 2026 11:37
@JoranVanBelle JoranVanBelle changed the title Bump spring-boot version Bump spring-boot from 3.5.5 to 4.0.4 Apr 2, 2026
@JoranVanBelle JoranVanBelle force-pushed the chore/migrate-to-spring-boot-4 branch 2 times, most recently from f6d299f to a5b5d98 Compare April 2, 2026 12:15
@JoranVanBelle JoranVanBelle marked this pull request as ready for review April 2, 2026 12:26
@JoranVanBelle JoranVanBelle requested a review from mcpierce April 2, 2026 12:26
Copy link
Copy Markdown
Contributor

@mcpierce mcpierce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JoranVanBelle Looks very good, thank you!

Please address the requested changes, and also the issues reported by the automated tests so that they all pass. I saw four issues reported by SonarQube, though two of them are filename issues that seemed off.

Once those issues are addressed, I think this is ready to merge.

Comment thread comixed-batch/pom.xml Outdated
@JoranVanBelle JoranVanBelle force-pushed the chore/migrate-to-spring-boot-4 branch 3 times, most recently from a83c1ab to 4522215 Compare April 2, 2026 19:08
@JoranVanBelle
Copy link
Copy Markdown
Contributor Author

@mcpierce I resolved all the remarks (if I didn't miss one). Except the one of sonarQube, he complains about tests being similar. What should I do about those?

@mcpierce
Copy link
Copy Markdown
Contributor

mcpierce commented Apr 2, 2026

@mcpierce I resolved all the remarks (if I didn't miss one). Except the one of sonarQube, he complains about tests being similar. What should I do about those?

I went ahead and marked that as Acceptable.

Comment thread comixed-auth/pom.xml Outdated
@JoranVanBelle JoranVanBelle force-pushed the chore/migrate-to-spring-boot-4 branch 2 times, most recently from 2c9159b to 4664c9f Compare April 2, 2026 19:23
@JoranVanBelle JoranVanBelle changed the title Bump spring-boot from 3.5.5 to 4.0.4 Bump spring-boot from 3.5.5 to 4.0.4 [#2625] Apr 2, 2026
@JoranVanBelle JoranVanBelle force-pushed the chore/migrate-to-spring-boot-4 branch from 4664c9f to 1809998 Compare April 2, 2026 19:27
@JoranVanBelle JoranVanBelle requested a review from mcpierce April 2, 2026 19:42
@mcpierce
Copy link
Copy Markdown
Contributor

mcpierce commented Apr 2, 2026

@JoranVanBelle Are you able to run the build? I just tried building and running it locally and it's failing with the following:

APPLICATION FAILED TO START
***************************

Description:

Field objectMapper in org.comixedproject.messaging.AbstractPublishAction required a bean of type 'com.fasterxml.jackson.databind.ObjectMapper' that could not be found.

The injection point has the following annotations:
	- @org.springframework.beans.factory.annotation.Autowired(required=true)```

@JoranVanBelle JoranVanBelle force-pushed the chore/migrate-to-spring-boot-4 branch from 1809998 to f163f77 Compare April 3, 2026 07:51
@mcpierce
Copy link
Copy Markdown
Contributor

mcpierce commented Apr 3, 2026

@JoranVanBelle Are you able to run things locally? I'm generating the JAR files and attempting to run it and am hitting this issue now:


org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'addPagesToImageCacheInitiator': Unsatisfied dependency expressed through field 'jobOperator': Error creating bean with name 'batchJobOperator' defined in class path resource [org/comixedproject/batch/BatchConfiguration.class]: Failed to instantiate [org.springframework.batch.core.launch.support.JobOperatorFactoryBean]: Factory method 'batchJobOperator' threw exception with message: Cannot invoke "org.springframework.context.ApplicationContext.getBeansOfType(java.lang.Class)" because "this.applicationContext" is null
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:767) ~[spring-beans-7.0.6.jar!/:7.0.6]
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:748) ~[spring-beans-7.0.6.jar!/:7.0.6]
	at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:146) ~[spring-beans-7.0.6.jar!/:7.0.6]
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:493) ~[spring-beans-7.0.6.jar!/:7.0.6]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1446) ~[spring-beans-7.0.6.jar!/:7.0.6]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:602) ~[spring-beans-7.0.6.jar!/:7.0.6]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:525) ~[spring-beans-7.0.6.jar!/:7.0.6]
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:333) ~[spring-beans-7.0.6.jar!/:7.0.6]
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:371) ~[spring-beans-7.0.6.jar!/:7.0.6]
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:331) ~[spring-beans-7.0.6.jar!/:7.0.6]
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:196) ~[spring-beans-7.0.6.jar!/:7.0.6]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.instantiateSingleton(DefaultListableBeanFactory.java:1218) ~[spring-beans-7.0.6.jar!/:7.0.6]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingleton(DefaultListableBeanFactory.java:1184) ~[spring-beans-7.0.6.jar!/:7.0.6]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:1121) ~[spring-beans-7.0.6.jar!/:7.0.6]
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:994) ~[spring-context-7.0.6.jar!/:7.0.6]
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:621) ~[spring-context-7.0.6.jar!/:7.0.6]
	at org.springframework.boot.web.server.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:143) ~[spring-boot-web-server-4.0.4.jar!/:4.0.4]
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:756) ~[spring-boot-4.0.4.jar!/:4.0.4]
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:445) ~[spring-boot-4.0.4.jar!/:4.0.4]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:321) ~[spring-boot-4.0.4.jar!/:4.0.4]
	at org.comixedproject.ComiXedApp.main(ComiXedApp.java:50) ~[!/:3.3-SNAPSHOT]
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104) ~[na:na]
	at java.base/java.lang.reflect.Method.invoke(Method.java:565) ~[na:na]
	at org.springframework.boot.loader.launch.Launcher.launch(Launcher.java:106) ~[comixed-app-3.3-SNAPSHOT.jar:3.3-SNAPSHOT]
	at org.springframework.boot.loader.launch.Launcher.launch(Launcher.java:64) ~[comixed-app-3.3-SNAPSHOT.jar:3.3-SNAPSHOT]
	at org.springframework.boot.loader.launch.JarLauncher.main(JarLauncher.java:40) ~[comixed-app-3.3-SNAPSHOT.jar:3.3-SNAPSHOT]
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'batchJobOperator' defined in class path resource [org/comixedproject/batch/BatchConfiguration.class]: Failed to instantiate [org.springframework.batch.core.launch.support.JobOperatorFactoryBean]: Factory method 'batchJobOperator' threw exception with message: Cannot invoke "org.springframework.context.ApplicationContext.getBeansOfType(java.lang.Class)" because "this.applicationContext" is null
	at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:657) ~[spring-beans-7.0.6.jar!/:7.0.6]
	at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:645) ~[spring-beans-7.0.6.jar!/:7.0.6]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1362) ~[spring-beans-7.0.6.jar!/:7.0.6]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1194) ~[spring-beans-7.0.6.jar!/:7.0.6]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:565) ~[spring-beans-7.0.6.jar!/:7.0.6]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:525) ~[spring-beans-7.0.6.jar!/:7.0.6]
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:333) ~[spring-beans-7.0.6.jar!/:7.0.6]
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:371) ~[spring-beans-7.0.6.jar!/:7.0.6]
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:331) ~[spring-beans-7.0.6.jar!/:7.0.6]
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:201) ~[spring-beans-7.0.6.jar!/:7.0.6]
	at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:229) ~[spring-beans-7.0.6.jar!/:7.0.6]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1762) ~[spring-beans-7.0.6.jar!/:7.0.6]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1651) ~[spring-beans-7.0.6.jar!/:7.0.6]
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:764) ~[spring-beans-7.0.6.jar!/:7.0.6]
	... 25 common frames omitted
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.batch.core.launch.support.JobOperatorFactoryBean]: Factory method 'batchJobOperator' threw exception with message: Cannot invoke "org.springframework.context.ApplicationContext.getBeansOfType(java.lang.Class)" because "this.applicationContext" is null
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.lambda$instantiate$0(SimpleInstantiationStrategy.java:183) ~[spring-beans-7.0.6.jar!/:7.0.6]
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiateWithFactoryMethod(SimpleInstantiationStrategy.java:72) ~[spring-beans-7.0.6.jar!/:7.0.6]
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:152) ~[spring-beans-7.0.6.jar!/:7.0.6]
	at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:653) ~[spring-beans-7.0.6.jar!/:7.0.6]
	... 38 common frames omitted
Caused by: java.lang.NullPointerException: Cannot invoke "org.springframework.context.ApplicationContext.getBeansOfType(java.lang.Class)" because "this.applicationContext" is null
	at org.springframework.batch.core.launch.support.JobOperatorFactoryBean.populateJobRegistry(JobOperatorFactoryBean.java:115) ~[spring-batch-core-6.0.3.jar!/:6.0.3]
	at org.springframework.batch.core.launch.support.JobOperatorFactoryBean.afterPropertiesSet(JobOperatorFactoryBean.java:97) ~[spring-batch-core-6.0.3.jar!/:6.0.3]
	at org.comixedproject.batch.BatchConfiguration.batchJobOperator(BatchConfiguration.java:83) ~[comixed-batch-3.3-SNAPSHOT.jar!/:3.3-SNAPSHOT]
	at org.comixedproject.batch.BatchConfiguration$$SpringCGLIB$$0.CGLIB$batchJobOperator$2(<generated>) ~[comixed-batch-3.3-SNAPSHOT.jar!/:3.3-SNAPSHOT]
	at org.comixedproject.batch.BatchConfiguration$$SpringCGLIB$$FastClass$$1.invoke(<generated>) ~[comixed-batch-3.3-SNAPSHOT.jar!/:3.3-SNAPSHOT]
	at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:258) ~[spring-core-7.0.6.jar!/:7.0.6]
	at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:398) ~[spring-context-7.0.6.jar!/:7.0.6]
	at org.comixedproject.batch.BatchConfiguration$$SpringCGLIB$$0.batchJobOperator(<generated>) ~[comixed-batch-3.3-SNAPSHOT.jar!/:3.3-SNAPSHOT]
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104) ~[na:na]
	at java.base/java.lang.reflect.Method.invoke(Method.java:565) ~[na:na]
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.lambda$instantiate$0(SimpleInstantiationStrategy.java:155) ~[spring-beans-7.0.6.jar!/:7.0.6]
	... 41 common frames omitted

@JoranVanBelle JoranVanBelle force-pushed the chore/migrate-to-spring-boot-4 branch 2 times, most recently from 908a707 to 62a4d6e Compare April 3, 2026 14:16
@JoranVanBelle JoranVanBelle force-pushed the chore/migrate-to-spring-boot-4 branch 2 times, most recently from 97e5033 to 760cb7a Compare April 8, 2026 08:34
@mcpierce
Copy link
Copy Markdown
Contributor

@JoranVanBelle Please do a build and run the jar file locally to see if you're hitting the same issue I am. When I run with the cmdline:

java -jar comixed-app/target/comixed-app-3.3-SNAPSHOT.jar --logging.level.root=debug

I'm getting this output and the app fails to start:

2026-04-11T08:18:14.435-04:00 DEBUG 80808 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   : Application failed to start due to an exception

org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.springframework.cache.CacheManager' available: no CacheResolver specified - register a CacheManager bean or remove the @EnableCaching annotation from your configuration.
	at org.springframework.cache.interceptor.CacheAspectSupport.afterSingletonsInstantiated(CacheAspectSupport.java:287) ~[spring-context-7.0.6.jar!/:7.0.6]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:1147) ~[spring-beans-7.0.6.jar!/:7.0.6]
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:994) ~[spring-context-7.0.6.jar!/:7.0.6]
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:621) ~[spring-context-7.0.6.jar!/:7.0.6]
	at org.springframework.boot.web.server.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:143) ~[spring-boot-web-server-4.0.4.jar!/:4.0.4]
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:756) ~[spring-boot-4.0.4.jar!/:4.0.4]
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:445) ~[spring-boot-4.0.4.jar!/:4.0.4]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:321) ~[spring-boot-4.0.4.jar!/:4.0.4]
	at org.comixedproject.ComiXedApp.main(ComiXedApp.java:50) ~[!/:3.3-SNAPSHOT]
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104) ~[na:na]
	at java.base/java.lang.reflect.Method.invoke(Method.java:565) ~[na:na]
	at org.springframework.boot.loader.launch.Launcher.launch(Launcher.java:106) ~[comixed-app-3.3-SNAPSHOT.jar:3.3-SNAPSHOT]
	at org.springframework.boot.loader.launch.Launcher.launch(Launcher.java:64) ~[comixed-app-3.3-SNAPSHOT.jar:3.3-SNAPSHOT]
	at org.springframework.boot.loader.launch.JarLauncher.main(JarLauncher.java:40) ~[comixed-app-3.3-SNAPSHOT.jar:3.3-SNAPSHOT]

2026-04-11T08:18:14.436-04:00 ERROR 80808 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   :

***************************
APPLICATION FAILED TO START
***************************

Description:

A component required a bean of type 'org.springframework.cache.CacheManager' that could not be found.


Action:

Consider defining a bean of type 'org.springframework.cache.CacheManager' in your configuration.

@JoranVanBelle
Copy link
Copy Markdown
Contributor Author

@mcpierce My bad, I saw the tests were green and I assumed everything was fine.
Does this log line indicate everything went fine?
Screenshot 2026-04-11 at 22 55 07

@JoranVanBelle JoranVanBelle force-pushed the chore/migrate-to-spring-boot-4 branch 2 times, most recently from f992421 to 914ded1 Compare April 11, 2026 20:58
@mcpierce
Copy link
Copy Markdown
Contributor

mcpierce commented Apr 12, 2026

@JoranVanBelle Definitely getting closer! Are you able to login? When I try, I get the following:
image

(eta)

Separating out the frontend from the build, I'm seeing this when Angular tries to proxy to the upgraded server:
image

It seems the upgrade is disallowing connections.

@JoranVanBelle JoranVanBelle force-pushed the chore/migrate-to-spring-boot-4 branch from 914ded1 to 6e14114 Compare April 12, 2026 15:31
@JoranVanBelle
Copy link
Copy Markdown
Contributor Author

@mcpierce think it's fixed. When going to localhost:7171, I get the screen to register and can login afterwards

Copy link
Copy Markdown
Contributor

@mcpierce mcpierce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JoranVanBelle What end-to-end testing have you been running for this? For my tests I:

  1. verify the PR: mvn clean verify
  2. build a runnable jar file: mvn clean package
  3. run the jarfile: java -jar comixed-app/target/comixed-app-3.3-SNAPSHOT.jar --logging.level.root=debug --spring.h2.console.enabled=true
  4. interact with the system:
    1. check the schema in the dbconsole
    2. import comics
    3. scrape comics
    4. run batch jobs (organize, scrape, recreate)
    5. create/edit/delete reading lists

Would you mind running a few of those system interactions on your end to see if they work for you. When I try to access the dbconsole using H2 the system is redirecting me to the login page (it shouldn't do that in local mode). I'm still testing the others, and things are generally looking good at this point.

Also, could you please add to the UPGRADING.md file a note about going from v3 -> v4 that users will have to drop the Spring batch tables? We had similar notes for 1.6.1 -> v2.0.

@JoranVanBelle JoranVanBelle force-pushed the chore/migrate-to-spring-boot-4 branch 5 times, most recently from 8d8f5eb to 4dead9c Compare April 15, 2026 13:05
@JoranVanBelle JoranVanBelle force-pushed the chore/migrate-to-spring-boot-4 branch from 4dead9c to ebd2bf9 Compare April 15, 2026 13:16
@sonarqubecloud
Copy link
Copy Markdown

@JoranVanBelle
Copy link
Copy Markdown
Contributor Author

@mcpierce could you give it another look? The h2-console is back and I had some interactions with the system as well. I also copied the message from the previous migration and changed the version numbers to the most recent versions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bump Spring-boot to version 4.0.x

2 participants