Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Spring Framework to 6.x #64

Open
ZakarFin opened this issue Jan 7, 2025 · 2 comments
Open

Update Spring Framework to 6.x #64

ZakarFin opened this issue Jan 7, 2025 · 2 comments
Assignees
Milestone

Comments

@ZakarFin
Copy link
Member

ZakarFin commented Jan 7, 2025

Possibly requires updating javax packages to jakarta.

https://spring.io/blog/2021/09/02/a-java-17-and-jakarta-ee-9-baseline-for-spring-framework-6

@ZakarFin ZakarFin added this to the 3.0.0 milestone Jan 7, 2025
@ZakarFin ZakarFin changed the title Update Spring 6.x Update Spring Framework to 6.x Jan 7, 2025
@osqq
Copy link

osqq commented Jan 16, 2025

When Spring version is upgraded to 6.0.0:

[ERROR] /Users/Oskari.Rintamaki/Documents/work/omagit/oskari-server/servlet-map/src/main/java/fi/nls/oskari/spring/GlobalExceptionHandlerController.java:[23,46] cannot access jakarta.servlet.ServletException [ERROR] class file for jakarta.servlet.ServletException not found [ERROR] /Users/Oskari.Rintamaki/Documents/work/omagit/oskari-server/servlet-map/src/main/java/fi/nls/oskari/spring/session/RedisSessionConfig.java:[12,57] cannot find symbol [ERROR] symbol: class WebMvcConfigurerAdapter [ERROR] location: package org.springframework.web.servlet.config.annotation [ERROR] /Users/Oskari.Rintamaki/Documents/work/omagit/oskari-server/servlet-map/src/main/java/fi/nls/oskari/spring/session/RedisSessionConfig.java:[19,41] cannot find symbol [ERROR] symbol: class WebMvcConfigurerAdapter [ERROR] /Users/Oskari.Rintamaki/Documents/work/omagit/oskari-server/servlet-map/src/main/java/fi/nls/oskari/spring/session/RedisSessionsConfigElasticCache.java:[8,57] cannot find symbol [ERROR] symbol: class WebMvcConfigurerAdapter [ERROR] location: package org.springframework.web.servlet.config.annotation [ERROR] /Users/Oskari.Rintamaki/Documents/work/omagit/oskari-server/servlet-map/src/main/java/fi/nls/oskari/spring/session/RedisSessionsConfigElasticCache.java:[12,55] cannot find symbol [ERROR] symbol: class WebMvcConfigurerAdapter [ERROR] /Users/Oskari.Rintamaki/Documents/work/omagit/oskari-server/servlet-map/src/main/java/fi/nls/oskari/spring/OskariRequestInterceptor.java:[12,5] method does not override or implement a method from a supertype [ERROR] /Users/Oskari.Rintamaki/Documents/work/omagit/oskari-server/servlet-map/src/main/java/fi/nls/oskari/spring/OskariRequestInterceptor.java:[19,5] method does not override or implement a method from a supertype [ERROR] /Users/Oskari.Rintamaki/Documents/work/omagit/oskari-server/servlet-map/src/main/java/fi/nls/oskari/spring/OskariRequestInterceptor.java:[26,5] method does not override or implement a method from a supertype [ERROR] /Users/Oskari.Rintamaki/Documents/work/omagit/oskari-server/servlet-map/src/main/java/fi/nls/oskari/spring/SpringConfig.java:[45,8] fi.nls.oskari.spring.SpringConfig is not abstract and does not override abstract method setServletContext(jakarta.servlet.ServletContext) in org.springframework.web.context.ServletContextAware [ERROR] /Users/Oskari.Rintamaki/Documents/work/omagit/oskari-server/servlet-map/src/main/java/fi/nls/oskari/spring/SpringInitializer.java:[20,8] fi.nls.oskari.spring.SpringInitializer is not abstract and does not override abstract method onStartup(jakarta.servlet.ServletContext) in org.springframework.web.WebApplicationInitializer [ERROR] /Users/Oskari.Rintamaki/Documents/work/omagit/oskari-server/servlet-map/src/main/java/fi/nls/oskari/spring/SpringInitializer.java:[31,23] cannot access jakarta.servlet.ServletContextListener [ERROR] class file for jakarta.servlet.ServletContextListener not found [ERROR] /Users/Oskari.Rintamaki/Documents/work/omagit/oskari-server/servlet-map/src/main/java/fi/nls/oskari/spring/SpringInitializer.java:[32,64] cannot access jakarta.servlet.http.HttpServlet [ERROR] class file for jakarta.servlet.http.HttpServlet not found [ERROR] /Users/Oskari.Rintamaki/Documents/work/omagit/oskari-server/servlet-map/src/main/java/fi/nls/oskari/spring/SpringInitializer.java:[40,18] cannot access jakarta.servlet.ServletContext [ERROR] class file for jakarta.servlet.ServletContext not found [ERROR] /Users/Oskari.Rintamaki/Documents/work/omagit/oskari-server/servlet-map/src/main/java/fi/nls/oskari/spring/ValidatingCookieLocaleResolver.java:[31,5] method does not override or implement a method from a supertype [ERROR] /Users/Oskari.Rintamaki/Documents/work/omagit/oskari-server/servlet-map/src/main/java/fi/nls/oskari/spring/ValidatingCookieLocaleResolver.java:[34,14] cannot access jakarta.servlet.http.HttpServletRequest [ERROR] class file for jakarta.servlet.http.HttpServletRequest not found [ERROR] /Users/Oskari.Rintamaki/Documents/work/omagit/oskari-server/servlet-map/src/main/java/fi/nls/oskari/spring/ValidatingCookieLocaleResolver.java:[54,45] incompatible types: javax.servlet.http.HttpServletRequest cannot be converted to jakarta.servlet.http.HttpServletRequest [ERROR] /Users/Oskari.Rintamaki/Documents/work/omagit/oskari-server/servlet-map/src/main/java/fi/nls/oskari/spring/security/SecurityInitializer.java:[24,8] fi.nls.oskari.spring.security.SecurityInitializer is not abstract and does not override abstract method onStartup(jakarta.servlet.ServletContext) in org.springframework.web.WebApplicationInitializer

https://spring.io/blog/2022/02/21/spring-security-without-the-websecurityconfigureradapter
https://www.baeldung.com/web-mvc-configurer-adapter-deprecated

@osqq
Copy link

osqq commented Jan 29, 2025

PR: oskariorg/oskari-server#1118

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

No branches or pull requests

2 participants