Solucionado (ver solução)
Solucionado
(ver solução)
4
respostas

Não consigo iniciar mais o spring, desliguei o computador por algumas horas e agora nao consigo mais iniciar o spring, essa e a tela que me aparece

Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled. 2023-06-03T19:42:41.336-04:00 ERROR 8661 --- [ restartedMain] o.s.boot.SpringApplication : Application run failed

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flywayInitializer' defined in class path resource [org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration$FlywayConfiguration.class]: Found non-empty schema(s) screenmatch but no schema history table. Use baseline() or set baselineOnMigrate to true to initialize the schema history table. at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1770) ~[spring-beans-6.0.9.jar:6.0.9] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:598) ~[spring-beans-6.0.9.jar:6.0.9] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:520) ~[spring-beans-6.0.9.jar:6.0.9] at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:326) ~[spring-beans-6.0.9.jar:6.0.9] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-6.0.9.jar:6.0.9] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324) ~[spring-beans-6.0.9.jar:6.0.9] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200) ~[spring-beans-6.0.9.jar:6.0.9] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:313) ~[spring-beans-6.0.9.jar:6.0.9] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200) ~[spring-beans-6.0.9.jar:6.0.9] at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1156) ~[spring-context-6.0.9.jar:6.0.9] at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:931) ~[spring-context-6.0.9.jar:6.0.9] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:608) ~[spring-context-6.0.9.jar:6.0.9] at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146) ~[spring-boot-3.1.0.jar:3.1.0] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:733) ~[spring-boot-3.1.0.jar:3.1.0] at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:435) ~[spring-boot-3.1.0.jar:3.1.0] at org.springframework.boot.SpringApplication.run(SpringApplication.java:311) ~[spring-boot-3.1.0.jar:3.1.0] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1305) ~[spring-boot-3.1.0.jar:3.1.0] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1294) ~[spring-boot-3.1.0.jar:3.1.0] at projetojavafaculdade.javafilme.JavafilmeApplication.main(JavafilmeApplication.java:10) ~[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:568) ~[na:na] at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49) ~[spring-boot-devtools-3.1.0.jar:3.1.0] Caused by: org.flywaydb.core.api.FlywayException: Found non-empty schema(s) screenmatch but no schema history table. Use baseline() or set baselineOnMigrate to true to initialize the schema history table. at org.flywaydb.core.Flyway.lambda$migrate$0(Flyway.java:178) ~[flyway-core-9.16.3.jar:na] at org.flywaydb.core.FlywayExecutor.execute(FlywayExecutor.java:196) ~[flyway-core-9.16.3.jar:na] at org.flywaydb.core.Flyway.migrate(Flyway.java:140) ~[flyway-core-9.16.3.jar:na] at org.springframework.boot.autoconfigure.flyway.FlywayMigrationInitializer.afterPropertiesSet(FlywayMigrationInitializer.java:66) ~[spring-boot-autoconfigure-3.1.0.jar:3.1.0] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1816) ~[spring-beans-6.0.9.jar:6.0.9] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1766) ~[spring-beans-6.0.9.jar:6.0.9] ... 23 common frames omitted

Process finished with exit code 0

4 respostas

Aquela foi a segunda metade do que me aaparceu, essa aqui a baixo é a primeira

