Migration to 2.4 failed

Hi
I have a composite project with v 2.3.4 but when I tried to migrate the frist add-on of my composite project to v 2.4 in Studio 2.4.1 I got the following exception:

Unsupported class file major version 65

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':inteaccsm'.
> java.util.concurrent.ExecutionException: org.gradle.api.GradleException: Failed to create Jar file /Users/mak/.gradle/caches/jars-9/7d5453baa9d5cd801bfd8a9305a72aff/spring-core-6.1.9.jar.

I tried this by invalidate caches and cleaned but the same!

Then when I try to run my project, it don’t run anymore having the exception below:

2024-11-14T09:24:36.983-05:00 ERROR 14969 --- [onPool-worker-1] c.v.f.s.frontend.TaskRunDevBundleBuild   : Command `/Users/mak/.vaadin/node/node /Users/mak/Projects/myappERP/inteacc/node_modules/vite/bin/vite.js build` failed:
vite v5.4.2 building for production...
transforming...
✓ 44 modules transformed.
Comment replacement failed to change anything
x Build failed in 3.82s
error during build:
[vite]: Rollup failed to resolve import "@vaadin/component-base/src/define.js" from "/Users/mak/Projects/myappERP/inteacc/node_modules/@vaadin/vertical-layout/src/vaadin-vertical-layout.js".
This is most likely unintended because it can break your application at runtime.
If you do want to externalize this module explicitly add it to
`build.rollupOptions.external`
    at viteWarn (file:///Users/mak/Projects/myappERP/myapp/node_modules/.pnpm/vite@5.4.2/node_modules/vite/dist/node/chunks/dep-BzOvws4Y.js:65477:17)
    at Object.onwarn (file:///Users/mak/Projects/myappERP/myapp/vite.config.ts.timestamp-1731594271575-0dc164d5a0bbe.mjs:1231:11)
    at onwarn (file:///Users/mak/Projects/myappERP/myapp/node_modules/.pnpm/@vitejs+plugin-react@4.3.1_vite@5.4.2/node_modules/@vitejs/plugin-react/dist/index.mjs:264:40)
    at onRollupWarning (file:///Users/mak/Projects/myappERP/myapp/node_modules/.pnpm/vite@5.4.2/node_modules/vite/dist/node/chunks/dep-BzOvws4Y.js:65507:5)
    at onwarn (file:///Users/mak/Projects/myappERP/myapp/node_modules/.pnpm/vite@5.4.2/node_modules/vite/dist/node/chunks/dep-BzOvws4Y.js:65172:7)
    at file:///Users/mak/Projects/myappERP/myapp/node_modules/.pnpm/rollup@4.26.0/node_modules/rollup/dist/es/shared/node-entry.js:19470:13
    at Object.logger [as onLog] (file:///Users/mak/Projects/myappERP/myapp/node_modules/.pnpm/rollup@4.26.0/node_modules/rollup/dist/es/shared/node-entry.js:21196:9)
    at ModuleLoader.handleInvalidResolvedId (file:///Users/mak/Projects/myappERP/myapp/node_modules/.pnpm/rollup@4.26.0/node_modules/rollup/dist/es/shared/node-entry.js:20085:26)
    at file:///Users/mak/Projects/myappERP/myapp/node_modules/.pnpm/rollup@4.26.0/node_modules/rollup/dist/es/shared/node-entry.js:20043:26

2024-11-14T09:24:37.236-05:00 ERROR 14969 --- [nio-8080-exec-6] i.j.f.exception.UiExceptionHandlers      : There is no io.jmix.flowui.exception.UiExceptionHandler can handle the exception

java.lang.IllegalStateException: com.vaadin.flow.server.ExecutionFailedException: Vite build exited with a non zero status
	at com.vaadin.base.devserver.AbstractDevServerRunner.getCause(AbstractDevServerRunner.java:772) ~[vaadin-dev-server-24.4.8.jar:na]
	at com.vaadin.base.devserver.AbstractDevServerRunner.getCause(AbstractDevServerRunner.java:768) ~[vaadin-dev-server-24.4.8.jar:na]
	at com.vaadin.base.devserver.AbstractDevServerRunner.handleRequestInternal(AbstractDevServerRunner.java:631) ~[vaadin-dev-server-24.4.8.jar:na]
	at com.vaadin.base.devserver.DevBundleBuildingHandler.handleRequest(DevBundleBuildingHandler.java:94) ~[vaadin-dev-server-24.4.8.jar:na]
	at com.vaadin.flow.server.VaadinService.handleRequest(VaadinService.java:1584) ~[flow-server-24.4.8.jar:24.4.8]
	at com.vaadin.flow.server.VaadinServlet.service(VaadinServlet.java:398) ~[flow-server-24.4.8.jar:24.4.8]
	at com.vaadin.flow.spring.SpringServlet.service(SpringServlet.java:106) ~[vaadin-spring-24.4.8.jar:na]
	at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:614) ~[jakarta.servlet-api-6.0.0.jar:6.0.0]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:195) ~[tomcat-embed-core-10.1.30.jar:10.1.30]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140) ~[tomcat-embed-core-10.1.30.jar:10.1.30]
	at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:632) ~[tomcat-embed-core-10.1.30.jar:10.1.30]
	at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:408) ~[tomcat-embed-core-10.1.30.jar:10.1.30]
	at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:303) ~[tomcat-embed-core-10.1.30.jar:10.1.30]
	at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:267) ~[tomcat-embed-core-10.1.30.jar:10.1.30]
	at org.springframework.web.servlet.mvc.ServletForwardingController.handleRequestInternal(ServletForwardingController.java:142) ~[spring-webmvc-6.1.13.jar:6.1.13]
	at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:178) ~[spring-webmvc-6.1.13.jar:6.1.13]
	at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:51) ~[spring-webmvc-6.1.13.jar:6.1.13]
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1089) ~[spring-webmvc-6.1.13.jar:6.1.13]
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:979) ~[spring-webmvc-6.1.13.jar:6.1.13]
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1014) ~[spring-webmvc-6.1.13.jar:6.1.13]
	at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:903) ~[spring-webmvc-6.1.13.jar:6.1.13]
	at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:527) ~[jakarta.servlet-api-6.0.0.jar:6.0.0]
	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:885) ~[spring-webmvc-6.1.13.jar:6.1.13]
	at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:614) ~[jakarta.servlet-api-6.0.0.jar:6.0.0]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:195) ~[tomcat-embed-core-10.1.30.jar:10.1.30]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140) ~[tomcat-embed-core-10.1.30.jar:10.1.30]
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51) ~[tomcat-embed-websocket-10.1.30.jar:10.1.30]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164) ~[tomcat-embed-core-10.1.30.jar:10.1.30]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140) ~[tomcat-embed-core-10.1.30.jar:10.1.30]
	at io.jmix.core.impl.logging.LogMdcFilter.doFilterInternal(LogMdcFilter.java:28) ~[jmix-core-2.4.0.jar:na]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[spring-web-6.1.13.jar:6.1.13]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164) ~[tomcat-embed-core-10.1.30.jar:10.1.30]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140) ~[tomcat-embed-core-10.1.30.jar:10.1.30]
	at org.springframework.web.filter.CompositeFilter$VirtualFilterChain.doFilter(CompositeFilter.java:108) ~[spring-web-6.1.13.jar:6.1.13]
	at org.springframework.security.web.FilterChainProxy.lambda$doFilterInternal$3(FilterChainProxy.java:231) ~[spring-security-web-6.3.3.jar:6.3.3]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:365) ~[spring-security-web-6.3.3.jar:6.3.3]
	at org.springframework.security.web.access.intercept.AuthorizationFilter.doFilter(AuthorizationFilter.java:100) ~[spring-security-web-6.3.3.jar:6.3.3]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) ~[spring-security-web-6.3.3.jar:6.3.3]
	at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:126) ~[spring-security-web-6.3.3.jar:6.3.3]
	at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:120) ~[spring-security-web-6.3.3.jar:6.3.3]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) ~[spring-security-web-6.3.3.jar:6.3.3]
	at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:131) ~[spring-security-web-6.3.3.jar:6.3.3]
	at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:85) ~[spring-security-web-6.3.3.jar:6.3.3]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) ~[spring-security-web-6.3.3.jar:6.3.3]
	at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:100) ~[spring-security-web-6.3.3.jar:6.3.3]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) ~[spring-security-web-6.3.3.jar:6.3.3]
	at org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:145) ~[spring-security-web-6.3.3.jar:6.3.3]
	at org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:101) ~[spring-security-web-6.3.3.jar:6.3.3]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) ~[spring-security-web-6.3.3.jar:6.3.3]
	at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:179) ~[spring-security-web-6.3.3.jar:6.3.3]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) ~[spring-security-web-6.3.3.jar:6.3.3]
	at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63) ~[spring-security-web-6.3.3.jar:6.3.3]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) ~[spring-security-web-6.3.3.jar:6.3.3]
	at org.springframework.security.web.session.ConcurrentSessionFilter.doFilter(ConcurrentSessionFilter.java:151) ~[spring-security-web-6.3.3.jar:6.3.3]
	at org.springframework.security.web.session.ConcurrentSessionFilter.doFilter(ConcurrentSessionFilter.java:129) ~[spring-security-web-6.3.3.jar:6.3.3]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) ~[spring-security-web-6.3.3.jar:6.3.3]
	at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:227) ~[spring-security-web-6.3.3.jar:6.3.3]
	at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:221) ~[spring-security-web-6.3.3.jar:6.3.3]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) ~[spring-security-web-6.3.3.jar:6.3.3]
	at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:107) ~[spring-security-web-6.3.3.jar:6.3.3]
	at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:93) ~[spring-security-web-6.3.3.jar:6.3.3]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) ~[spring-security-web-6.3.3.jar:6.3.3]
	at org.springframework.security.web.csrf.CsrfFilter.doFilterInternal(CsrfFilter.java:117) ~[spring-security-web-6.3.3.jar:6.3.3]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[spring-web-6.1.13.jar:6.1.13]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) ~[spring-security-web-6.3.3.jar:6.3.3]
	at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:91) ~[spring-web-6.1.13.jar:6.1.13]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[spring-web-6.1.13.jar:6.1.13]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) ~[spring-security-web-6.3.3.jar:6.3.3]
	at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90) ~[spring-security-web-6.3.3.jar:6.3.3]
	at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75) ~[spring-security-web-6.3.3.jar:6.3.3]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[spring-web-6.1.13.jar:6.1.13]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) ~[spring-security-web-6.3.3.jar:6.3.3]
	at org.springframework.security.web.context.SecurityContextHolderFilter.doFilter(SecurityContextHolderFilter.java:82) ~[spring-security-web-6.3.3.jar:6.3.3]
	at org.springframework.security.web.context.SecurityContextHolderFilter.doFilter(SecurityContextHolderFilter.java:69) ~[spring-security-web-6.3.3.jar:6.3.3]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) ~[spring-security-web-6.3.3.jar:6.3.3]
	at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:62) ~[spring-security-web-6.3.3.jar:6.3.3]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[spring-web-6.1.13.jar:6.1.13]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) ~[spring-security-web-6.3.3.jar:6.3.3]
	at org.springframework.security.web.session.DisableEncodeUrlFilter.doFilterInternal(DisableEncodeUrlFilter.java:42) ~[spring-security-web-6.3.3.jar:6.3.3]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[spring-web-6.1.13.jar:6.1.13]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) ~[spring-security-web-6.3.3.jar:6.3.3]
	at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:233) ~[spring-security-web-6.3.3.jar:6.3.3]
	at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:191) ~[spring-security-web-6.3.3.jar:6.3.3]
	at org.springframework.web.filter.CompositeFilter$VirtualFilterChain.doFilter(CompositeFilter.java:113) ~[spring-web-6.1.13.jar:6.1.13]
	at org.springframework.web.servlet.handler.HandlerMappingIntrospector.lambda$createCacheFilter$3(HandlerMappingIntrospector.java:195) ~[spring-webmvc-6.1.13.jar:6.1.13]
	at org.springframework.web.filter.CompositeFilter$VirtualFilterChain.doFilter(CompositeFilter.java:113) ~[spring-web-6.1.13.jar:6.1.13]
	at org.springframework.web.filter.CompositeFilter.doFilter(CompositeFilter.java:74) ~[spring-web-6.1.13.jar:6.1.13]

