Open
Description
Describe the bug
Project fails to start with mvn
due to
❯ mvn
[INFO] Scanning for projects...
[INFO]
[INFO] ----------------------------< fi.jole:koe >-----------------------------
[INFO] Building koe 1.0-SNAPSHOT
[INFO] from pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] >>> spring-boot:3.5.0:run (default-cli) > test-compile @ koe >>>
[INFO]
[INFO] --- resources:3.3.1:resources (default-resources) @ koe ---
[INFO] Copying 1 resource from src/main/resources to target/classes
[INFO] Copying 0 resource from src/main/resources to target/classes
[INFO]
[INFO] --- vaadin:24.8.0.beta2:prepare-frontend (default) @ koe ---
[INFO] Reflections took 957 ms to scan 305 urls, producing 18151 keys and 92481 values
[INFO] Visited 117 classes. Took 51 ms.
[INFO] Copying frontend resources from jar files ...
[INFO] Visited 307 resources. Took 58 ms.
[INFO]
[INFO] --- compiler:3.14.0:compile (default-compile) @ koe ---
[INFO] Recompiling the module because of changed source code.
[INFO] Compiling 17 source files with javac [debug parameters release 21] to target/classes
[INFO]
[INFO] --- resources:3.3.1:testResources (default-testResources) @ koe ---
[INFO] skip non existing resourceDirectory /Users/phoenix/dev/248/koe/src/test/resources
[INFO]
[INFO] --- compiler:3.14.0:testCompile (default-testCompile) @ koe ---
[INFO] Recompiling the module because of changed dependency.
[INFO] Compiling 4 source files with javac [debug parameters release 21] to target/test-classes
[INFO]
[INFO] <<< spring-boot:3.5.0:run (default-cli) < test-compile @ koe <<<
[INFO]
[INFO]
[INFO] --- spring-boot:3.5.0:run (default-cli) @ koe ---
[INFO] Attaching agents: []
2025-06-01T20:53:12.799-07:00 INFO 13579 --- [ restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : Devtools property defaults active! Set 'spring.devtools.add-properties' to 'false' to disable
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v3.5.0)
2025-06-01T20:53:12.992-07:00 INFO 13579 --- [ restartedMain] fi.jole.Application : No active profile set, falling back to 1 default profile: "default"
2025-06-01T20:53:13.359-07:00 INFO 13579 --- [ restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode.
2025-06-01T20:53:13.416-07:00 INFO 13579 --- [ restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 52 ms. Found 1 JPA repository interface.
2025-06-01T20:53:13.509-07:00 INFO 13579 --- [ restartedMain] o.s.cloud.context.scope.GenericScope : BeanFactory id=f3bfd6e2-43b9-3c24-b381-7ea0c2b4ebf7
2025-06-01T20:53:13.691-07:00 INFO 13579 --- [ restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port 8080 (http)
2025-06-01T20:53:13.698-07:00 INFO 13579 --- [ restartedMain] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2025-06-01T20:53:13.698-07:00 INFO 13579 --- [ restartedMain] o.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/10.1.41]
2025-06-01T20:53:13.724-07:00 INFO 13579 --- [ restartedMain] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2025-06-01T20:53:13.724-07:00 INFO 13579 --- [ restartedMain] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 725 ms
2025-06-01T20:53:13.831-07:00 INFO 13579 --- [ restartedMain] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing AtmosphereFramework
2025-06-01T20:53:14.271-07:00 INFO 13579 --- [ restartedMain] c.v.f.s.VaadinServletContextInitializer : Search for subclasses and classes with annotations took 370 ms
2025-06-01T20:53:14.485-07:00 INFO 13579 --- [ restartedMain] c.v.b.d.startup.DevModeStartupListener : Starting dev-mode updaters in /Users/phoenix/dev/248/koe folder.
2025-06-01T20:53:14.503-07:00 INFO 13579 --- [ restartedMain] c.v.f.s.f.s.FullDependenciesScanner : Visited 115 classes. Took 12 ms.
2025-06-01T20:53:14.504-07:00 INFO 13579 --- [ restartedMain] c.v.f.s.frontend.BundleValidationUtil : Checking if a development mode bundle build is needed
2025-06-01T20:53:14.580-07:00 INFO 13579 --- [ restartedMain] c.v.f.s.frontend.BundleValidationUtil : A development mode bundle build is not needed
2025-06-01T20:53:14.592-07:00 INFO 13579 --- [in-dev-server-1] c.v.f.s.frontend.TaskCopyFrontendFiles : Copying frontend resources from jar files ...
2025-06-01T20:53:14.599-07:00 WARN 13579 --- [ restartedMain] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Failed to initialize dependency 'flyway' of LoadTimeWeaverAware bean 'entityManagerFactory': Error creating bean with name 'flyway' defined in class path resource [org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration$FlywayConfiguration.class]: Circular depends-on relationship between 'flyway' and 'entityManagerFactory'
2025-06-01T20:53:14.600-07:00 INFO 13579 --- [ restartedMain] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
2025-06-01T20:53:14.602-07:00 WARN 13579 --- [ restartedMain] o.a.c.loader.WebappClassLoaderBase : The web application [ROOT] appears to have started a thread named [JNA Cleaner] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
java.base/jdk.internal.misc.Unsafe.park(Native Method)
java.base/java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:269)
java.base/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1852)
java.base/java.lang.ref.ReferenceQueue.await(ReferenceQueue.java:79)
java.base/java.lang.ref.ReferenceQueue.remove0(ReferenceQueue.java:151)
java.base/java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:229)
com.sun.jna.internal.Cleaner$CleanerThread.run(Cleaner.java:154)
2025-06-01T20:53:14.610-07:00 INFO 13579 --- [ restartedMain] .s.b.a.l.ConditionEvaluationReportLogger :
Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled.
2025-06-01T20:53:14.619-07:00 ERROR 13579 --- [ restartedMain] o.s.boot.SpringApplication : Application run failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Failed to initialize dependency 'flyway' of LoadTimeWeaverAware bean 'entityManagerFactory': Error creating bean with name 'flyway' defined in class path resource [org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration$FlywayConfiguration.class]: Circular depends-on relationship between 'flyway' and 'entityManagerFactory'
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:328) ~[spring-beans-6.2.7.jar:6.2.7]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:207) ~[spring-beans-6.2.7.jar:6.2.7]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:970) ~[spring-context-6.2.7.jar:6.2.7]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:627) ~[spring-context-6.2.7.jar:6.2.7]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146) ~[spring-boot-3.5.0.jar:3.5.0]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:753) ~[spring-boot-3.5.0.jar:3.5.0]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:439) ~[spring-boot-3.5.0.jar:3.5.0]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:318) ~[spring-boot-3.5.0.jar:3.5.0]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1362) ~[spring-boot-3.5.0.jar:3.5.0]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1351) ~[spring-boot-3.5.0.jar:3.5.0]
at fi.jole.Application.main(Application.java:21) ~[classes/:na]
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) ~[na:na]
at java.base/java.lang.reflect.Method.invoke(Method.java:580) ~[na:na]
at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:50) ~[spring-boot-devtools-3.5.0.jar:3.5.0]
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flyway' defined in class path resource [org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration$FlywayConfiguration.class]: Circular depends-on relationship between 'flyway' and 'entityManagerFactory'
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:310) ~[spring-beans-6.2.7.jar:6.2.7]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-6.2.7.jar:6.2.7]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315) ~[spring-beans-6.2.7.jar:6.2.7]
... 13 common frames omitted
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.404 s
[INFO] Finished at: 2025-06-01T20:53:14-07:00
[INFO] ------------------------------------------------------------------------
(Same error with beta1)
Expected-behavior
Project should start without an error
Reproduction
- Get a new project at start.vaadin.com with defaults for 24.8 pre-release
- Unzip and run it with
mvn
to verify it works - Add control-center dependency as instructed in docs
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>control-center-starter</artifactId>
</dependency>
- Run
mvn
again
System Info
Hilla: 24.8.0.beta2
Flow: 24.8.0.beta2
Vaadin: 24.8.0.beta2
Spring Boot: 3.5.0
Spring: 6.2.7
Spring Data JPA:
Copilot: 24.8.0.beta2
Frontend Hotswap: Disabled ⋅ Pre-built Bundle
OS: aarch64 Mac OS X 15.5
Java: Homebrew 23.0.2
Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.5 Safari/605.1.15
Java Hotswap: Hotswap is disabled
IDE Plugin: Not installed