. __ _ __ _ _ /\ / _'_ _ _ _()_ _ __ _ \ \ \ ( ( )___ | ' | '| | ' / ` | \ \ \ \/ ___)| |)| | | | | || (| | ) ) ) ) ' |__| .|| ||_| |_, | / / / / =========||==============|__/=//// :: Spring Boot :: (v3.1.0)

2023-06-03T19:50:12.802-04:00 INFO 10051 --- [ restartedMain] p.javafilme.JavafilmeApplication : Starting JavafilmeApplication using Java 17.0.6 with PID 10051 (/home/hugo/Documents/javafilme/target/classes started by hugo in /home/hugo/Documents/javafilme) 2023-06-03T19:50:12.841-04:00 INFO 10051 --- [ restartedMain] p.javafilme.JavafilmeApplication : No active profile set, falling back to 1 default profile: "default" 2023-06-03T19:50:14.457-04:00 INFO 10051 --- [ restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : Devtools property defaults active! Set 'spring.devtools.add-properties' to 'false' to disable 2023-06-03T19:50:14.458-04:00 INFO 10051 --- [ restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : For additional web related logging consider setting the 'logging.level.web' property to 'DEBUG' 2023-06-03T19:50:16.949-04:00 INFO 10051 --- [ restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode. 2023-06-03T19:50:17.195-04:00 INFO 10051 --- [ restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 203 ms. Found 1 JPA repository interfaces. 2023-06-03T19:50:20.184-04:00 INFO 10051 --- [ restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http) 2023-06-03T19:50:20.235-04:00 INFO 10051 --- [ restartedMain] o.apache.catalina.core.StandardService : Starting service [Tomcat] 2023-06-03T19:50:20.236-04:00 INFO 10051 --- [ restartedMain] o.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/10.1.8] 2023-06-03T19:50:20.528-04:00 INFO 10051 --- [ restartedMain] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext 2023-06-03T19:50:20.537-04:00 INFO 10051 --- [ restartedMain] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 6068 ms 2023-06-03T19:50:21.375-04:00 INFO 10051 --- [ restartedMain] o.f.c.internal.license.VersionPrinter : Flyway Community Edition 9.16.3 by Redgate 2023-06-03T19:50:21.376-04:00 INFO 10051 --- [ restartedMain] o.f.c.internal.license.VersionPrinter : See release notes here: https://rd.gt/416ObMi 2023-06-03T19:50:21.376-04:00 INFO 10051 --- [ restartedMain] o.f.c.internal.license.VersionPrinter : 2023-06-03T19:50:21.421-04:00 INFO 10051 --- [ restartedMain] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting... 2023-06-03T19:50:22.827-04:00 INFO 10051 --- [ restartedMain] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Added connection com.mysql.cj.jdbc.ConnectionImpl@30766e9f 2023-06-03T19:50:22.833-04:00 INFO 10051 --- [ restartedMain] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed. 2023-06-03T19:50:22.931-04:00 INFO 10051 --- [ restartedMain] o.f.c.i.database.base.BaseDatabaseType : Database: jdbc:mysql://localhost/screenmatch (MySQL 8.0) 2023-06-03T19:50:23.098-04:00 INFO 10051 --- [ restartedMain] o.f.c.i.s.JdbcTableSchemaHistory : Schema history table screenmatch.flyway_schema_history does not exist yet 2023-06-03T19:50:23.121-04:00 INFO 10051 --- [ restartedMain] o.f.core.internal.command.DbValidate : Successfully validated 1 migration (execution time 00:00.086s) 2023-06-03T19:50:23.282-04:00 WARN 10051 --- [ restartedMain] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flywayInitializer' defined in class path resource [org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration$FlywayConfiguration.class]: Found non-empty schema(s) screenmatch but no schema history table. Use baseline() or set baselineOnMigrate to true to initialize the schema history table. 2023-06-03T19:50:23.284-04:00 INFO 10051 --- [ restartedMain] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated... 2023-06-03T19:50:23.354-04:00 INFO 10051 --- [ restartedMain] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed. 2023-06-03T19:50:23.367-04:00 INFO 10051 --- [ restartedMain] o.apache.catalina.core.StandardService : Stopping service [Tomcat] 2023-06-03T19:50:23.436-04:00 INFO 10051 --- [ restartedMain] .s.b.a.l.ConditionEvaluationReportLogger :

solução!

Oi Hugo!

Você adicionou o flyway no seu projeto, mas nesse curso não utilizaremos essa ferramente e isso está causando problemas.

Opa org.flywaydb flyway-core org.flywaydb flyway-mysql seria essas duas aqui que eu deveria apagar?

Isso mesmo

Quer mergulhar em tecnologia e aprendizagem?

Receba a newsletter que o nosso CEO escreve pessoalmente, com insights do mercado de trabalho, ciência e desenvolvimento de software