Hi, @mortoza_khan

Please have a look at upgrade instruction. Here it is described how to fix this exception occurring on the application start after upgrading the project.

Regards,
Maria.

Thanks, I’ll try. But what was the reason of such manual step as it was migrating seamlessly in previous version?

@m.orlova
removed those files from root of my composite project but still having errors:

If you do want to externalize this module explicitly add it to
`build.rollupOptions.external`
    at viteWarn (file:///Users/mak/Projects/myappERP/myapp/node_modules/.pnpm/vite@5.4.2/node_modules/vite/dist/node/chunks/dep-BzOvws4Y.js:65477:17)
    at Object.onwarn (file:///Users/mak/Projects/myappERP/myapp/vite.config.ts.timestamp-1731646603926-6cdbd6c903b6a.mjs:1231:11)
    at onwarn (file:///Users/mak/Projects/myappERP/myapp/node_modules/.pnpm/@vitejs+plugin-react@4.3.1_vite@5.4.2/node_modules/@vitejs/plugin-react/dist/index.mjs:264:40)
    at onRollupWarning (file:///Users/mak/Projects/myappERP/myapp/node_modules/.pnpm/vite@5.4.2/node_modules/vite/dist/node/chunks/dep-BzOvws4Y.js:65507:5)
    at onwarn (file:///Users/mak/Projects/myappERP/myapp/node_modules/.pnpm/vite@5.4.2/node_modules/vite/dist/node/chunks/dep-BzOvws4Y.js:65172:7)
    at file:///Users/mak/Projects/myappERP/myapp/node_modules/.pnpm/rollup@4.26.0/node_modules/rollup/dist/es/shared/node-entry.js:19470:13
    at Object.logger [as onLog] (file:///Users/mak/Projects/myappERP/myapp/node_modules/.pnpm/rollup@4.26.0/node_modules/rollup/dist/es/shared/node-entry.js:21196:9)
    at ModuleLoader.handleInvalidResolvedId (file:///Users/mak/Projects/myappERP/myapp/node_modules/.pnpm/rollup@4.26.0/node_modules/rollup/dist/es/shared/node-entry.js:20085:26)
    at file:///Users/mak/Projects/myappERP/myapp/node_modules/.pnpm/rollup@4.26.0/node_modules/rollup/dist/es/shared/node-entry.js:20043:26

2024-11-14T23:56:48.611-05:00 DEBUG 24729 --- [nio-8080-exec-7] io.jmix.core.AccessLogger                : Denied access to [view: MainView] for user [anonymous] by io.jmix.securityflowui.constraint.UiShowViewConstraint
2024-11-14T23:56:48.768-05:00 ERROR 24729 --- [nio-8080-exec-1] i.j.f.exception.UiExceptionHandlers      : There is no io.jmix.flowui.exception.UiExceptionHandler can handle the exception

java.lang.IllegalStateException: com.vaadin.flow.server.ExecutionFailedException: Vite build exited with a non zero status
	at com.vaadin.base.devserver.AbstractDevServerRunner.getCause(AbstractDevServerRunner.java:772) ~[vaadin-dev-server-24.4.8.jar:na]
	at com.vaadin.base.devserver.AbstractDevServerRunner.getCause(AbstractDevServerRunner.java:768) ~[vaadin-dev-server-24.4.8.jar:na]
	at com.vaadin.base.devserver.AbstractDevServerRunner.handleRequestInternal(AbstractDevServerRunner.java:631) ~[vaadin-dev-server-24.4.8.jar:na]
	at com.vaadin.base.devserver.DevBundleBuildingHandler.handleRequest(DevBundleBuildingHandler.java:94) ~[vaadin-dev-server-24.4.8.jar:na]
	at