diff --git a/pom.xml b/pom.xml index 69437b571355ba6a6db39f8278f795eef3da2360..b3e936f32d133c2637ce5d66570abb94c8ecd34e 100644 --- a/pom.xml +++ b/pom.xml @@ -35,12 +35,16 @@ <dependency> <groupId>cz.muni.ics.kypo</groupId> <artifactId>kypo2-security-commons</artifactId> - <version>1.0.39</version> + <version>1.0.40</version> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-jpa</artifactId> </dependency> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-jdbc</artifactId> + </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> @@ -68,6 +72,15 @@ <artifactId>h2</artifactId> <scope>runtime</scope> </dependency> + <!-- PostgreSQL driver --> + <dependency> + <groupId>org.postgresql</groupId> + <artifactId>postgresql</artifactId> + </dependency> + <dependency> + <groupId>org.flywaydb</groupId> + <artifactId>flyway-core</artifactId> + </dependency> <dependency> <groupId>org.mapstruct</groupId> @@ -111,6 +124,11 @@ </annotationProcessorPaths> </configuration> </plugin> + <plugin> + <groupId>org.flywaydb</groupId> + <artifactId>flyway-maven-plugin</artifactId> + <version>${flyway.version}</version> + </plugin> </plugins> </build> diff --git a/spring.log b/spring.log index 1dd8a1d11ebd5bfcab519cae1013fcf8bae629e2..2a6a00b5d170a73c9aa8c8897718cc6df99b0e42 100644 --- a/spring.log +++ b/spring.log @@ -1,40 +1,3332 @@ -2021-02-12 13:05:36.973 INFO 4257 --- [main] c.m.i.k.t.adaptive.DemoApplication : No active profile set, falling back to default profiles: default -2021-02-12 13:05:37.626 INFO 4257 --- [main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode. -2021-02-12 13:05:37.669 INFO 4257 --- [main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 39ms. Found 7 JPA repository interfaces. -2021-02-12 13:05:37.801 INFO 4257 --- [main] o.s.cloud.context.scope.GenericScope : BeanFactory id=6c1b5445-77ee-3c51-b780-4ef4380485ec -2021-02-12 13:05:37.885 INFO 4257 --- [main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) -2021-02-12 13:05:38.034 INFO 4257 --- [main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8082 (http) -2021-02-12 13:05:38.038 INFO 4257 --- [main] o.apache.catalina.core.StandardService : Starting service [Tomcat] -2021-02-12 13:05:38.038 INFO 4257 --- [main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.30] -2021-02-12 13:05:38.104 INFO 4257 --- [main] c.C.[.[.[/kypo-adaptive-training/api/v1] : Initializing Spring embedded WebApplicationContext -2021-02-12 13:05:38.104 INFO 4257 --- [main] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 1117 ms -2021-02-12 13:05:38.382 INFO 4257 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting... -2021-02-12 13:05:38.435 INFO 4257 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed. -2021-02-12 13:05:38.480 INFO 4257 --- [main] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [name: default] -2021-02-12 13:05:38.511 INFO 4257 --- [main] org.hibernate.Version : HHH000412: Hibernate Core {5.4.10.Final} -2021-02-12 13:05:38.565 INFO 4257 --- [main] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {5.1.0.Final} -2021-02-12 13:05:38.616 INFO 4257 --- [main] org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.H2Dialect -2021-02-12 13:05:39.044 INFO 4257 --- [main] o.h.e.t.j.p.i.JtaPlatformInitiator : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform] -2021-02-12 13:05:39.047 INFO 4257 --- [main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default' -2021-02-12 13:05:39.480 WARN 4257 --- [main] JpaBaseConfiguration$JpaWebConfiguration : spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning -2021-02-12 13:05:39.556 INFO 4257 --- [main] o.s.b.a.e.web.EndpointLinksResolver : Exposing 2 endpoint(s) beneath base path '/actuator' -2021-02-12 13:05:39.595 INFO 4257 --- [main] pertySourcedRequestMappingHandlerMapping : Mapped URL path [/v2/api-docs] onto method [springfox.documentation.swagger2.web.Swagger2Controller#getDocumentation(String, HttpServletRequest)] -2021-02-12 13:05:39.716 INFO 4257 --- [main] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'applicationTaskExecutor' -2021-02-12 13:05:39.906 INFO 4257 --- [main] .s.s.UserDetailsServiceAutoConfiguration : - -Using generated security password: 9ab1ae38-74a8-40a5-8c71-ad2b4bfa87f4 - -2021-02-12 13:05:39.950 INFO 4257 --- [main] o.s.s.web.DefaultSecurityFilterChain : Creating filter chain: any request, [org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@352288bc, org.springframework.security.web.context.SecurityContextPersistenceFilter@4ce9985f, org.springframework.security.web.header.HeaderWriterFilter@6ae1d5f1, org.springframework.security.web.csrf.CsrfFilter@65145fb7, org.springframework.security.web.authentication.logout.LogoutFilter@5016934, org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter@502f6f6a, org.springframework.security.web.authentication.ui.DefaultLoginPageGeneratingFilter@44aaa987, org.springframework.security.web.authentication.ui.DefaultLogoutPageGeneratingFilter@33acec5e, org.springframework.security.web.authentication.www.BasicAuthenticationFilter@57573880, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@56d4481f, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@6f13ed1, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@6edd8d56, org.springframework.security.web.session.SessionManagementFilter@460a4935, org.springframework.security.web.access.ExceptionTranslationFilter@4f3a8e3e, org.springframework.security.web.access.intercept.FilterSecurityInterceptor@e38b953] -2021-02-12 13:05:40.030 WARN 4257 --- [main] s.o.SpringCloudSecurityAutoConfiguration : All Spring Cloud Security modules and starters are deprecated. They will be moved to individual projects in the next major release. -2021-02-12 13:05:40.067 INFO 4257 --- [main] d.s.w.p.DocumentationPluginsBootstrapper : Context refreshed -2021-02-12 13:05:40.076 INFO 4257 --- [main] d.s.w.p.DocumentationPluginsBootstrapper : Found 1 custom documentation plugin(s) -2021-02-12 13:05:40.100 INFO 4257 --- [main] s.d.s.w.s.ApiListingReferenceScanner : Scanning for api listing references -2021-02-12 13:05:40.170 INFO 4257 --- [main] .d.s.w.r.o.CachingOperationNameGenerator : Generating unique operation named: handleUsingGET_1 -2021-02-12 13:05:40.171 INFO 4257 --- [main] .d.s.w.r.o.CachingOperationNameGenerator : Generating unique operation named: handleUsingGET_2 -2021-02-12 13:05:40.192 INFO 4257 --- [main] .d.s.w.r.o.CachingOperationNameGenerator : Generating unique operation named: getPhase_1 -2021-02-12 13:05:40.260 INFO 4257 --- [main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8082 (http) with context path '/kypo-adaptive-training/api/v1' -2021-02-12 13:05:40.376 INFO 4257 --- [main] c.m.i.k.t.adaptive.DemoApplication : Started DemoApplication in 3.991 seconds (JVM running for 4.401) -2021-02-12 13:05:40.570 DEBUG 4257 --- [main] c.m.i.k.commons.startup.StartUpRunner : Microservice with roles has been registered. -2021-02-12 13:05:40.783 INFO 4257 --- [RMI TCP Connection(3)-127.0.0.1] c.C.[.[.[/kypo-adaptive-training/api/v1] : Initializing Spring DispatcherServlet 'dispatcherServlet' -2021-02-12 13:05:40.784 INFO 4257 --- [RMI TCP Connection(3)-127.0.0.1] o.s.web.servlet.DispatcherServlet : Initializing Servlet 'dispatcherServlet' -2021-02-12 13:05:40.791 INFO 4257 --- [RMI TCP Connection(3)-127.0.0.1] o.s.web.servlet.DispatcherServlet : Completed initialization in 7 ms +2021-02-12 15:34:08.739 INFO 15148 --- [main] c.m.i.k.t.adaptive.DemoApplication : No active profile set, falling back to default profiles: default +2021-02-12 15:34:09.624 INFO 15148 --- [main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode. +2021-02-12 15:34:09.672 INFO 15148 --- [main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 43ms. Found 7 JPA repository interfaces. +2021-02-12 15:34:09.810 INFO 15148 --- [main] o.s.cloud.context.scope.GenericScope : BeanFactory id=f0cd3bee-f190-387e-b69c-3ea724180170 +2021-02-12 15:34:09.917 INFO 15148 --- [main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2021-02-12 15:34:10.074 INFO 15148 --- [main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8082 (http) +2021-02-12 15:34:10.079 INFO 15148 --- [main] o.apache.catalina.core.StandardService : Starting service [Tomcat] +2021-02-12 15:34:10.079 INFO 15148 --- [main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.30] +2021-02-12 15:34:10.146 INFO 15148 --- [main] c.C.[.[.[/kypo-adaptive-training/api/v1] : Initializing Spring embedded WebApplicationContext +2021-02-12 15:34:10.146 INFO 15148 --- [main] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 1390 ms +2021-02-12 15:34:10.455 WARN 15148 --- [main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'flywayInitializer' defined in class path resource [org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration$FlywayConfiguration.class]: Unsatisfied dependency expressed through method 'flywayInitializer' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flyway' defined in class path resource [org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration$FlywayConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.flywaydb.core.Flyway]: Factory method 'flyway' threw exception; nested exception is org.springframework.boot.autoconfigure.flyway.FlywayMigrationScriptMissingException: Cannot find migration scripts in: [classpath:db/migration] (please add migration scripts or check your Flyway configuration) +2021-02-12 15:34:10.457 INFO 15148 --- [main] o.apache.catalina.core.StandardService : Stopping service [Tomcat] +2021-02-12 15:34:10.470 INFO 15148 --- [main] ConditionEvaluationReportLoggingListener : + +Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. +2021-02-12 15:34:10.475 ERROR 15148 --- [main] o.s.b.d.LoggingFailureAnalysisReporter : + +*************************** +APPLICATION FAILED TO START +*************************** + +Description: + +Flyway failed to initialize: none of the following migration scripts locations could be found: + + - classpath:db/migration + + +Action: + +Review the locations above or check your Flyway configuration + +2021-02-12 15:37:37.466 INFO 16012 --- [main] c.m.i.k.t.adaptive.DemoApplication : No active profile set, falling back to default profiles: default +2021-02-12 15:37:38.527 INFO 16012 --- [main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode. +2021-02-12 15:37:38.574 INFO 16012 --- [main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 42ms. Found 7 JPA repository interfaces. +2021-02-12 15:37:38.752 INFO 16012 --- [main] o.s.cloud.context.scope.GenericScope : BeanFactory id=f0cd3bee-f190-387e-b69c-3ea724180170 +2021-02-12 15:37:38.935 INFO 16012 --- [main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2021-02-12 15:37:39.148 INFO 16012 --- [main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8082 (http) +2021-02-12 15:37:39.153 INFO 16012 --- [main] o.apache.catalina.core.StandardService : Starting service [Tomcat] +2021-02-12 15:37:39.153 INFO 16012 --- [main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.30] +2021-02-12 15:37:39.252 INFO 16012 --- [main] c.C.[.[.[/kypo-adaptive-training/api/v1] : Initializing Spring embedded WebApplicationContext +2021-02-12 15:37:39.252 INFO 16012 --- [main] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 1770 ms +2021-02-12 15:37:39.632 WARN 16012 --- [main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'flywayInitializer' defined in class path resource [org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration$FlywayConfiguration.class]: Unsatisfied dependency expressed through method 'flywayInitializer' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flyway' defined in class path resource [org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration$FlywayConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.flywaydb.core.Flyway]: Factory method 'flyway' threw exception; nested exception is org.springframework.boot.autoconfigure.flyway.FlywayMigrationScriptMissingException: Cannot find migration scripts in: [classpath:db/migration] (please add migration scripts or check your Flyway configuration) +2021-02-12 15:37:39.634 INFO 16012 --- [main] o.apache.catalina.core.StandardService : Stopping service [Tomcat] +2021-02-12 15:37:39.649 INFO 16012 --- [main] ConditionEvaluationReportLoggingListener : + +Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. +2021-02-12 15:37:39.653 ERROR 16012 --- [main] o.s.b.d.LoggingFailureAnalysisReporter : + +*************************** +APPLICATION FAILED TO START +*************************** + +Description: + +Flyway failed to initialize: none of the following migration scripts locations could be found: + + - classpath:db/migration + + +Action: + +Review the locations above or check your Flyway configuration + +2021-02-12 15:39:12.706 INFO 16346 --- [main] c.m.i.k.t.adaptive.DemoApplication : No active profile set, falling back to default profiles: default +2021-02-12 15:39:13.387 INFO 16346 --- [main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode. +2021-02-12 15:39:13.432 INFO 16346 --- [main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 41ms. Found 7 JPA repository interfaces. +2021-02-12 15:39:13.559 INFO 16346 --- [main] o.s.cloud.context.scope.GenericScope : BeanFactory id=f0cd3bee-f190-387e-b69c-3ea724180170 +2021-02-12 15:39:13.652 INFO 16346 --- [main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2021-02-12 15:39:13.805 INFO 16346 --- [main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8082 (http) +2021-02-12 15:39:13.809 INFO 16346 --- [main] o.apache.catalina.core.StandardService : Starting service [Tomcat] +2021-02-12 15:39:13.810 INFO 16346 --- [main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.30] +2021-02-12 15:39:13.877 INFO 16346 --- [main] c.C.[.[.[/kypo-adaptive-training/api/v1] : Initializing Spring embedded WebApplicationContext +2021-02-12 15:39:13.877 INFO 16346 --- [main] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 1162 ms +2021-02-12 15:39:14.227 INFO 16346 --- [main] o.f.c.internal.license.VersionPrinter : Flyway Community Edition 6.0.8 by Redgate +2021-02-12 15:39:14.231 INFO 16346 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting... +2021-02-12 15:39:14.303 INFO 16346 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed. +2021-02-12 15:39:14.315 INFO 16346 --- [main] o.f.c.internal.database.DatabaseFactory : Database: jdbc:h2:mem:testdb (H2 1.4) +2021-02-12 15:39:14.330 WARN 16346 --- [main] o.f.c.internal.database.base.Database : Flyway upgrade recommended: H2 1.4.200 is newer than this version of Flyway and support has not been tested. The latest supported version of H2 is 1.4.199. +2021-02-12 15:39:14.349 INFO 16346 --- [main] o.f.core.internal.command.DbValidate : Successfully validated 2 migrations (execution time 00:00.013s) +2021-02-12 15:39:14.357 INFO 16346 --- [main] o.f.c.i.s.JdbcTableSchemaHistory : Creating Schema History table "PUBLIC"."flyway_schema_history" ... +2021-02-12 15:39:14.385 INFO 16346 --- [main] o.f.core.internal.command.DbMigrate : Current version of schema "PUBLIC": << Empty Schema >> +2021-02-12 15:39:14.393 INFO 16346 --- [main] o.f.core.internal.command.DbMigrate : Migrating schema "PUBLIC" to version 1 - db adaptive trainings schema +2021-02-12 15:39:14.408 ERROR 16346 --- [main] o.f.core.internal.command.DbMigrate : Migration of schema "PUBLIC" to version 1 - db adaptive trainings schema failed! Please restore backups and roll back database and code! +2021-02-12 15:39:14.414 WARN 16346 --- [main] 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]: Invocation of init method failed; nested exception is org.flywaydb.core.internal.command.DbMigrate$FlywayMigrateException: +Migration V1__db_adaptive_trainings_schema.sql failed +----------------------------------------------------- +SQL State : 90017 +Error Code : 90017 +Message : Attempt to define a second primary key; SQL statement: +create table training_run ( + id bigserial not null, + assessment_responses text, + end_time timestamp not null, + incorrect_flag_count int4 not null, + level_answered boolean, + solution_taken boolean not null, + start_time timestamp not null, + state varchar(128) not null, + current_phase_id int8 not null, + current_task_order_id int8 not null, + user_ref_id bigserial not null, + sandbox_instance_ref_id bigserial null, + training_instance_id bigserial not null, + previous_sandbox_instance_ref_id bigserial null, + primary key (id), + foreign key (training_instance_id) references training_instance, + foreign key (user_ref_id) references user_ref +) [90017-200] +Location : db/migration/V1__db_adaptive_trainings_schema.sql (/home/dominik/Desktop/Workspace/BACKEND/kypo-adaptive-training/target/classes/db/migration/V1__db_adaptive_trainings_schema.sql) +Line : 52 +Statement : create table training_run ( + id bigserial not null, + assessment_responses text, + end_time timestamp not null, + incorrect_flag_count int4 not null, + level_answered boolean, + solution_taken boolean not null, + start_time timestamp not null, + state varchar(128) not null, + current_phase_id int8 not null, + current_task_order_id int8 not null, + user_ref_id bigserial not null, + sandbox_instance_ref_id bigserial null, + training_instance_id bigserial not null, + previous_sandbox_instance_ref_id bigserial null, + primary key (id), + foreign key (training_instance_id) references training_instance, + foreign key (user_ref_id) references user_ref +) + +2021-02-12 15:39:14.414 INFO 16346 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated... +2021-02-12 15:39:14.416 INFO 16346 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed. +2021-02-12 15:39:14.417 INFO 16346 --- [main] o.apache.catalina.core.StandardService : Stopping service [Tomcat] +2021-02-12 15:39:14.431 INFO 16346 --- [main] ConditionEvaluationReportLoggingListener : + +Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. +2021-02-12 15:39:14.438 ERROR 16346 --- [main] 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]: Invocation of init method failed; nested exception is org.flywaydb.core.internal.command.DbMigrate$FlywayMigrateException: +Migration V1__db_adaptive_trainings_schema.sql failed +----------------------------------------------------- +SQL State : 90017 +Error Code : 90017 +Message : Attempt to define a second primary key; SQL statement: +create table training_run ( + id bigserial not null, + assessment_responses text, + end_time timestamp not null, + incorrect_flag_count int4 not null, + level_answered boolean, + solution_taken boolean not null, + start_time timestamp not null, + state varchar(128) not null, + current_phase_id int8 not null, + current_task_order_id int8 not null, + user_ref_id bigserial not null, + sandbox_instance_ref_id bigserial null, + training_instance_id bigserial not null, + previous_sandbox_instance_ref_id bigserial null, + primary key (id), + foreign key (training_instance_id) references training_instance, + foreign key (user_ref_id) references user_ref +) [90017-200] +Location : db/migration/V1__db_adaptive_trainings_schema.sql (/home/dominik/Desktop/Workspace/BACKEND/kypo-adaptive-training/target/classes/db/migration/V1__db_adaptive_trainings_schema.sql) +Line : 52 +Statement : create table training_run ( + id bigserial not null, + assessment_responses text, + end_time timestamp not null, + incorrect_flag_count int4 not null, + level_answered boolean, + solution_taken boolean not null, + start_time timestamp not null, + state varchar(128) not null, + current_phase_id int8 not null, + current_task_order_id int8 not null, + user_ref_id bigserial not null, + sandbox_instance_ref_id bigserial null, + training_instance_id bigserial not null, + previous_sandbox_instance_ref_id bigserial null, + primary key (id), + foreign key (training_instance_id) references training_instance, + foreign key (user_ref_id) references user_ref +) + + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1796) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:595) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:310) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1108) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:868) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at cz.muni.ics.kypo.training.adaptive.DemoApplication.main(DemoApplication.java:13) ~[classes/:na] +Caused by: org.flywaydb.core.internal.command.DbMigrate$FlywayMigrateException: +Migration V1__db_adaptive_trainings_schema.sql failed +----------------------------------------------------- +SQL State : 90017 +Error Code : 90017 +Message : Attempt to define a second primary key; SQL statement: +create table training_run ( + id bigserial not null, + assessment_responses text, + end_time timestamp not null, + incorrect_flag_count int4 not null, + level_answered boolean, + solution_taken boolean not null, + start_time timestamp not null, + state varchar(128) not null, + current_phase_id int8 not null, + current_task_order_id int8 not null, + user_ref_id bigserial not null, + sandbox_instance_ref_id bigserial null, + training_instance_id bigserial not null, + previous_sandbox_instance_ref_id bigserial null, + primary key (id), + foreign key (training_instance_id) references training_instance, + foreign key (user_ref_id) references user_ref +) [90017-200] +Location : db/migration/V1__db_adaptive_trainings_schema.sql (/home/dominik/Desktop/Workspace/BACKEND/kypo-adaptive-training/target/classes/db/migration/V1__db_adaptive_trainings_schema.sql) +Line : 52 +Statement : create table training_run ( + id bigserial not null, + assessment_responses text, + end_time timestamp not null, + incorrect_flag_count int4 not null, + level_answered boolean, + solution_taken boolean not null, + start_time timestamp not null, + state varchar(128) not null, + current_phase_id int8 not null, + current_task_order_id int8 not null, + user_ref_id bigserial not null, + sandbox_instance_ref_id bigserial null, + training_instance_id bigserial not null, + previous_sandbox_instance_ref_id bigserial null, + primary key (id), + foreign key (training_instance_id) references training_instance, + foreign key (user_ref_id) references user_ref +) + + at org.flywaydb.core.internal.command.DbMigrate.doMigrateGroup(DbMigrate.java:369) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate.access$200(DbMigrate.java:54) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate$3.call(DbMigrate.java:282) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.jdbc.TransactionTemplate.execute(TransactionTemplate.java:74) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate.applyMigrations(DbMigrate.java:279) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate.migrateGroup(DbMigrate.java:244) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate.access$100(DbMigrate.java:54) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate$2.call(DbMigrate.java:162) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate$2.call(DbMigrate.java:159) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.database.base.Connection$1.call(Connection.java:131) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.jdbc.TransactionTemplate.execute(TransactionTemplate.java:74) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.database.base.Connection.lock(Connection.java:127) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory.lock(JdbcTableSchemaHistory.java:139) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate.migrateAll(DbMigrate.java:159) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate.migrate(DbMigrate.java:137) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.Flyway$1.execute(Flyway.java:189) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.Flyway$1.execute(Flyway.java:149) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.Flyway.execute(Flyway.java:511) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.Flyway.migrate(Flyway.java:149) ~[flyway-core-6.0.8.jar:na] + at org.springframework.boot.autoconfigure.flyway.FlywayMigrationInitializer.afterPropertiesSet(FlywayMigrationInitializer.java:65) ~[spring-boot-autoconfigure-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1855) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1792) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + ... 18 common frames omitted +Caused by: org.flywaydb.core.internal.sqlscript.FlywaySqlScriptException: +Migration V1__db_adaptive_trainings_schema.sql failed +----------------------------------------------------- +SQL State : 90017 +Error Code : 90017 +Message : Attempt to define a second primary key; SQL statement: +create table training_run ( + id bigserial not null, + assessment_responses text, + end_time timestamp not null, + incorrect_flag_count int4 not null, + level_answered boolean, + solution_taken boolean not null, + start_time timestamp not null, + state varchar(128) not null, + current_phase_id int8 not null, + current_task_order_id int8 not null, + user_ref_id bigserial not null, + sandbox_instance_ref_id bigserial null, + training_instance_id bigserial not null, + previous_sandbox_instance_ref_id bigserial null, + primary key (id), + foreign key (training_instance_id) references training_instance, + foreign key (user_ref_id) references user_ref +) [90017-200] +Location : db/migration/V1__db_adaptive_trainings_schema.sql (/home/dominik/Desktop/Workspace/BACKEND/kypo-adaptive-training/target/classes/db/migration/V1__db_adaptive_trainings_schema.sql) +Line : 52 +Statement : create table training_run ( + id bigserial not null, + assessment_responses text, + end_time timestamp not null, + incorrect_flag_count int4 not null, + level_answered boolean, + solution_taken boolean not null, + start_time timestamp not null, + state varchar(128) not null, + current_phase_id int8 not null, + current_task_order_id int8 not null, + user_ref_id bigserial not null, + sandbox_instance_ref_id bigserial null, + training_instance_id bigserial not null, + previous_sandbox_instance_ref_id bigserial null, + primary key (id), + foreign key (training_instance_id) references training_instance, + foreign key (user_ref_id) references user_ref +) + + at org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor.handleException(DefaultSqlScriptExecutor.java:274) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor.executeStatement(DefaultSqlScriptExecutor.java:220) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor.execute(DefaultSqlScriptExecutor.java:127) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.resolver.sql.SqlMigrationExecutor.execute(SqlMigrationExecutor.java:70) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate.doMigrateGroup(DbMigrate.java:366) ~[flyway-core-6.0.8.jar:na] + ... 39 common frames omitted +Caused by: org.h2.jdbc.JdbcSQLSyntaxErrorException: Attempt to define a second primary key; SQL statement: +create table training_run ( + id bigserial not null, + assessment_responses text, + end_time timestamp not null, + incorrect_flag_count int4 not null, + level_answered boolean, + solution_taken boolean not null, + start_time timestamp not null, + state varchar(128) not null, + current_phase_id int8 not null, + current_task_order_id int8 not null, + user_ref_id bigserial not null, + sandbox_instance_ref_id bigserial null, + training_instance_id bigserial not null, + previous_sandbox_instance_ref_id bigserial null, + primary key (id), + foreign key (training_instance_id) references training_instance, + foreign key (user_ref_id) references user_ref +) [90017-200] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:576) ~[h2-1.4.200.jar:1.4.200] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:429) ~[h2-1.4.200.jar:1.4.200] + at org.h2.message.DbException.get(DbException.java:205) ~[h2-1.4.200.jar:1.4.200] + at org.h2.message.DbException.get(DbException.java:181) ~[h2-1.4.200.jar:1.4.200] + at org.h2.message.DbException.get(DbException.java:170) ~[h2-1.4.200.jar:1.4.200] + at org.h2.command.ddl.CommandWithColumns.setPrimaryKey(CommandWithColumns.java:148) ~[h2-1.4.200.jar:1.4.200] + at org.h2.command.ddl.CommandWithColumns.addConstraintCommand(CommandWithColumns.java:49) ~[h2-1.4.200.jar:1.4.200] + at org.h2.command.Parser.parseTableColumnDefinition(Parser.java:8452) ~[h2-1.4.200.jar:1.4.200] + at org.h2.command.Parser.parseCreateTable(Parser.java:8379) ~[h2-1.4.200.jar:1.4.200] + at org.h2.command.Parser.parseCreate(Parser.java:6276) ~[h2-1.4.200.jar:1.4.200] + at org.h2.command.Parser.parsePrepared(Parser.java:903) ~[h2-1.4.200.jar:1.4.200] + at org.h2.command.Parser.parse(Parser.java:843) ~[h2-1.4.200.jar:1.4.200] + at org.h2.command.Parser.parse(Parser.java:815) ~[h2-1.4.200.jar:1.4.200] + at org.h2.command.Parser.prepareCommand(Parser.java:738) ~[h2-1.4.200.jar:1.4.200] + at org.h2.engine.Session.prepareLocal(Session.java:657) ~[h2-1.4.200.jar:1.4.200] + at org.h2.engine.Session.prepareCommand(Session.java:595) ~[h2-1.4.200.jar:1.4.200] + at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1235) ~[h2-1.4.200.jar:1.4.200] + at org.h2.jdbc.JdbcStatement.executeInternal(JdbcStatement.java:212) ~[h2-1.4.200.jar:1.4.200] + at org.h2.jdbc.JdbcStatement.execute(JdbcStatement.java:201) ~[h2-1.4.200.jar:1.4.200] + at com.zaxxer.hikari.pool.ProxyStatement.execute(ProxyStatement.java:95) ~[HikariCP-3.4.2.jar:na] + at com.zaxxer.hikari.pool.HikariProxyStatement.execute(HikariProxyStatement.java) ~[HikariCP-3.4.2.jar:na] + at org.flywaydb.core.internal.jdbc.JdbcTemplate.executeStatement(JdbcTemplate.java:244) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.sqlscript.ParsedSqlStatement.execute(ParsedSqlStatement.java:111) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor.executeStatement(DefaultSqlScriptExecutor.java:208) ~[flyway-core-6.0.8.jar:na] + ... 42 common frames omitted + +2021-02-12 15:41:14.215 INFO 16699 --- [main] c.m.i.k.t.adaptive.DemoApplication : No active profile set, falling back to default profiles: default +2021-02-12 15:41:14.980 INFO 16699 --- [main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode. +2021-02-12 15:41:15.025 INFO 16699 --- [main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 41ms. Found 7 JPA repository interfaces. +2021-02-12 15:41:15.197 INFO 16699 --- [main] o.s.cloud.context.scope.GenericScope : BeanFactory id=f0cd3bee-f190-387e-b69c-3ea724180170 +2021-02-12 15:41:15.299 INFO 16699 --- [main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2021-02-12 15:41:15.479 INFO 16699 --- [main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8082 (http) +2021-02-12 15:41:15.484 INFO 16699 --- [main] o.apache.catalina.core.StandardService : Starting service [Tomcat] +2021-02-12 15:41:15.484 INFO 16699 --- [main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.30] +2021-02-12 15:41:15.558 INFO 16699 --- [main] c.C.[.[.[/kypo-adaptive-training/api/v1] : Initializing Spring embedded WebApplicationContext +2021-02-12 15:41:15.558 INFO 16699 --- [main] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 1325 ms +2021-02-12 15:41:15.838 INFO 16699 --- [main] o.f.c.internal.license.VersionPrinter : Flyway Community Edition 6.0.8 by Redgate +2021-02-12 15:41:15.842 INFO 16699 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting... +2021-02-12 15:41:15.921 INFO 16699 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed. +2021-02-12 15:41:15.927 INFO 16699 --- [main] o.f.c.internal.database.DatabaseFactory : Database: jdbc:h2:mem:testdb (H2 1.4) +2021-02-12 15:41:15.941 WARN 16699 --- [main] o.f.c.internal.database.base.Database : Flyway upgrade recommended: H2 1.4.200 is newer than this version of Flyway and support has not been tested. The latest supported version of H2 is 1.4.199. +2021-02-12 15:41:15.960 INFO 16699 --- [main] o.f.core.internal.command.DbValidate : Successfully validated 2 migrations (execution time 00:00.012s) +2021-02-12 15:41:15.969 INFO 16699 --- [main] o.f.c.i.s.JdbcTableSchemaHistory : Creating Schema History table "PUBLIC"."flyway_schema_history" ... +2021-02-12 15:41:15.995 INFO 16699 --- [main] o.f.core.internal.command.DbMigrate : Current version of schema "PUBLIC": << Empty Schema >> +2021-02-12 15:41:16.003 INFO 16699 --- [main] o.f.core.internal.command.DbMigrate : Migrating schema "PUBLIC" to version 1 - db adaptive trainings schema +2021-02-12 15:41:16.018 ERROR 16699 --- [main] o.f.core.internal.command.DbMigrate : Migration of schema "PUBLIC" to version 1 - db adaptive trainings schema failed! Please restore backups and roll back database and code! +2021-02-12 15:41:16.023 WARN 16699 --- [main] 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]: Invocation of init method failed; nested exception is org.flywaydb.core.internal.command.DbMigrate$FlywayMigrateException: +Migration V1__db_adaptive_trainings_schema.sql failed +----------------------------------------------------- +SQL State : 90017 +Error Code : 90017 +Message : Attempt to define a second primary key; SQL statement: +create table training_run ( + id bigserial not null, + assessment_responses text, + end_time timestamp not null, + incorrect_flag_count int4 not null, + level_answered boolean, + solution_taken boolean not null, + start_time timestamp not null, + state varchar(128) not null, + current_phase_id int8 not null, + current_task_order_id int8 not null, + user_ref_id bigserial not null, + sandbox_instance_ref_id int8 null, + training_instance_id int8 not null, + previous_sandbox_instance_ref_id int8 null, + primary key (id), + foreign key (training_instance_id) references training_instance, + foreign key (user_ref_id) references user_ref +) [90017-200] +Location : db/migration/V1__db_adaptive_trainings_schema.sql (/home/dominik/Desktop/Workspace/BACKEND/kypo-adaptive-training/target/classes/db/migration/V1__db_adaptive_trainings_schema.sql) +Line : 52 +Statement : create table training_run ( + id bigserial not null, + assessment_responses text, + end_time timestamp not null, + incorrect_flag_count int4 not null, + level_answered boolean, + solution_taken boolean not null, + start_time timestamp not null, + state varchar(128) not null, + current_phase_id int8 not null, + current_task_order_id int8 not null, + user_ref_id bigserial not null, + sandbox_instance_ref_id int8 null, + training_instance_id int8 not null, + previous_sandbox_instance_ref_id int8 null, + primary key (id), + foreign key (training_instance_id) references training_instance, + foreign key (user_ref_id) references user_ref +) + +2021-02-12 15:41:16.024 INFO 16699 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated... +2021-02-12 15:41:16.026 INFO 16699 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed. +2021-02-12 15:41:16.028 INFO 16699 --- [main] o.apache.catalina.core.StandardService : Stopping service [Tomcat] +2021-02-12 15:41:16.041 INFO 16699 --- [main] ConditionEvaluationReportLoggingListener : + +Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. +2021-02-12 15:41:16.049 ERROR 16699 --- [main] 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]: Invocation of init method failed; nested exception is org.flywaydb.core.internal.command.DbMigrate$FlywayMigrateException: +Migration V1__db_adaptive_trainings_schema.sql failed +----------------------------------------------------- +SQL State : 90017 +Error Code : 90017 +Message : Attempt to define a second primary key; SQL statement: +create table training_run ( + id bigserial not null, + assessment_responses text, + end_time timestamp not null, + incorrect_flag_count int4 not null, + level_answered boolean, + solution_taken boolean not null, + start_time timestamp not null, + state varchar(128) not null, + current_phase_id int8 not null, + current_task_order_id int8 not null, + user_ref_id bigserial not null, + sandbox_instance_ref_id int8 null, + training_instance_id int8 not null, + previous_sandbox_instance_ref_id int8 null, + primary key (id), + foreign key (training_instance_id) references training_instance, + foreign key (user_ref_id) references user_ref +) [90017-200] +Location : db/migration/V1__db_adaptive_trainings_schema.sql (/home/dominik/Desktop/Workspace/BACKEND/kypo-adaptive-training/target/classes/db/migration/V1__db_adaptive_trainings_schema.sql) +Line : 52 +Statement : create table training_run ( + id bigserial not null, + assessment_responses text, + end_time timestamp not null, + incorrect_flag_count int4 not null, + level_answered boolean, + solution_taken boolean not null, + start_time timestamp not null, + state varchar(128) not null, + current_phase_id int8 not null, + current_task_order_id int8 not null, + user_ref_id bigserial not null, + sandbox_instance_ref_id int8 null, + training_instance_id int8 not null, + previous_sandbox_instance_ref_id int8 null, + primary key (id), + foreign key (training_instance_id) references training_instance, + foreign key (user_ref_id) references user_ref +) + + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1796) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:595) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:310) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1108) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:868) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at cz.muni.ics.kypo.training.adaptive.DemoApplication.main(DemoApplication.java:13) ~[classes/:na] +Caused by: org.flywaydb.core.internal.command.DbMigrate$FlywayMigrateException: +Migration V1__db_adaptive_trainings_schema.sql failed +----------------------------------------------------- +SQL State : 90017 +Error Code : 90017 +Message : Attempt to define a second primary key; SQL statement: +create table training_run ( + id bigserial not null, + assessment_responses text, + end_time timestamp not null, + incorrect_flag_count int4 not null, + level_answered boolean, + solution_taken boolean not null, + start_time timestamp not null, + state varchar(128) not null, + current_phase_id int8 not null, + current_task_order_id int8 not null, + user_ref_id bigserial not null, + sandbox_instance_ref_id int8 null, + training_instance_id int8 not null, + previous_sandbox_instance_ref_id int8 null, + primary key (id), + foreign key (training_instance_id) references training_instance, + foreign key (user_ref_id) references user_ref +) [90017-200] +Location : db/migration/V1__db_adaptive_trainings_schema.sql (/home/dominik/Desktop/Workspace/BACKEND/kypo-adaptive-training/target/classes/db/migration/V1__db_adaptive_trainings_schema.sql) +Line : 52 +Statement : create table training_run ( + id bigserial not null, + assessment_responses text, + end_time timestamp not null, + incorrect_flag_count int4 not null, + level_answered boolean, + solution_taken boolean not null, + start_time timestamp not null, + state varchar(128) not null, + current_phase_id int8 not null, + current_task_order_id int8 not null, + user_ref_id bigserial not null, + sandbox_instance_ref_id int8 null, + training_instance_id int8 not null, + previous_sandbox_instance_ref_id int8 null, + primary key (id), + foreign key (training_instance_id) references training_instance, + foreign key (user_ref_id) references user_ref +) + + at org.flywaydb.core.internal.command.DbMigrate.doMigrateGroup(DbMigrate.java:369) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate.access$200(DbMigrate.java:54) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate$3.call(DbMigrate.java:282) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.jdbc.TransactionTemplate.execute(TransactionTemplate.java:74) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate.applyMigrations(DbMigrate.java:279) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate.migrateGroup(DbMigrate.java:244) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate.access$100(DbMigrate.java:54) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate$2.call(DbMigrate.java:162) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate$2.call(DbMigrate.java:159) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.database.base.Connection$1.call(Connection.java:131) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.jdbc.TransactionTemplate.execute(TransactionTemplate.java:74) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.database.base.Connection.lock(Connection.java:127) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory.lock(JdbcTableSchemaHistory.java:139) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate.migrateAll(DbMigrate.java:159) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate.migrate(DbMigrate.java:137) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.Flyway$1.execute(Flyway.java:189) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.Flyway$1.execute(Flyway.java:149) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.Flyway.execute(Flyway.java:511) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.Flyway.migrate(Flyway.java:149) ~[flyway-core-6.0.8.jar:na] + at org.springframework.boot.autoconfigure.flyway.FlywayMigrationInitializer.afterPropertiesSet(FlywayMigrationInitializer.java:65) ~[spring-boot-autoconfigure-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1855) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1792) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + ... 18 common frames omitted +Caused by: org.flywaydb.core.internal.sqlscript.FlywaySqlScriptException: +Migration V1__db_adaptive_trainings_schema.sql failed +----------------------------------------------------- +SQL State : 90017 +Error Code : 90017 +Message : Attempt to define a second primary key; SQL statement: +create table training_run ( + id bigserial not null, + assessment_responses text, + end_time timestamp not null, + incorrect_flag_count int4 not null, + level_answered boolean, + solution_taken boolean not null, + start_time timestamp not null, + state varchar(128) not null, + current_phase_id int8 not null, + current_task_order_id int8 not null, + user_ref_id bigserial not null, + sandbox_instance_ref_id int8 null, + training_instance_id int8 not null, + previous_sandbox_instance_ref_id int8 null, + primary key (id), + foreign key (training_instance_id) references training_instance, + foreign key (user_ref_id) references user_ref +) [90017-200] +Location : db/migration/V1__db_adaptive_trainings_schema.sql (/home/dominik/Desktop/Workspace/BACKEND/kypo-adaptive-training/target/classes/db/migration/V1__db_adaptive_trainings_schema.sql) +Line : 52 +Statement : create table training_run ( + id bigserial not null, + assessment_responses text, + end_time timestamp not null, + incorrect_flag_count int4 not null, + level_answered boolean, + solution_taken boolean not null, + start_time timestamp not null, + state varchar(128) not null, + current_phase_id int8 not null, + current_task_order_id int8 not null, + user_ref_id bigserial not null, + sandbox_instance_ref_id int8 null, + training_instance_id int8 not null, + previous_sandbox_instance_ref_id int8 null, + primary key (id), + foreign key (training_instance_id) references training_instance, + foreign key (user_ref_id) references user_ref +) + + at org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor.handleException(DefaultSqlScriptExecutor.java:274) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor.executeStatement(DefaultSqlScriptExecutor.java:220) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor.execute(DefaultSqlScriptExecutor.java:127) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.resolver.sql.SqlMigrationExecutor.execute(SqlMigrationExecutor.java:70) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate.doMigrateGroup(DbMigrate.java:366) ~[flyway-core-6.0.8.jar:na] + ... 39 common frames omitted +Caused by: org.h2.jdbc.JdbcSQLSyntaxErrorException: Attempt to define a second primary key; SQL statement: +create table training_run ( + id bigserial not null, + assessment_responses text, + end_time timestamp not null, + incorrect_flag_count int4 not null, + level_answered boolean, + solution_taken boolean not null, + start_time timestamp not null, + state varchar(128) not null, + current_phase_id int8 not null, + current_task_order_id int8 not null, + user_ref_id bigserial not null, + sandbox_instance_ref_id int8 null, + training_instance_id int8 not null, + previous_sandbox_instance_ref_id int8 null, + primary key (id), + foreign key (training_instance_id) references training_instance, + foreign key (user_ref_id) references user_ref +) [90017-200] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:576) ~[h2-1.4.200.jar:1.4.200] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:429) ~[h2-1.4.200.jar:1.4.200] + at org.h2.message.DbException.get(DbException.java:205) ~[h2-1.4.200.jar:1.4.200] + at org.h2.message.DbException.get(DbException.java:181) ~[h2-1.4.200.jar:1.4.200] + at org.h2.message.DbException.get(DbException.java:170) ~[h2-1.4.200.jar:1.4.200] + at org.h2.command.ddl.CommandWithColumns.setPrimaryKey(CommandWithColumns.java:148) ~[h2-1.4.200.jar:1.4.200] + at org.h2.command.ddl.CommandWithColumns.addConstraintCommand(CommandWithColumns.java:49) ~[h2-1.4.200.jar:1.4.200] + at org.h2.command.Parser.parseTableColumnDefinition(Parser.java:8452) ~[h2-1.4.200.jar:1.4.200] + at org.h2.command.Parser.parseCreateTable(Parser.java:8379) ~[h2-1.4.200.jar:1.4.200] + at org.h2.command.Parser.parseCreate(Parser.java:6276) ~[h2-1.4.200.jar:1.4.200] + at org.h2.command.Parser.parsePrepared(Parser.java:903) ~[h2-1.4.200.jar:1.4.200] + at org.h2.command.Parser.parse(Parser.java:843) ~[h2-1.4.200.jar:1.4.200] + at org.h2.command.Parser.parse(Parser.java:815) ~[h2-1.4.200.jar:1.4.200] + at org.h2.command.Parser.prepareCommand(Parser.java:738) ~[h2-1.4.200.jar:1.4.200] + at org.h2.engine.Session.prepareLocal(Session.java:657) ~[h2-1.4.200.jar:1.4.200] + at org.h2.engine.Session.prepareCommand(Session.java:595) ~[h2-1.4.200.jar:1.4.200] + at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1235) ~[h2-1.4.200.jar:1.4.200] + at org.h2.jdbc.JdbcStatement.executeInternal(JdbcStatement.java:212) ~[h2-1.4.200.jar:1.4.200] + at org.h2.jdbc.JdbcStatement.execute(JdbcStatement.java:201) ~[h2-1.4.200.jar:1.4.200] + at com.zaxxer.hikari.pool.ProxyStatement.execute(ProxyStatement.java:95) ~[HikariCP-3.4.2.jar:na] + at com.zaxxer.hikari.pool.HikariProxyStatement.execute(HikariProxyStatement.java) ~[HikariCP-3.4.2.jar:na] + at org.flywaydb.core.internal.jdbc.JdbcTemplate.executeStatement(JdbcTemplate.java:244) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.sqlscript.ParsedSqlStatement.execute(ParsedSqlStatement.java:111) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor.executeStatement(DefaultSqlScriptExecutor.java:208) ~[flyway-core-6.0.8.jar:na] + ... 42 common frames omitted + +2021-02-12 15:41:37.699 INFO 16827 --- [main] c.m.i.k.t.adaptive.DemoApplication : No active profile set, falling back to default profiles: default +2021-02-12 15:41:38.384 INFO 16827 --- [main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode. +2021-02-12 15:41:38.432 INFO 16827 --- [main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 44ms. Found 7 JPA repository interfaces. +2021-02-12 15:41:38.563 INFO 16827 --- [main] o.s.cloud.context.scope.GenericScope : BeanFactory id=f0cd3bee-f190-387e-b69c-3ea724180170 +2021-02-12 15:41:38.658 INFO 16827 --- [main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2021-02-12 15:41:38.809 INFO 16827 --- [main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8082 (http) +2021-02-12 15:41:38.814 INFO 16827 --- [main] o.apache.catalina.core.StandardService : Starting service [Tomcat] +2021-02-12 15:41:38.814 INFO 16827 --- [main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.30] +2021-02-12 15:41:38.879 INFO 16827 --- [main] c.C.[.[.[/kypo-adaptive-training/api/v1] : Initializing Spring embedded WebApplicationContext +2021-02-12 15:41:38.880 INFO 16827 --- [main] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 1168 ms +2021-02-12 15:41:39.175 INFO 16827 --- [main] o.f.c.internal.license.VersionPrinter : Flyway Community Edition 6.0.8 by Redgate +2021-02-12 15:41:39.179 INFO 16827 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting... +2021-02-12 15:41:39.255 INFO 16827 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed. +2021-02-12 15:41:39.261 INFO 16827 --- [main] o.f.c.internal.database.DatabaseFactory : Database: jdbc:h2:mem:testdb (H2 1.4) +2021-02-12 15:41:39.278 WARN 16827 --- [main] o.f.c.internal.database.base.Database : Flyway upgrade recommended: H2 1.4.200 is newer than this version of Flyway and support has not been tested. The latest supported version of H2 is 1.4.199. +2021-02-12 15:41:39.299 INFO 16827 --- [main] o.f.core.internal.command.DbValidate : Successfully validated 2 migrations (execution time 00:00.014s) +2021-02-12 15:41:39.309 INFO 16827 --- [main] o.f.c.i.s.JdbcTableSchemaHistory : Creating Schema History table "PUBLIC"."flyway_schema_history" ... +2021-02-12 15:41:39.337 INFO 16827 --- [main] o.f.core.internal.command.DbMigrate : Current version of schema "PUBLIC": << Empty Schema >> +2021-02-12 15:41:39.344 INFO 16827 --- [main] o.f.core.internal.command.DbMigrate : Migrating schema "PUBLIC" to version 1 - db adaptive trainings schema +2021-02-12 15:41:39.363 ERROR 16827 --- [main] o.f.core.internal.command.DbMigrate : Migration of schema "PUBLIC" to version 1 - db adaptive trainings schema failed! Please restore backups and roll back database and code! +2021-02-12 15:41:39.369 WARN 16827 --- [main] 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]: Invocation of init method failed; nested exception is org.flywaydb.core.internal.command.DbMigrate$FlywayMigrateException: +Migration V1__db_adaptive_trainings_schema.sql failed +----------------------------------------------------- +SQL State : 90017 +Error Code : 90017 +Message : Attempt to define a second primary key; SQL statement: +create table question ( + question_id bigserial not null, + question_type varchar(64) not null, + text text not null, + phase_id bigserial not null, + primary key (question_id), + foreign key (phase_id) references questionnaire_phase +) [90017-200] +Location : db/migration/V1__db_adaptive_trainings_schema.sql (/home/dominik/Desktop/Workspace/BACKEND/kypo-adaptive-training/target/classes/db/migration/V1__db_adaptive_trainings_schema.sql) +Line : 95 +Statement : create table question ( + question_id bigserial not null, + question_type varchar(64) not null, + text text not null, + phase_id bigserial not null, + primary key (question_id), + foreign key (phase_id) references questionnaire_phase +) + +2021-02-12 15:41:39.369 INFO 16827 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated... +2021-02-12 15:41:39.371 INFO 16827 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed. +2021-02-12 15:41:39.373 INFO 16827 --- [main] o.apache.catalina.core.StandardService : Stopping service [Tomcat] +2021-02-12 15:41:39.387 INFO 16827 --- [main] ConditionEvaluationReportLoggingListener : + +Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. +2021-02-12 15:41:39.393 ERROR 16827 --- [main] 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]: Invocation of init method failed; nested exception is org.flywaydb.core.internal.command.DbMigrate$FlywayMigrateException: +Migration V1__db_adaptive_trainings_schema.sql failed +----------------------------------------------------- +SQL State : 90017 +Error Code : 90017 +Message : Attempt to define a second primary key; SQL statement: +create table question ( + question_id bigserial not null, + question_type varchar(64) not null, + text text not null, + phase_id bigserial not null, + primary key (question_id), + foreign key (phase_id) references questionnaire_phase +) [90017-200] +Location : db/migration/V1__db_adaptive_trainings_schema.sql (/home/dominik/Desktop/Workspace/BACKEND/kypo-adaptive-training/target/classes/db/migration/V1__db_adaptive_trainings_schema.sql) +Line : 95 +Statement : create table question ( + question_id bigserial not null, + question_type varchar(64) not null, + text text not null, + phase_id bigserial not null, + primary key (question_id), + foreign key (phase_id) references questionnaire_phase +) + + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1796) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:595) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:310) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1108) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:868) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at cz.muni.ics.kypo.training.adaptive.DemoApplication.main(DemoApplication.java:13) ~[classes/:na] +Caused by: org.flywaydb.core.internal.command.DbMigrate$FlywayMigrateException: +Migration V1__db_adaptive_trainings_schema.sql failed +----------------------------------------------------- +SQL State : 90017 +Error Code : 90017 +Message : Attempt to define a second primary key; SQL statement: +create table question ( + question_id bigserial not null, + question_type varchar(64) not null, + text text not null, + phase_id bigserial not null, + primary key (question_id), + foreign key (phase_id) references questionnaire_phase +) [90017-200] +Location : db/migration/V1__db_adaptive_trainings_schema.sql (/home/dominik/Desktop/Workspace/BACKEND/kypo-adaptive-training/target/classes/db/migration/V1__db_adaptive_trainings_schema.sql) +Line : 95 +Statement : create table question ( + question_id bigserial not null, + question_type varchar(64) not null, + text text not null, + phase_id bigserial not null, + primary key (question_id), + foreign key (phase_id) references questionnaire_phase +) + + at org.flywaydb.core.internal.command.DbMigrate.doMigrateGroup(DbMigrate.java:369) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate.access$200(DbMigrate.java:54) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate$3.call(DbMigrate.java:282) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.jdbc.TransactionTemplate.execute(TransactionTemplate.java:74) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate.applyMigrations(DbMigrate.java:279) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate.migrateGroup(DbMigrate.java:244) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate.access$100(DbMigrate.java:54) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate$2.call(DbMigrate.java:162) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate$2.call(DbMigrate.java:159) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.database.base.Connection$1.call(Connection.java:131) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.jdbc.TransactionTemplate.execute(TransactionTemplate.java:74) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.database.base.Connection.lock(Connection.java:127) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory.lock(JdbcTableSchemaHistory.java:139) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate.migrateAll(DbMigrate.java:159) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate.migrate(DbMigrate.java:137) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.Flyway$1.execute(Flyway.java:189) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.Flyway$1.execute(Flyway.java:149) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.Flyway.execute(Flyway.java:511) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.Flyway.migrate(Flyway.java:149) ~[flyway-core-6.0.8.jar:na] + at org.springframework.boot.autoconfigure.flyway.FlywayMigrationInitializer.afterPropertiesSet(FlywayMigrationInitializer.java:65) ~[spring-boot-autoconfigure-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1855) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1792) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + ... 18 common frames omitted +Caused by: org.flywaydb.core.internal.sqlscript.FlywaySqlScriptException: +Migration V1__db_adaptive_trainings_schema.sql failed +----------------------------------------------------- +SQL State : 90017 +Error Code : 90017 +Message : Attempt to define a second primary key; SQL statement: +create table question ( + question_id bigserial not null, + question_type varchar(64) not null, + text text not null, + phase_id bigserial not null, + primary key (question_id), + foreign key (phase_id) references questionnaire_phase +) [90017-200] +Location : db/migration/V1__db_adaptive_trainings_schema.sql (/home/dominik/Desktop/Workspace/BACKEND/kypo-adaptive-training/target/classes/db/migration/V1__db_adaptive_trainings_schema.sql) +Line : 95 +Statement : create table question ( + question_id bigserial not null, + question_type varchar(64) not null, + text text not null, + phase_id bigserial not null, + primary key (question_id), + foreign key (phase_id) references questionnaire_phase +) + + at org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor.handleException(DefaultSqlScriptExecutor.java:274) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor.executeStatement(DefaultSqlScriptExecutor.java:220) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor.execute(DefaultSqlScriptExecutor.java:127) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.resolver.sql.SqlMigrationExecutor.execute(SqlMigrationExecutor.java:70) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate.doMigrateGroup(DbMigrate.java:366) ~[flyway-core-6.0.8.jar:na] + ... 39 common frames omitted +Caused by: org.h2.jdbc.JdbcSQLSyntaxErrorException: Attempt to define a second primary key; SQL statement: +create table question ( + question_id bigserial not null, + question_type varchar(64) not null, + text text not null, + phase_id bigserial not null, + primary key (question_id), + foreign key (phase_id) references questionnaire_phase +) [90017-200] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:576) ~[h2-1.4.200.jar:1.4.200] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:429) ~[h2-1.4.200.jar:1.4.200] + at org.h2.message.DbException.get(DbException.java:205) ~[h2-1.4.200.jar:1.4.200] + at org.h2.message.DbException.get(DbException.java:181) ~[h2-1.4.200.jar:1.4.200] + at org.h2.message.DbException.get(DbException.java:170) ~[h2-1.4.200.jar:1.4.200] + at org.h2.command.ddl.CommandWithColumns.setPrimaryKey(CommandWithColumns.java:148) ~[h2-1.4.200.jar:1.4.200] + at org.h2.command.ddl.CommandWithColumns.addConstraintCommand(CommandWithColumns.java:49) ~[h2-1.4.200.jar:1.4.200] + at org.h2.command.Parser.parseTableColumnDefinition(Parser.java:8452) ~[h2-1.4.200.jar:1.4.200] + at org.h2.command.Parser.parseCreateTable(Parser.java:8379) ~[h2-1.4.200.jar:1.4.200] + at org.h2.command.Parser.parseCreate(Parser.java:6276) ~[h2-1.4.200.jar:1.4.200] + at org.h2.command.Parser.parsePrepared(Parser.java:903) ~[h2-1.4.200.jar:1.4.200] + at org.h2.command.Parser.parse(Parser.java:843) ~[h2-1.4.200.jar:1.4.200] + at org.h2.command.Parser.parse(Parser.java:815) ~[h2-1.4.200.jar:1.4.200] + at org.h2.command.Parser.prepareCommand(Parser.java:738) ~[h2-1.4.200.jar:1.4.200] + at org.h2.engine.Session.prepareLocal(Session.java:657) ~[h2-1.4.200.jar:1.4.200] + at org.h2.engine.Session.prepareCommand(Session.java:595) ~[h2-1.4.200.jar:1.4.200] + at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1235) ~[h2-1.4.200.jar:1.4.200] + at org.h2.jdbc.JdbcStatement.executeInternal(JdbcStatement.java:212) ~[h2-1.4.200.jar:1.4.200] + at org.h2.jdbc.JdbcStatement.execute(JdbcStatement.java:201) ~[h2-1.4.200.jar:1.4.200] + at com.zaxxer.hikari.pool.ProxyStatement.execute(ProxyStatement.java:95) ~[HikariCP-3.4.2.jar:na] + at com.zaxxer.hikari.pool.HikariProxyStatement.execute(HikariProxyStatement.java) ~[HikariCP-3.4.2.jar:na] + at org.flywaydb.core.internal.jdbc.JdbcTemplate.executeStatement(JdbcTemplate.java:244) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.sqlscript.ParsedSqlStatement.execute(ParsedSqlStatement.java:111) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor.executeStatement(DefaultSqlScriptExecutor.java:208) ~[flyway-core-6.0.8.jar:na] + ... 42 common frames omitted + +2021-02-12 15:41:55.093 INFO 16944 --- [main] c.m.i.k.t.adaptive.DemoApplication : No active profile set, falling back to default profiles: default +2021-02-12 15:41:55.803 INFO 16944 --- [main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode. +2021-02-12 15:41:55.854 INFO 16944 --- [main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 46ms. Found 7 JPA repository interfaces. +2021-02-12 15:41:55.983 INFO 16944 --- [main] o.s.cloud.context.scope.GenericScope : BeanFactory id=f0cd3bee-f190-387e-b69c-3ea724180170 +2021-02-12 15:41:56.086 INFO 16944 --- [main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2021-02-12 15:41:56.232 INFO 16944 --- [main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8082 (http) +2021-02-12 15:41:56.237 INFO 16944 --- [main] o.apache.catalina.core.StandardService : Starting service [Tomcat] +2021-02-12 15:41:56.237 INFO 16944 --- [main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.30] +2021-02-12 15:41:56.303 INFO 16944 --- [main] c.C.[.[.[/kypo-adaptive-training/api/v1] : Initializing Spring embedded WebApplicationContext +2021-02-12 15:41:56.303 INFO 16944 --- [main] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 1195 ms +2021-02-12 15:41:56.565 INFO 16944 --- [main] o.f.c.internal.license.VersionPrinter : Flyway Community Edition 6.0.8 by Redgate +2021-02-12 15:41:56.568 INFO 16944 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting... +2021-02-12 15:41:56.624 INFO 16944 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed. +2021-02-12 15:41:56.649 INFO 16944 --- [main] o.f.c.internal.database.DatabaseFactory : Database: jdbc:h2:mem:testdb (H2 1.4) +2021-02-12 15:41:56.672 WARN 16944 --- [main] o.f.c.internal.database.base.Database : Flyway upgrade recommended: H2 1.4.200 is newer than this version of Flyway and support has not been tested. The latest supported version of H2 is 1.4.199. +2021-02-12 15:41:56.693 INFO 16944 --- [main] o.f.core.internal.command.DbValidate : Successfully validated 2 migrations (execution time 00:00.015s) +2021-02-12 15:41:56.702 INFO 16944 --- [main] o.f.c.i.s.JdbcTableSchemaHistory : Creating Schema History table "PUBLIC"."flyway_schema_history" ... +2021-02-12 15:41:56.731 INFO 16944 --- [main] o.f.core.internal.command.DbMigrate : Current version of schema "PUBLIC": << Empty Schema >> +2021-02-12 15:41:56.739 INFO 16944 --- [main] o.f.core.internal.command.DbMigrate : Migrating schema "PUBLIC" to version 1 - db adaptive trainings schema +2021-02-12 15:41:56.761 ERROR 16944 --- [main] o.f.core.internal.command.DbMigrate : Migration of schema "PUBLIC" to version 1 - db adaptive trainings schema failed! Please restore backups and roll back database and code! +2021-02-12 15:41:56.767 WARN 16944 --- [main] 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]: Invocation of init method failed; nested exception is org.flywaydb.core.internal.command.DbMigrate$FlywayMigrateException: +Migration V1__db_adaptive_trainings_schema.sql failed +----------------------------------------------------- +SQL State : 90017 +Error Code : 90017 +Message : Attempt to define a second primary key; SQL statement: +create table question_phase_relation ( + question_phase_relation_id bigserial not null, + success_rate int4 not null, + related_training_phase bigserial not null, + order_in_questionnaire int4 not null, + phase_id int8 not null, + primary key (question_phase_relation_id), + foreign key (related_training_phase) references training_phase, + foreign key (phase_id) references questionnaire_phase +) [90017-200] +Location : db/migration/V1__db_adaptive_trainings_schema.sql (/home/dominik/Desktop/Workspace/BACKEND/kypo-adaptive-training/target/classes/db/migration/V1__db_adaptive_trainings_schema.sql) +Line : 114 +Statement : create table question_phase_relation ( + question_phase_relation_id bigserial not null, + success_rate int4 not null, + related_training_phase bigserial not null, + order_in_questionnaire int4 not null, + phase_id int8 not null, + primary key (question_phase_relation_id), + foreign key (related_training_phase) references training_phase, + foreign key (phase_id) references questionnaire_phase +) + +2021-02-12 15:41:56.768 INFO 16944 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated... +2021-02-12 15:41:56.770 INFO 16944 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed. +2021-02-12 15:41:56.772 INFO 16944 --- [main] o.apache.catalina.core.StandardService : Stopping service [Tomcat] +2021-02-12 15:41:56.784 INFO 16944 --- [main] ConditionEvaluationReportLoggingListener : + +Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. +2021-02-12 15:41:56.792 ERROR 16944 --- [main] 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]: Invocation of init method failed; nested exception is org.flywaydb.core.internal.command.DbMigrate$FlywayMigrateException: +Migration V1__db_adaptive_trainings_schema.sql failed +----------------------------------------------------- +SQL State : 90017 +Error Code : 90017 +Message : Attempt to define a second primary key; SQL statement: +create table question_phase_relation ( + question_phase_relation_id bigserial not null, + success_rate int4 not null, + related_training_phase bigserial not null, + order_in_questionnaire int4 not null, + phase_id int8 not null, + primary key (question_phase_relation_id), + foreign key (related_training_phase) references training_phase, + foreign key (phase_id) references questionnaire_phase +) [90017-200] +Location : db/migration/V1__db_adaptive_trainings_schema.sql (/home/dominik/Desktop/Workspace/BACKEND/kypo-adaptive-training/target/classes/db/migration/V1__db_adaptive_trainings_schema.sql) +Line : 114 +Statement : create table question_phase_relation ( + question_phase_relation_id bigserial not null, + success_rate int4 not null, + related_training_phase bigserial not null, + order_in_questionnaire int4 not null, + phase_id int8 not null, + primary key (question_phase_relation_id), + foreign key (related_training_phase) references training_phase, + foreign key (phase_id) references questionnaire_phase +) + + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1796) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:595) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:310) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1108) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:868) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at cz.muni.ics.kypo.training.adaptive.DemoApplication.main(DemoApplication.java:13) ~[classes/:na] +Caused by: org.flywaydb.core.internal.command.DbMigrate$FlywayMigrateException: +Migration V1__db_adaptive_trainings_schema.sql failed +----------------------------------------------------- +SQL State : 90017 +Error Code : 90017 +Message : Attempt to define a second primary key; SQL statement: +create table question_phase_relation ( + question_phase_relation_id bigserial not null, + success_rate int4 not null, + related_training_phase bigserial not null, + order_in_questionnaire int4 not null, + phase_id int8 not null, + primary key (question_phase_relation_id), + foreign key (related_training_phase) references training_phase, + foreign key (phase_id) references questionnaire_phase +) [90017-200] +Location : db/migration/V1__db_adaptive_trainings_schema.sql (/home/dominik/Desktop/Workspace/BACKEND/kypo-adaptive-training/target/classes/db/migration/V1__db_adaptive_trainings_schema.sql) +Line : 114 +Statement : create table question_phase_relation ( + question_phase_relation_id bigserial not null, + success_rate int4 not null, + related_training_phase bigserial not null, + order_in_questionnaire int4 not null, + phase_id int8 not null, + primary key (question_phase_relation_id), + foreign key (related_training_phase) references training_phase, + foreign key (phase_id) references questionnaire_phase +) + + at org.flywaydb.core.internal.command.DbMigrate.doMigrateGroup(DbMigrate.java:369) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate.access$200(DbMigrate.java:54) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate$3.call(DbMigrate.java:282) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.jdbc.TransactionTemplate.execute(TransactionTemplate.java:74) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate.applyMigrations(DbMigrate.java:279) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate.migrateGroup(DbMigrate.java:244) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate.access$100(DbMigrate.java:54) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate$2.call(DbMigrate.java:162) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate$2.call(DbMigrate.java:159) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.database.base.Connection$1.call(Connection.java:131) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.jdbc.TransactionTemplate.execute(TransactionTemplate.java:74) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.database.base.Connection.lock(Connection.java:127) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory.lock(JdbcTableSchemaHistory.java:139) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate.migrateAll(DbMigrate.java:159) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate.migrate(DbMigrate.java:137) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.Flyway$1.execute(Flyway.java:189) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.Flyway$1.execute(Flyway.java:149) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.Flyway.execute(Flyway.java:511) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.Flyway.migrate(Flyway.java:149) ~[flyway-core-6.0.8.jar:na] + at org.springframework.boot.autoconfigure.flyway.FlywayMigrationInitializer.afterPropertiesSet(FlywayMigrationInitializer.java:65) ~[spring-boot-autoconfigure-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1855) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1792) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + ... 18 common frames omitted +Caused by: org.flywaydb.core.internal.sqlscript.FlywaySqlScriptException: +Migration V1__db_adaptive_trainings_schema.sql failed +----------------------------------------------------- +SQL State : 90017 +Error Code : 90017 +Message : Attempt to define a second primary key; SQL statement: +create table question_phase_relation ( + question_phase_relation_id bigserial not null, + success_rate int4 not null, + related_training_phase bigserial not null, + order_in_questionnaire int4 not null, + phase_id int8 not null, + primary key (question_phase_relation_id), + foreign key (related_training_phase) references training_phase, + foreign key (phase_id) references questionnaire_phase +) [90017-200] +Location : db/migration/V1__db_adaptive_trainings_schema.sql (/home/dominik/Desktop/Workspace/BACKEND/kypo-adaptive-training/target/classes/db/migration/V1__db_adaptive_trainings_schema.sql) +Line : 114 +Statement : create table question_phase_relation ( + question_phase_relation_id bigserial not null, + success_rate int4 not null, + related_training_phase bigserial not null, + order_in_questionnaire int4 not null, + phase_id int8 not null, + primary key (question_phase_relation_id), + foreign key (related_training_phase) references training_phase, + foreign key (phase_id) references questionnaire_phase +) + + at org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor.handleException(DefaultSqlScriptExecutor.java:274) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor.executeStatement(DefaultSqlScriptExecutor.java:220) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor.execute(DefaultSqlScriptExecutor.java:127) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.resolver.sql.SqlMigrationExecutor.execute(SqlMigrationExecutor.java:70) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate.doMigrateGroup(DbMigrate.java:366) ~[flyway-core-6.0.8.jar:na] + ... 39 common frames omitted +Caused by: org.h2.jdbc.JdbcSQLSyntaxErrorException: Attempt to define a second primary key; SQL statement: +create table question_phase_relation ( + question_phase_relation_id bigserial not null, + success_rate int4 not null, + related_training_phase bigserial not null, + order_in_questionnaire int4 not null, + phase_id int8 not null, + primary key (question_phase_relation_id), + foreign key (related_training_phase) references training_phase, + foreign key (phase_id) references questionnaire_phase +) [90017-200] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:576) ~[h2-1.4.200.jar:1.4.200] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:429) ~[h2-1.4.200.jar:1.4.200] + at org.h2.message.DbException.get(DbException.java:205) ~[h2-1.4.200.jar:1.4.200] + at org.h2.message.DbException.get(DbException.java:181) ~[h2-1.4.200.jar:1.4.200] + at org.h2.message.DbException.get(DbException.java:170) ~[h2-1.4.200.jar:1.4.200] + at org.h2.command.ddl.CommandWithColumns.setPrimaryKey(CommandWithColumns.java:148) ~[h2-1.4.200.jar:1.4.200] + at org.h2.command.ddl.CommandWithColumns.addConstraintCommand(CommandWithColumns.java:49) ~[h2-1.4.200.jar:1.4.200] + at org.h2.command.Parser.parseTableColumnDefinition(Parser.java:8452) ~[h2-1.4.200.jar:1.4.200] + at org.h2.command.Parser.parseCreateTable(Parser.java:8379) ~[h2-1.4.200.jar:1.4.200] + at org.h2.command.Parser.parseCreate(Parser.java:6276) ~[h2-1.4.200.jar:1.4.200] + at org.h2.command.Parser.parsePrepared(Parser.java:903) ~[h2-1.4.200.jar:1.4.200] + at org.h2.command.Parser.parse(Parser.java:843) ~[h2-1.4.200.jar:1.4.200] + at org.h2.command.Parser.parse(Parser.java:815) ~[h2-1.4.200.jar:1.4.200] + at org.h2.command.Parser.prepareCommand(Parser.java:738) ~[h2-1.4.200.jar:1.4.200] + at org.h2.engine.Session.prepareLocal(Session.java:657) ~[h2-1.4.200.jar:1.4.200] + at org.h2.engine.Session.prepareCommand(Session.java:595) ~[h2-1.4.200.jar:1.4.200] + at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1235) ~[h2-1.4.200.jar:1.4.200] + at org.h2.jdbc.JdbcStatement.executeInternal(JdbcStatement.java:212) ~[h2-1.4.200.jar:1.4.200] + at org.h2.jdbc.JdbcStatement.execute(JdbcStatement.java:201) ~[h2-1.4.200.jar:1.4.200] + at com.zaxxer.hikari.pool.ProxyStatement.execute(ProxyStatement.java:95) ~[HikariCP-3.4.2.jar:na] + at com.zaxxer.hikari.pool.HikariProxyStatement.execute(HikariProxyStatement.java) ~[HikariCP-3.4.2.jar:na] + at org.flywaydb.core.internal.jdbc.JdbcTemplate.executeStatement(JdbcTemplate.java:244) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.sqlscript.ParsedSqlStatement.execute(ParsedSqlStatement.java:111) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor.executeStatement(DefaultSqlScriptExecutor.java:208) ~[flyway-core-6.0.8.jar:na] + ... 42 common frames omitted + +2021-02-12 15:42:06.515 INFO 17048 --- [main] c.m.i.k.t.adaptive.DemoApplication : No active profile set, falling back to default profiles: default +2021-02-12 15:42:07.178 INFO 17048 --- [main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode. +2021-02-12 15:42:07.223 INFO 17048 --- [main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 40ms. Found 7 JPA repository interfaces. +2021-02-12 15:42:07.351 INFO 17048 --- [main] o.s.cloud.context.scope.GenericScope : BeanFactory id=f0cd3bee-f190-387e-b69c-3ea724180170 +2021-02-12 15:42:07.451 INFO 17048 --- [main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2021-02-12 15:42:07.609 INFO 17048 --- [main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8082 (http) +2021-02-12 15:42:07.614 INFO 17048 --- [main] o.apache.catalina.core.StandardService : Starting service [Tomcat] +2021-02-12 15:42:07.614 INFO 17048 --- [main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.30] +2021-02-12 15:42:07.677 INFO 17048 --- [main] c.C.[.[.[/kypo-adaptive-training/api/v1] : Initializing Spring embedded WebApplicationContext +2021-02-12 15:42:07.678 INFO 17048 --- [main] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 1154 ms +2021-02-12 15:42:07.932 INFO 17048 --- [main] o.f.c.internal.license.VersionPrinter : Flyway Community Edition 6.0.8 by Redgate +2021-02-12 15:42:07.935 INFO 17048 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting... +2021-02-12 15:42:07.987 INFO 17048 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed. +2021-02-12 15:42:08.009 INFO 17048 --- [main] o.f.c.internal.database.DatabaseFactory : Database: jdbc:h2:mem:testdb (H2 1.4) +2021-02-12 15:42:08.027 WARN 17048 --- [main] o.f.c.internal.database.base.Database : Flyway upgrade recommended: H2 1.4.200 is newer than this version of Flyway and support has not been tested. The latest supported version of H2 is 1.4.199. +2021-02-12 15:42:08.047 INFO 17048 --- [main] o.f.core.internal.command.DbValidate : Successfully validated 2 migrations (execution time 00:00.013s) +2021-02-12 15:42:08.055 INFO 17048 --- [main] o.f.c.i.s.JdbcTableSchemaHistory : Creating Schema History table "PUBLIC"."flyway_schema_history" ... +2021-02-12 15:42:08.082 INFO 17048 --- [main] o.f.core.internal.command.DbMigrate : Current version of schema "PUBLIC": << Empty Schema >> +2021-02-12 15:42:08.089 INFO 17048 --- [main] o.f.core.internal.command.DbMigrate : Migrating schema "PUBLIC" to version 1 - db adaptive trainings schema +2021-02-12 15:42:08.112 ERROR 17048 --- [main] o.f.core.internal.command.DbMigrate : Migration of schema "PUBLIC" to version 1 - db adaptive trainings schema failed! Please restore backups and roll back database and code! +2021-02-12 15:42:08.117 WARN 17048 --- [main] 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]: Invocation of init method failed; nested exception is org.flywaydb.core.internal.command.DbMigrate$FlywayMigrateException: +Migration V1__db_adaptive_trainings_schema.sql failed +----------------------------------------------------- +SQL State : 42S02 +Error Code : 42102 +Message : Table "TRAINING_PHASE" not found; SQL statement: +create table question_phase_relation ( + question_phase_relation_id bigserial not null, + success_rate int4 not null, + related_training_phase int8 not null, + order_in_questionnaire int4 not null, + phase_id int8 not null, + primary key (question_phase_relation_id), + foreign key (related_training_phase) references training_phase, + foreign key (phase_id) references questionnaire_phase +) [42102-200] +Location : db/migration/V1__db_adaptive_trainings_schema.sql (/home/dominik/Desktop/Workspace/BACKEND/kypo-adaptive-training/target/classes/db/migration/V1__db_adaptive_trainings_schema.sql) +Line : 114 +Statement : create table question_phase_relation ( + question_phase_relation_id bigserial not null, + success_rate int4 not null, + related_training_phase int8 not null, + order_in_questionnaire int4 not null, + phase_id int8 not null, + primary key (question_phase_relation_id), + foreign key (related_training_phase) references training_phase, + foreign key (phase_id) references questionnaire_phase +) + +2021-02-12 15:42:08.118 INFO 17048 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated... +2021-02-12 15:42:08.120 INFO 17048 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed. +2021-02-12 15:42:08.121 INFO 17048 --- [main] o.apache.catalina.core.StandardService : Stopping service [Tomcat] +2021-02-12 15:42:08.132 INFO 17048 --- [main] ConditionEvaluationReportLoggingListener : + +Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. +2021-02-12 15:42:08.139 ERROR 17048 --- [main] 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]: Invocation of init method failed; nested exception is org.flywaydb.core.internal.command.DbMigrate$FlywayMigrateException: +Migration V1__db_adaptive_trainings_schema.sql failed +----------------------------------------------------- +SQL State : 42S02 +Error Code : 42102 +Message : Table "TRAINING_PHASE" not found; SQL statement: +create table question_phase_relation ( + question_phase_relation_id bigserial not null, + success_rate int4 not null, + related_training_phase int8 not null, + order_in_questionnaire int4 not null, + phase_id int8 not null, + primary key (question_phase_relation_id), + foreign key (related_training_phase) references training_phase, + foreign key (phase_id) references questionnaire_phase +) [42102-200] +Location : db/migration/V1__db_adaptive_trainings_schema.sql (/home/dominik/Desktop/Workspace/BACKEND/kypo-adaptive-training/target/classes/db/migration/V1__db_adaptive_trainings_schema.sql) +Line : 114 +Statement : create table question_phase_relation ( + question_phase_relation_id bigserial not null, + success_rate int4 not null, + related_training_phase int8 not null, + order_in_questionnaire int4 not null, + phase_id int8 not null, + primary key (question_phase_relation_id), + foreign key (related_training_phase) references training_phase, + foreign key (phase_id) references questionnaire_phase +) + + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1796) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:595) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:310) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1108) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:868) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at cz.muni.ics.kypo.training.adaptive.DemoApplication.main(DemoApplication.java:13) ~[classes/:na] +Caused by: org.flywaydb.core.internal.command.DbMigrate$FlywayMigrateException: +Migration V1__db_adaptive_trainings_schema.sql failed +----------------------------------------------------- +SQL State : 42S02 +Error Code : 42102 +Message : Table "TRAINING_PHASE" not found; SQL statement: +create table question_phase_relation ( + question_phase_relation_id bigserial not null, + success_rate int4 not null, + related_training_phase int8 not null, + order_in_questionnaire int4 not null, + phase_id int8 not null, + primary key (question_phase_relation_id), + foreign key (related_training_phase) references training_phase, + foreign key (phase_id) references questionnaire_phase +) [42102-200] +Location : db/migration/V1__db_adaptive_trainings_schema.sql (/home/dominik/Desktop/Workspace/BACKEND/kypo-adaptive-training/target/classes/db/migration/V1__db_adaptive_trainings_schema.sql) +Line : 114 +Statement : create table question_phase_relation ( + question_phase_relation_id bigserial not null, + success_rate int4 not null, + related_training_phase int8 not null, + order_in_questionnaire int4 not null, + phase_id int8 not null, + primary key (question_phase_relation_id), + foreign key (related_training_phase) references training_phase, + foreign key (phase_id) references questionnaire_phase +) + + at org.flywaydb.core.internal.command.DbMigrate.doMigrateGroup(DbMigrate.java:369) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate.access$200(DbMigrate.java:54) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate$3.call(DbMigrate.java:282) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.jdbc.TransactionTemplate.execute(TransactionTemplate.java:74) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate.applyMigrations(DbMigrate.java:279) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate.migrateGroup(DbMigrate.java:244) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate.access$100(DbMigrate.java:54) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate$2.call(DbMigrate.java:162) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate$2.call(DbMigrate.java:159) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.database.base.Connection$1.call(Connection.java:131) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.jdbc.TransactionTemplate.execute(TransactionTemplate.java:74) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.database.base.Connection.lock(Connection.java:127) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory.lock(JdbcTableSchemaHistory.java:139) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate.migrateAll(DbMigrate.java:159) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate.migrate(DbMigrate.java:137) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.Flyway$1.execute(Flyway.java:189) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.Flyway$1.execute(Flyway.java:149) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.Flyway.execute(Flyway.java:511) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.Flyway.migrate(Flyway.java:149) ~[flyway-core-6.0.8.jar:na] + at org.springframework.boot.autoconfigure.flyway.FlywayMigrationInitializer.afterPropertiesSet(FlywayMigrationInitializer.java:65) ~[spring-boot-autoconfigure-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1855) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1792) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + ... 18 common frames omitted +Caused by: org.flywaydb.core.internal.sqlscript.FlywaySqlScriptException: +Migration V1__db_adaptive_trainings_schema.sql failed +----------------------------------------------------- +SQL State : 42S02 +Error Code : 42102 +Message : Table "TRAINING_PHASE" not found; SQL statement: +create table question_phase_relation ( + question_phase_relation_id bigserial not null, + success_rate int4 not null, + related_training_phase int8 not null, + order_in_questionnaire int4 not null, + phase_id int8 not null, + primary key (question_phase_relation_id), + foreign key (related_training_phase) references training_phase, + foreign key (phase_id) references questionnaire_phase +) [42102-200] +Location : db/migration/V1__db_adaptive_trainings_schema.sql (/home/dominik/Desktop/Workspace/BACKEND/kypo-adaptive-training/target/classes/db/migration/V1__db_adaptive_trainings_schema.sql) +Line : 114 +Statement : create table question_phase_relation ( + question_phase_relation_id bigserial not null, + success_rate int4 not null, + related_training_phase int8 not null, + order_in_questionnaire int4 not null, + phase_id int8 not null, + primary key (question_phase_relation_id), + foreign key (related_training_phase) references training_phase, + foreign key (phase_id) references questionnaire_phase +) + + at org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor.handleException(DefaultSqlScriptExecutor.java:274) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor.executeStatement(DefaultSqlScriptExecutor.java:220) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor.execute(DefaultSqlScriptExecutor.java:127) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.resolver.sql.SqlMigrationExecutor.execute(SqlMigrationExecutor.java:70) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate.doMigrateGroup(DbMigrate.java:366) ~[flyway-core-6.0.8.jar:na] + ... 39 common frames omitted +Caused by: org.h2.jdbc.JdbcSQLSyntaxErrorException: Table "TRAINING_PHASE" not found; SQL statement: +create table question_phase_relation ( + question_phase_relation_id bigserial not null, + success_rate int4 not null, + related_training_phase int8 not null, + order_in_questionnaire int4 not null, + phase_id int8 not null, + primary key (question_phase_relation_id), + foreign key (related_training_phase) references training_phase, + foreign key (phase_id) references questionnaire_phase +) [42102-200] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:453) ~[h2-1.4.200.jar:1.4.200] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:429) ~[h2-1.4.200.jar:1.4.200] + at org.h2.message.DbException.get(DbException.java:205) ~[h2-1.4.200.jar:1.4.200] + at org.h2.message.DbException.get(DbException.java:181) ~[h2-1.4.200.jar:1.4.200] + at org.h2.command.ddl.AlterTableAddConstraint.tryUpdate(AlterTableAddConstraint.java:207) ~[h2-1.4.200.jar:1.4.200] + at org.h2.command.ddl.AlterTableAddConstraint.update(AlterTableAddConstraint.java:78) ~[h2-1.4.200.jar:1.4.200] + at org.h2.command.ddl.CommandWithColumns.createConstraints(CommandWithColumns.java:83) ~[h2-1.4.200.jar:1.4.200] + at org.h2.command.ddl.CreateTable.update(CreateTable.java:133) ~[h2-1.4.200.jar:1.4.200] + at org.h2.command.CommandContainer.update(CommandContainer.java:198) ~[h2-1.4.200.jar:1.4.200] + at org.h2.command.Command.executeUpdate(Command.java:251) ~[h2-1.4.200.jar:1.4.200] + at org.h2.jdbc.JdbcStatement.executeInternal(JdbcStatement.java:228) ~[h2-1.4.200.jar:1.4.200] + at org.h2.jdbc.JdbcStatement.execute(JdbcStatement.java:201) ~[h2-1.4.200.jar:1.4.200] + at com.zaxxer.hikari.pool.ProxyStatement.execute(ProxyStatement.java:95) ~[HikariCP-3.4.2.jar:na] + at com.zaxxer.hikari.pool.HikariProxyStatement.execute(HikariProxyStatement.java) ~[HikariCP-3.4.2.jar:na] + at org.flywaydb.core.internal.jdbc.JdbcTemplate.executeStatement(JdbcTemplate.java:244) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.sqlscript.ParsedSqlStatement.execute(ParsedSqlStatement.java:111) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor.executeStatement(DefaultSqlScriptExecutor.java:208) ~[flyway-core-6.0.8.jar:na] + ... 42 common frames omitted + +2021-02-12 15:42:46.600 INFO 17192 --- [main] c.m.i.k.t.adaptive.DemoApplication : No active profile set, falling back to default profiles: default +2021-02-12 15:42:47.286 INFO 17192 --- [main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode. +2021-02-12 15:42:47.337 INFO 17192 --- [main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 46ms. Found 7 JPA repository interfaces. +2021-02-12 15:42:47.487 INFO 17192 --- [main] o.s.cloud.context.scope.GenericScope : BeanFactory id=f0cd3bee-f190-387e-b69c-3ea724180170 +2021-02-12 15:42:47.605 INFO 17192 --- [main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2021-02-12 15:42:47.767 INFO 17192 --- [main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8082 (http) +2021-02-12 15:42:47.772 INFO 17192 --- [main] o.apache.catalina.core.StandardService : Starting service [Tomcat] +2021-02-12 15:42:47.773 INFO 17192 --- [main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.30] +2021-02-12 15:42:47.853 INFO 17192 --- [main] c.C.[.[.[/kypo-adaptive-training/api/v1] : Initializing Spring embedded WebApplicationContext +2021-02-12 15:42:47.853 INFO 17192 --- [main] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 1236 ms +2021-02-12 15:42:48.122 INFO 17192 --- [main] o.f.c.internal.license.VersionPrinter : Flyway Community Edition 6.0.8 by Redgate +2021-02-12 15:42:48.125 INFO 17192 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting... +2021-02-12 15:42:48.180 INFO 17192 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed. +2021-02-12 15:42:48.201 INFO 17192 --- [main] o.f.c.internal.database.DatabaseFactory : Database: jdbc:h2:mem:testdb (H2 1.4) +2021-02-12 15:42:48.220 WARN 17192 --- [main] o.f.c.internal.database.base.Database : Flyway upgrade recommended: H2 1.4.200 is newer than this version of Flyway and support has not been tested. The latest supported version of H2 is 1.4.199. +2021-02-12 15:42:48.240 INFO 17192 --- [main] o.f.core.internal.command.DbValidate : Successfully validated 2 migrations (execution time 00:00.014s) +2021-02-12 15:42:48.249 INFO 17192 --- [main] o.f.c.i.s.JdbcTableSchemaHistory : Creating Schema History table "PUBLIC"."flyway_schema_history" ... +2021-02-12 15:42:48.275 INFO 17192 --- [main] o.f.core.internal.command.DbMigrate : Current version of schema "PUBLIC": << Empty Schema >> +2021-02-12 15:42:48.285 INFO 17192 --- [main] o.f.core.internal.command.DbMigrate : Migrating schema "PUBLIC" to version 1 - db adaptive trainings schema +2021-02-12 15:42:48.304 ERROR 17192 --- [main] o.f.core.internal.command.DbMigrate : Migration of schema "PUBLIC" to version 1 - db adaptive trainings schema failed! Please restore backups and roll back database and code! +2021-02-12 15:42:48.309 WARN 17192 --- [main] 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]: Invocation of init method failed; nested exception is org.flywaydb.core.internal.command.DbMigrate$FlywayMigrateException: +Migration V1__db_adaptive_trainings_schema.sql failed +----------------------------------------------------- +SQL State : 90017 +Error Code : 90017 +Message : Attempt to define a second primary key; SQL statement: +create table task ( + task_id bigserial not null, + title varchar(255) not null, + content text not null, + answer varchar(255) not null, + solution varchar(1048) not null, + incorrect_answer_limit int4, + modify_sandbox boolean not null, + sandbox_change_expected_duration int8 not null, + order_in_training_phase int4 not null, + phase_id bigserial not null, + primary key (task_id), + foreign key (phase_id) references training_phase +) [90017-200] +Location : db/migration/V1__db_adaptive_trainings_schema.sql (/home/dominik/Desktop/Workspace/BACKEND/kypo-adaptive-training/target/classes/db/migration/V1__db_adaptive_trainings_schema.sql) +Line : 98 +Statement : create table task ( + task_id bigserial not null, + title varchar(255) not null, + content text not null, + answer varchar(255) not null, + solution varchar(1048) not null, + incorrect_answer_limit int4, + modify_sandbox boolean not null, + sandbox_change_expected_duration int8 not null, + order_in_training_phase int4 not null, + phase_id bigserial not null, + primary key (task_id), + foreign key (phase_id) references training_phase +) + +2021-02-12 15:42:48.310 INFO 17192 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated... +2021-02-12 15:42:48.312 INFO 17192 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed. +2021-02-12 15:42:48.313 INFO 17192 --- [main] o.apache.catalina.core.StandardService : Stopping service [Tomcat] +2021-02-12 15:42:48.330 INFO 17192 --- [main] ConditionEvaluationReportLoggingListener : + +Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. +2021-02-12 15:42:48.337 ERROR 17192 --- [main] 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]: Invocation of init method failed; nested exception is org.flywaydb.core.internal.command.DbMigrate$FlywayMigrateException: +Migration V1__db_adaptive_trainings_schema.sql failed +----------------------------------------------------- +SQL State : 90017 +Error Code : 90017 +Message : Attempt to define a second primary key; SQL statement: +create table task ( + task_id bigserial not null, + title varchar(255) not null, + content text not null, + answer varchar(255) not null, + solution varchar(1048) not null, + incorrect_answer_limit int4, + modify_sandbox boolean not null, + sandbox_change_expected_duration int8 not null, + order_in_training_phase int4 not null, + phase_id bigserial not null, + primary key (task_id), + foreign key (phase_id) references training_phase +) [90017-200] +Location : db/migration/V1__db_adaptive_trainings_schema.sql (/home/dominik/Desktop/Workspace/BACKEND/kypo-adaptive-training/target/classes/db/migration/V1__db_adaptive_trainings_schema.sql) +Line : 98 +Statement : create table task ( + task_id bigserial not null, + title varchar(255) not null, + content text not null, + answer varchar(255) not null, + solution varchar(1048) not null, + incorrect_answer_limit int4, + modify_sandbox boolean not null, + sandbox_change_expected_duration int8 not null, + order_in_training_phase int4 not null, + phase_id bigserial not null, + primary key (task_id), + foreign key (phase_id) references training_phase +) + + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1796) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:595) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:310) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1108) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:868) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at cz.muni.ics.kypo.training.adaptive.DemoApplication.main(DemoApplication.java:13) ~[classes/:na] +Caused by: org.flywaydb.core.internal.command.DbMigrate$FlywayMigrateException: +Migration V1__db_adaptive_trainings_schema.sql failed +----------------------------------------------------- +SQL State : 90017 +Error Code : 90017 +Message : Attempt to define a second primary key; SQL statement: +create table task ( + task_id bigserial not null, + title varchar(255) not null, + content text not null, + answer varchar(255) not null, + solution varchar(1048) not null, + incorrect_answer_limit int4, + modify_sandbox boolean not null, + sandbox_change_expected_duration int8 not null, + order_in_training_phase int4 not null, + phase_id bigserial not null, + primary key (task_id), + foreign key (phase_id) references training_phase +) [90017-200] +Location : db/migration/V1__db_adaptive_trainings_schema.sql (/home/dominik/Desktop/Workspace/BACKEND/kypo-adaptive-training/target/classes/db/migration/V1__db_adaptive_trainings_schema.sql) +Line : 98 +Statement : create table task ( + task_id bigserial not null, + title varchar(255) not null, + content text not null, + answer varchar(255) not null, + solution varchar(1048) not null, + incorrect_answer_limit int4, + modify_sandbox boolean not null, + sandbox_change_expected_duration int8 not null, + order_in_training_phase int4 not null, + phase_id bigserial not null, + primary key (task_id), + foreign key (phase_id) references training_phase +) + + at org.flywaydb.core.internal.command.DbMigrate.doMigrateGroup(DbMigrate.java:369) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate.access$200(DbMigrate.java:54) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate$3.call(DbMigrate.java:282) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.jdbc.TransactionTemplate.execute(TransactionTemplate.java:74) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate.applyMigrations(DbMigrate.java:279) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate.migrateGroup(DbMigrate.java:244) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate.access$100(DbMigrate.java:54) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate$2.call(DbMigrate.java:162) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate$2.call(DbMigrate.java:159) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.database.base.Connection$1.call(Connection.java:131) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.jdbc.TransactionTemplate.execute(TransactionTemplate.java:74) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.database.base.Connection.lock(Connection.java:127) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory.lock(JdbcTableSchemaHistory.java:139) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate.migrateAll(DbMigrate.java:159) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate.migrate(DbMigrate.java:137) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.Flyway$1.execute(Flyway.java:189) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.Flyway$1.execute(Flyway.java:149) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.Flyway.execute(Flyway.java:511) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.Flyway.migrate(Flyway.java:149) ~[flyway-core-6.0.8.jar:na] + at org.springframework.boot.autoconfigure.flyway.FlywayMigrationInitializer.afterPropertiesSet(FlywayMigrationInitializer.java:65) ~[spring-boot-autoconfigure-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1855) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1792) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + ... 18 common frames omitted +Caused by: org.flywaydb.core.internal.sqlscript.FlywaySqlScriptException: +Migration V1__db_adaptive_trainings_schema.sql failed +----------------------------------------------------- +SQL State : 90017 +Error Code : 90017 +Message : Attempt to define a second primary key; SQL statement: +create table task ( + task_id bigserial not null, + title varchar(255) not null, + content text not null, + answer varchar(255) not null, + solution varchar(1048) not null, + incorrect_answer_limit int4, + modify_sandbox boolean not null, + sandbox_change_expected_duration int8 not null, + order_in_training_phase int4 not null, + phase_id bigserial not null, + primary key (task_id), + foreign key (phase_id) references training_phase +) [90017-200] +Location : db/migration/V1__db_adaptive_trainings_schema.sql (/home/dominik/Desktop/Workspace/BACKEND/kypo-adaptive-training/target/classes/db/migration/V1__db_adaptive_trainings_schema.sql) +Line : 98 +Statement : create table task ( + task_id bigserial not null, + title varchar(255) not null, + content text not null, + answer varchar(255) not null, + solution varchar(1048) not null, + incorrect_answer_limit int4, + modify_sandbox boolean not null, + sandbox_change_expected_duration int8 not null, + order_in_training_phase int4 not null, + phase_id bigserial not null, + primary key (task_id), + foreign key (phase_id) references training_phase +) + + at org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor.handleException(DefaultSqlScriptExecutor.java:274) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor.executeStatement(DefaultSqlScriptExecutor.java:220) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor.execute(DefaultSqlScriptExecutor.java:127) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.resolver.sql.SqlMigrationExecutor.execute(SqlMigrationExecutor.java:70) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate.doMigrateGroup(DbMigrate.java:366) ~[flyway-core-6.0.8.jar:na] + ... 39 common frames omitted +Caused by: org.h2.jdbc.JdbcSQLSyntaxErrorException: Attempt to define a second primary key; SQL statement: +create table task ( + task_id bigserial not null, + title varchar(255) not null, + content text not null, + answer varchar(255) not null, + solution varchar(1048) not null, + incorrect_answer_limit int4, + modify_sandbox boolean not null, + sandbox_change_expected_duration int8 not null, + order_in_training_phase int4 not null, + phase_id bigserial not null, + primary key (task_id), + foreign key (phase_id) references training_phase +) [90017-200] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:576) ~[h2-1.4.200.jar:1.4.200] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:429) ~[h2-1.4.200.jar:1.4.200] + at org.h2.message.DbException.get(DbException.java:205) ~[h2-1.4.200.jar:1.4.200] + at org.h2.message.DbException.get(DbException.java:181) ~[h2-1.4.200.jar:1.4.200] + at org.h2.message.DbException.get(DbException.java:170) ~[h2-1.4.200.jar:1.4.200] + at org.h2.command.ddl.CommandWithColumns.setPrimaryKey(CommandWithColumns.java:148) ~[h2-1.4.200.jar:1.4.200] + at org.h2.command.ddl.CommandWithColumns.addConstraintCommand(CommandWithColumns.java:49) ~[h2-1.4.200.jar:1.4.200] + at org.h2.command.Parser.parseTableColumnDefinition(Parser.java:8452) ~[h2-1.4.200.jar:1.4.200] + at org.h2.command.Parser.parseCreateTable(Parser.java:8379) ~[h2-1.4.200.jar:1.4.200] + at org.h2.command.Parser.parseCreate(Parser.java:6276) ~[h2-1.4.200.jar:1.4.200] + at org.h2.command.Parser.parsePrepared(Parser.java:903) ~[h2-1.4.200.jar:1.4.200] + at org.h2.command.Parser.parse(Parser.java:843) ~[h2-1.4.200.jar:1.4.200] + at org.h2.command.Parser.parse(Parser.java:815) ~[h2-1.4.200.jar:1.4.200] + at org.h2.command.Parser.prepareCommand(Parser.java:738) ~[h2-1.4.200.jar:1.4.200] + at org.h2.engine.Session.prepareLocal(Session.java:657) ~[h2-1.4.200.jar:1.4.200] + at org.h2.engine.Session.prepareCommand(Session.java:595) ~[h2-1.4.200.jar:1.4.200] + at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1235) ~[h2-1.4.200.jar:1.4.200] + at org.h2.jdbc.JdbcStatement.executeInternal(JdbcStatement.java:212) ~[h2-1.4.200.jar:1.4.200] + at org.h2.jdbc.JdbcStatement.execute(JdbcStatement.java:201) ~[h2-1.4.200.jar:1.4.200] + at com.zaxxer.hikari.pool.ProxyStatement.execute(ProxyStatement.java:95) ~[HikariCP-3.4.2.jar:na] + at com.zaxxer.hikari.pool.HikariProxyStatement.execute(HikariProxyStatement.java) ~[HikariCP-3.4.2.jar:na] + at org.flywaydb.core.internal.jdbc.JdbcTemplate.executeStatement(JdbcTemplate.java:244) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.sqlscript.ParsedSqlStatement.execute(ParsedSqlStatement.java:111) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor.executeStatement(DefaultSqlScriptExecutor.java:208) ~[flyway-core-6.0.8.jar:na] + ... 42 common frames omitted + +2021-02-12 15:42:56.727 INFO 17296 --- [main] c.m.i.k.t.adaptive.DemoApplication : No active profile set, falling back to default profiles: default +2021-02-12 15:42:57.416 INFO 17296 --- [main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode. +2021-02-12 15:42:57.460 INFO 17296 --- [main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 40ms. Found 7 JPA repository interfaces. +2021-02-12 15:42:57.588 INFO 17296 --- [main] o.s.cloud.context.scope.GenericScope : BeanFactory id=f0cd3bee-f190-387e-b69c-3ea724180170 +2021-02-12 15:42:57.686 INFO 17296 --- [main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2021-02-12 15:42:57.846 INFO 17296 --- [main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8082 (http) +2021-02-12 15:42:57.851 INFO 17296 --- [main] o.apache.catalina.core.StandardService : Starting service [Tomcat] +2021-02-12 15:42:57.851 INFO 17296 --- [main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.30] +2021-02-12 15:42:57.924 INFO 17296 --- [main] c.C.[.[.[/kypo-adaptive-training/api/v1] : Initializing Spring embedded WebApplicationContext +2021-02-12 15:42:57.924 INFO 17296 --- [main] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 1175 ms +2021-02-12 15:42:58.215 INFO 17296 --- [main] o.f.c.internal.license.VersionPrinter : Flyway Community Edition 6.0.8 by Redgate +2021-02-12 15:42:58.219 INFO 17296 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting... +2021-02-12 15:42:58.295 INFO 17296 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed. +2021-02-12 15:42:58.301 INFO 17296 --- [main] o.f.c.internal.database.DatabaseFactory : Database: jdbc:h2:mem:testdb (H2 1.4) +2021-02-12 15:42:58.316 WARN 17296 --- [main] o.f.c.internal.database.base.Database : Flyway upgrade recommended: H2 1.4.200 is newer than this version of Flyway and support has not been tested. The latest supported version of H2 is 1.4.199. +2021-02-12 15:42:58.337 INFO 17296 --- [main] o.f.core.internal.command.DbValidate : Successfully validated 2 migrations (execution time 00:00.014s) +2021-02-12 15:42:58.345 INFO 17296 --- [main] o.f.c.i.s.JdbcTableSchemaHistory : Creating Schema History table "PUBLIC"."flyway_schema_history" ... +2021-02-12 15:42:58.373 INFO 17296 --- [main] o.f.core.internal.command.DbMigrate : Current version of schema "PUBLIC": << Empty Schema >> +2021-02-12 15:42:58.381 INFO 17296 --- [main] o.f.core.internal.command.DbMigrate : Migrating schema "PUBLIC" to version 1 - db adaptive trainings schema +2021-02-12 15:42:58.400 ERROR 17296 --- [main] o.f.core.internal.command.DbMigrate : Migration of schema "PUBLIC" to version 1 - db adaptive trainings schema failed! Please restore backups and roll back database and code! +2021-02-12 15:42:58.405 WARN 17296 --- [main] 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]: Invocation of init method failed; nested exception is org.flywaydb.core.internal.command.DbMigrate$FlywayMigrateException: +Migration V1__db_adaptive_trainings_schema.sql failed +----------------------------------------------------- +SQL State : 90017 +Error Code : 90017 +Message : Attempt to define a second primary key; SQL statement: +create table task ( + task_id bigserial not null, + title varchar(255) not null, + content text not null, + answer varchar(255) not null, + solution varchar(1048) not null, + incorrect_answer_limit int4, + modify_sandbox boolean not null, + sandbox_change_expected_duration int8 not null, + order_in_training_phase int4 not null, + phase_id bigserial not null, + primary key (task_id), + foreign key (phase_id) references training_phase +) [90017-200] +Location : db/migration/V1__db_adaptive_trainings_schema.sql (/home/dominik/Desktop/Workspace/BACKEND/kypo-adaptive-training/target/classes/db/migration/V1__db_adaptive_trainings_schema.sql) +Line : 98 +Statement : create table task ( + task_id bigserial not null, + title varchar(255) not null, + content text not null, + answer varchar(255) not null, + solution varchar(1048) not null, + incorrect_answer_limit int4, + modify_sandbox boolean not null, + sandbox_change_expected_duration int8 not null, + order_in_training_phase int4 not null, + phase_id bigserial not null, + primary key (task_id), + foreign key (phase_id) references training_phase +) + +2021-02-12 15:42:58.405 INFO 17296 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated... +2021-02-12 15:42:58.407 INFO 17296 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed. +2021-02-12 15:42:58.408 INFO 17296 --- [main] o.apache.catalina.core.StandardService : Stopping service [Tomcat] +2021-02-12 15:42:58.420 INFO 17296 --- [main] ConditionEvaluationReportLoggingListener : + +Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. +2021-02-12 15:42:58.427 ERROR 17296 --- [main] 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]: Invocation of init method failed; nested exception is org.flywaydb.core.internal.command.DbMigrate$FlywayMigrateException: +Migration V1__db_adaptive_trainings_schema.sql failed +----------------------------------------------------- +SQL State : 90017 +Error Code : 90017 +Message : Attempt to define a second primary key; SQL statement: +create table task ( + task_id bigserial not null, + title varchar(255) not null, + content text not null, + answer varchar(255) not null, + solution varchar(1048) not null, + incorrect_answer_limit int4, + modify_sandbox boolean not null, + sandbox_change_expected_duration int8 not null, + order_in_training_phase int4 not null, + phase_id bigserial not null, + primary key (task_id), + foreign key (phase_id) references training_phase +) [90017-200] +Location : db/migration/V1__db_adaptive_trainings_schema.sql (/home/dominik/Desktop/Workspace/BACKEND/kypo-adaptive-training/target/classes/db/migration/V1__db_adaptive_trainings_schema.sql) +Line : 98 +Statement : create table task ( + task_id bigserial not null, + title varchar(255) not null, + content text not null, + answer varchar(255) not null, + solution varchar(1048) not null, + incorrect_answer_limit int4, + modify_sandbox boolean not null, + sandbox_change_expected_duration int8 not null, + order_in_training_phase int4 not null, + phase_id bigserial not null, + primary key (task_id), + foreign key (phase_id) references training_phase +) + + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1796) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:595) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:310) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1108) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:868) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at cz.muni.ics.kypo.training.adaptive.DemoApplication.main(DemoApplication.java:13) ~[classes/:na] +Caused by: org.flywaydb.core.internal.command.DbMigrate$FlywayMigrateException: +Migration V1__db_adaptive_trainings_schema.sql failed +----------------------------------------------------- +SQL State : 90017 +Error Code : 90017 +Message : Attempt to define a second primary key; SQL statement: +create table task ( + task_id bigserial not null, + title varchar(255) not null, + content text not null, + answer varchar(255) not null, + solution varchar(1048) not null, + incorrect_answer_limit int4, + modify_sandbox boolean not null, + sandbox_change_expected_duration int8 not null, + order_in_training_phase int4 not null, + phase_id bigserial not null, + primary key (task_id), + foreign key (phase_id) references training_phase +) [90017-200] +Location : db/migration/V1__db_adaptive_trainings_schema.sql (/home/dominik/Desktop/Workspace/BACKEND/kypo-adaptive-training/target/classes/db/migration/V1__db_adaptive_trainings_schema.sql) +Line : 98 +Statement : create table task ( + task_id bigserial not null, + title varchar(255) not null, + content text not null, + answer varchar(255) not null, + solution varchar(1048) not null, + incorrect_answer_limit int4, + modify_sandbox boolean not null, + sandbox_change_expected_duration int8 not null, + order_in_training_phase int4 not null, + phase_id bigserial not null, + primary key (task_id), + foreign key (phase_id) references training_phase +) + + at org.flywaydb.core.internal.command.DbMigrate.doMigrateGroup(DbMigrate.java:369) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate.access$200(DbMigrate.java:54) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate$3.call(DbMigrate.java:282) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.jdbc.TransactionTemplate.execute(TransactionTemplate.java:74) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate.applyMigrations(DbMigrate.java:279) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate.migrateGroup(DbMigrate.java:244) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate.access$100(DbMigrate.java:54) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate$2.call(DbMigrate.java:162) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate$2.call(DbMigrate.java:159) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.database.base.Connection$1.call(Connection.java:131) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.jdbc.TransactionTemplate.execute(TransactionTemplate.java:74) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.database.base.Connection.lock(Connection.java:127) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory.lock(JdbcTableSchemaHistory.java:139) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate.migrateAll(DbMigrate.java:159) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate.migrate(DbMigrate.java:137) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.Flyway$1.execute(Flyway.java:189) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.Flyway$1.execute(Flyway.java:149) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.Flyway.execute(Flyway.java:511) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.Flyway.migrate(Flyway.java:149) ~[flyway-core-6.0.8.jar:na] + at org.springframework.boot.autoconfigure.flyway.FlywayMigrationInitializer.afterPropertiesSet(FlywayMigrationInitializer.java:65) ~[spring-boot-autoconfigure-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1855) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1792) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + ... 18 common frames omitted +Caused by: org.flywaydb.core.internal.sqlscript.FlywaySqlScriptException: +Migration V1__db_adaptive_trainings_schema.sql failed +----------------------------------------------------- +SQL State : 90017 +Error Code : 90017 +Message : Attempt to define a second primary key; SQL statement: +create table task ( + task_id bigserial not null, + title varchar(255) not null, + content text not null, + answer varchar(255) not null, + solution varchar(1048) not null, + incorrect_answer_limit int4, + modify_sandbox boolean not null, + sandbox_change_expected_duration int8 not null, + order_in_training_phase int4 not null, + phase_id bigserial not null, + primary key (task_id), + foreign key (phase_id) references training_phase +) [90017-200] +Location : db/migration/V1__db_adaptive_trainings_schema.sql (/home/dominik/Desktop/Workspace/BACKEND/kypo-adaptive-training/target/classes/db/migration/V1__db_adaptive_trainings_schema.sql) +Line : 98 +Statement : create table task ( + task_id bigserial not null, + title varchar(255) not null, + content text not null, + answer varchar(255) not null, + solution varchar(1048) not null, + incorrect_answer_limit int4, + modify_sandbox boolean not null, + sandbox_change_expected_duration int8 not null, + order_in_training_phase int4 not null, + phase_id bigserial not null, + primary key (task_id), + foreign key (phase_id) references training_phase +) + + at org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor.handleException(DefaultSqlScriptExecutor.java:274) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor.executeStatement(DefaultSqlScriptExecutor.java:220) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor.execute(DefaultSqlScriptExecutor.java:127) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.resolver.sql.SqlMigrationExecutor.execute(SqlMigrationExecutor.java:70) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate.doMigrateGroup(DbMigrate.java:366) ~[flyway-core-6.0.8.jar:na] + ... 39 common frames omitted +Caused by: org.h2.jdbc.JdbcSQLSyntaxErrorException: Attempt to define a second primary key; SQL statement: +create table task ( + task_id bigserial not null, + title varchar(255) not null, + content text not null, + answer varchar(255) not null, + solution varchar(1048) not null, + incorrect_answer_limit int4, + modify_sandbox boolean not null, + sandbox_change_expected_duration int8 not null, + order_in_training_phase int4 not null, + phase_id bigserial not null, + primary key (task_id), + foreign key (phase_id) references training_phase +) [90017-200] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:576) ~[h2-1.4.200.jar:1.4.200] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:429) ~[h2-1.4.200.jar:1.4.200] + at org.h2.message.DbException.get(DbException.java:205) ~[h2-1.4.200.jar:1.4.200] + at org.h2.message.DbException.get(DbException.java:181) ~[h2-1.4.200.jar:1.4.200] + at org.h2.message.DbException.get(DbException.java:170) ~[h2-1.4.200.jar:1.4.200] + at org.h2.command.ddl.CommandWithColumns.setPrimaryKey(CommandWithColumns.java:148) ~[h2-1.4.200.jar:1.4.200] + at org.h2.command.ddl.CommandWithColumns.addConstraintCommand(CommandWithColumns.java:49) ~[h2-1.4.200.jar:1.4.200] + at org.h2.command.Parser.parseTableColumnDefinition(Parser.java:8452) ~[h2-1.4.200.jar:1.4.200] + at org.h2.command.Parser.parseCreateTable(Parser.java:8379) ~[h2-1.4.200.jar:1.4.200] + at org.h2.command.Parser.parseCreate(Parser.java:6276) ~[h2-1.4.200.jar:1.4.200] + at org.h2.command.Parser.parsePrepared(Parser.java:903) ~[h2-1.4.200.jar:1.4.200] + at org.h2.command.Parser.parse(Parser.java:843) ~[h2-1.4.200.jar:1.4.200] + at org.h2.command.Parser.parse(Parser.java:815) ~[h2-1.4.200.jar:1.4.200] + at org.h2.command.Parser.prepareCommand(Parser.java:738) ~[h2-1.4.200.jar:1.4.200] + at org.h2.engine.Session.prepareLocal(Session.java:657) ~[h2-1.4.200.jar:1.4.200] + at org.h2.engine.Session.prepareCommand(Session.java:595) ~[h2-1.4.200.jar:1.4.200] + at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1235) ~[h2-1.4.200.jar:1.4.200] + at org.h2.jdbc.JdbcStatement.executeInternal(JdbcStatement.java:212) ~[h2-1.4.200.jar:1.4.200] + at org.h2.jdbc.JdbcStatement.execute(JdbcStatement.java:201) ~[h2-1.4.200.jar:1.4.200] + at com.zaxxer.hikari.pool.ProxyStatement.execute(ProxyStatement.java:95) ~[HikariCP-3.4.2.jar:na] + at com.zaxxer.hikari.pool.HikariProxyStatement.execute(HikariProxyStatement.java) ~[HikariCP-3.4.2.jar:na] + at org.flywaydb.core.internal.jdbc.JdbcTemplate.executeStatement(JdbcTemplate.java:244) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.sqlscript.ParsedSqlStatement.execute(ParsedSqlStatement.java:111) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor.executeStatement(DefaultSqlScriptExecutor.java:208) ~[flyway-core-6.0.8.jar:na] + ... 42 common frames omitted + +2021-02-12 15:43:11.521 INFO 17411 --- [main] c.m.i.k.t.adaptive.DemoApplication : No active profile set, falling back to default profiles: default +2021-02-12 15:43:12.168 INFO 17411 --- [main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode. +2021-02-12 15:43:12.213 INFO 17411 --- [main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 40ms. Found 7 JPA repository interfaces. +2021-02-12 15:43:12.343 INFO 17411 --- [main] o.s.cloud.context.scope.GenericScope : BeanFactory id=f0cd3bee-f190-387e-b69c-3ea724180170 +2021-02-12 15:43:12.437 INFO 17411 --- [main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2021-02-12 15:43:12.602 INFO 17411 --- [main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8082 (http) +2021-02-12 15:43:12.607 INFO 17411 --- [main] o.apache.catalina.core.StandardService : Starting service [Tomcat] +2021-02-12 15:43:12.607 INFO 17411 --- [main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.30] +2021-02-12 15:43:12.675 INFO 17411 --- [main] c.C.[.[.[/kypo-adaptive-training/api/v1] : Initializing Spring embedded WebApplicationContext +2021-02-12 15:43:12.675 INFO 17411 --- [main] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 1146 ms +2021-02-12 15:43:12.968 INFO 17411 --- [main] o.f.c.internal.license.VersionPrinter : Flyway Community Edition 6.0.8 by Redgate +2021-02-12 15:43:12.971 INFO 17411 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting... +2021-02-12 15:43:13.050 INFO 17411 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed. +2021-02-12 15:43:13.055 INFO 17411 --- [main] o.f.c.internal.database.DatabaseFactory : Database: jdbc:h2:mem:testdb (H2 1.4) +2021-02-12 15:43:13.071 WARN 17411 --- [main] o.f.c.internal.database.base.Database : Flyway upgrade recommended: H2 1.4.200 is newer than this version of Flyway and support has not been tested. The latest supported version of H2 is 1.4.199. +2021-02-12 15:43:13.091 INFO 17411 --- [main] o.f.core.internal.command.DbValidate : Successfully validated 2 migrations (execution time 00:00.013s) +2021-02-12 15:43:13.100 INFO 17411 --- [main] o.f.c.i.s.JdbcTableSchemaHistory : Creating Schema History table "PUBLIC"."flyway_schema_history" ... +2021-02-12 15:43:13.129 INFO 17411 --- [main] o.f.core.internal.command.DbMigrate : Current version of schema "PUBLIC": << Empty Schema >> +2021-02-12 15:43:13.137 INFO 17411 --- [main] o.f.core.internal.command.DbMigrate : Migrating schema "PUBLIC" to version 1 - db adaptive trainings schema +2021-02-12 15:43:13.165 ERROR 17411 --- [main] o.f.core.internal.command.DbMigrate : Migration of schema "PUBLIC" to version 1 - db adaptive trainings schema failed! Please restore backups and roll back database and code! +2021-02-12 15:43:13.171 WARN 17411 --- [main] 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]: Invocation of init method failed; nested exception is org.flywaydb.core.internal.command.DbMigrate$FlywayMigrateException: +Migration V1__db_adaptive_trainings_schema.sql failed +----------------------------------------------------- +SQL State : 90017 +Error Code : 90017 +Message : Attempt to define a second primary key; SQL statement: +create table question_phase_relation_question ( + question_phase_relation_id bigserial not null, + question_id bigserial not null, + primary key (question_phase_relation_id, question_id), + foreign key (question_phase_relation_id) references question_phase_relation, + foreign key (question_id) references question +) [90017-200] +Location : db/migration/V1__db_adaptive_trainings_schema.sql (/home/dominik/Desktop/Workspace/BACKEND/kypo-adaptive-training/target/classes/db/migration/V1__db_adaptive_trainings_schema.sql) +Line : 162 +Statement : create table question_phase_relation_question ( + question_phase_relation_id bigserial not null, + question_id bigserial not null, + primary key (question_phase_relation_id, question_id), + foreign key (question_phase_relation_id) references question_phase_relation, + foreign key (question_id) references question +) + +2021-02-12 15:43:13.171 INFO 17411 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated... +2021-02-12 15:43:13.175 INFO 17411 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed. +2021-02-12 15:43:13.177 INFO 17411 --- [main] o.apache.catalina.core.StandardService : Stopping service [Tomcat] +2021-02-12 15:43:13.190 INFO 17411 --- [main] ConditionEvaluationReportLoggingListener : + +Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. +2021-02-12 15:43:13.196 ERROR 17411 --- [main] 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]: Invocation of init method failed; nested exception is org.flywaydb.core.internal.command.DbMigrate$FlywayMigrateException: +Migration V1__db_adaptive_trainings_schema.sql failed +----------------------------------------------------- +SQL State : 90017 +Error Code : 90017 +Message : Attempt to define a second primary key; SQL statement: +create table question_phase_relation_question ( + question_phase_relation_id bigserial not null, + question_id bigserial not null, + primary key (question_phase_relation_id, question_id), + foreign key (question_phase_relation_id) references question_phase_relation, + foreign key (question_id) references question +) [90017-200] +Location : db/migration/V1__db_adaptive_trainings_schema.sql (/home/dominik/Desktop/Workspace/BACKEND/kypo-adaptive-training/target/classes/db/migration/V1__db_adaptive_trainings_schema.sql) +Line : 162 +Statement : create table question_phase_relation_question ( + question_phase_relation_id bigserial not null, + question_id bigserial not null, + primary key (question_phase_relation_id, question_id), + foreign key (question_phase_relation_id) references question_phase_relation, + foreign key (question_id) references question +) + + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1796) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:595) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:310) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1108) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:868) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at cz.muni.ics.kypo.training.adaptive.DemoApplication.main(DemoApplication.java:13) ~[classes/:na] +Caused by: org.flywaydb.core.internal.command.DbMigrate$FlywayMigrateException: +Migration V1__db_adaptive_trainings_schema.sql failed +----------------------------------------------------- +SQL State : 90017 +Error Code : 90017 +Message : Attempt to define a second primary key; SQL statement: +create table question_phase_relation_question ( + question_phase_relation_id bigserial not null, + question_id bigserial not null, + primary key (question_phase_relation_id, question_id), + foreign key (question_phase_relation_id) references question_phase_relation, + foreign key (question_id) references question +) [90017-200] +Location : db/migration/V1__db_adaptive_trainings_schema.sql (/home/dominik/Desktop/Workspace/BACKEND/kypo-adaptive-training/target/classes/db/migration/V1__db_adaptive_trainings_schema.sql) +Line : 162 +Statement : create table question_phase_relation_question ( + question_phase_relation_id bigserial not null, + question_id bigserial not null, + primary key (question_phase_relation_id, question_id), + foreign key (question_phase_relation_id) references question_phase_relation, + foreign key (question_id) references question +) + + at org.flywaydb.core.internal.command.DbMigrate.doMigrateGroup(DbMigrate.java:369) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate.access$200(DbMigrate.java:54) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate$3.call(DbMigrate.java:282) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.jdbc.TransactionTemplate.execute(TransactionTemplate.java:74) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate.applyMigrations(DbMigrate.java:279) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate.migrateGroup(DbMigrate.java:244) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate.access$100(DbMigrate.java:54) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate$2.call(DbMigrate.java:162) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate$2.call(DbMigrate.java:159) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.database.base.Connection$1.call(Connection.java:131) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.jdbc.TransactionTemplate.execute(TransactionTemplate.java:74) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.database.base.Connection.lock(Connection.java:127) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory.lock(JdbcTableSchemaHistory.java:139) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate.migrateAll(DbMigrate.java:159) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate.migrate(DbMigrate.java:137) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.Flyway$1.execute(Flyway.java:189) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.Flyway$1.execute(Flyway.java:149) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.Flyway.execute(Flyway.java:511) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.Flyway.migrate(Flyway.java:149) ~[flyway-core-6.0.8.jar:na] + at org.springframework.boot.autoconfigure.flyway.FlywayMigrationInitializer.afterPropertiesSet(FlywayMigrationInitializer.java:65) ~[spring-boot-autoconfigure-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1855) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1792) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + ... 18 common frames omitted +Caused by: org.flywaydb.core.internal.sqlscript.FlywaySqlScriptException: +Migration V1__db_adaptive_trainings_schema.sql failed +----------------------------------------------------- +SQL State : 90017 +Error Code : 90017 +Message : Attempt to define a second primary key; SQL statement: +create table question_phase_relation_question ( + question_phase_relation_id bigserial not null, + question_id bigserial not null, + primary key (question_phase_relation_id, question_id), + foreign key (question_phase_relation_id) references question_phase_relation, + foreign key (question_id) references question +) [90017-200] +Location : db/migration/V1__db_adaptive_trainings_schema.sql (/home/dominik/Desktop/Workspace/BACKEND/kypo-adaptive-training/target/classes/db/migration/V1__db_adaptive_trainings_schema.sql) +Line : 162 +Statement : create table question_phase_relation_question ( + question_phase_relation_id bigserial not null, + question_id bigserial not null, + primary key (question_phase_relation_id, question_id), + foreign key (question_phase_relation_id) references question_phase_relation, + foreign key (question_id) references question +) + + at org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor.handleException(DefaultSqlScriptExecutor.java:274) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor.executeStatement(DefaultSqlScriptExecutor.java:220) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor.execute(DefaultSqlScriptExecutor.java:127) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.resolver.sql.SqlMigrationExecutor.execute(SqlMigrationExecutor.java:70) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate.doMigrateGroup(DbMigrate.java:366) ~[flyway-core-6.0.8.jar:na] + ... 39 common frames omitted +Caused by: org.h2.jdbc.JdbcSQLSyntaxErrorException: Attempt to define a second primary key; SQL statement: +create table question_phase_relation_question ( + question_phase_relation_id bigserial not null, + question_id bigserial not null, + primary key (question_phase_relation_id, question_id), + foreign key (question_phase_relation_id) references question_phase_relation, + foreign key (question_id) references question +) [90017-200] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:576) ~[h2-1.4.200.jar:1.4.200] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:429) ~[h2-1.4.200.jar:1.4.200] + at org.h2.message.DbException.get(DbException.java:205) ~[h2-1.4.200.jar:1.4.200] + at org.h2.message.DbException.get(DbException.java:181) ~[h2-1.4.200.jar:1.4.200] + at org.h2.message.DbException.get(DbException.java:170) ~[h2-1.4.200.jar:1.4.200] + at org.h2.command.ddl.CommandWithColumns.setPrimaryKey(CommandWithColumns.java:148) ~[h2-1.4.200.jar:1.4.200] + at org.h2.command.ddl.CommandWithColumns.addConstraintCommand(CommandWithColumns.java:49) ~[h2-1.4.200.jar:1.4.200] + at org.h2.command.Parser.parseTableColumnDefinition(Parser.java:8452) ~[h2-1.4.200.jar:1.4.200] + at org.h2.command.Parser.parseCreateTable(Parser.java:8379) ~[h2-1.4.200.jar:1.4.200] + at org.h2.command.Parser.parseCreate(Parser.java:6276) ~[h2-1.4.200.jar:1.4.200] + at org.h2.command.Parser.parsePrepared(Parser.java:903) ~[h2-1.4.200.jar:1.4.200] + at org.h2.command.Parser.parse(Parser.java:843) ~[h2-1.4.200.jar:1.4.200] + at org.h2.command.Parser.parse(Parser.java:815) ~[h2-1.4.200.jar:1.4.200] + at org.h2.command.Parser.prepareCommand(Parser.java:738) ~[h2-1.4.200.jar:1.4.200] + at org.h2.engine.Session.prepareLocal(Session.java:657) ~[h2-1.4.200.jar:1.4.200] + at org.h2.engine.Session.prepareCommand(Session.java:595) ~[h2-1.4.200.jar:1.4.200] + at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1235) ~[h2-1.4.200.jar:1.4.200] + at org.h2.jdbc.JdbcStatement.executeInternal(JdbcStatement.java:212) ~[h2-1.4.200.jar:1.4.200] + at org.h2.jdbc.JdbcStatement.execute(JdbcStatement.java:201) ~[h2-1.4.200.jar:1.4.200] + at com.zaxxer.hikari.pool.ProxyStatement.execute(ProxyStatement.java:95) ~[HikariCP-3.4.2.jar:na] + at com.zaxxer.hikari.pool.HikariProxyStatement.execute(HikariProxyStatement.java) ~[HikariCP-3.4.2.jar:na] + at org.flywaydb.core.internal.jdbc.JdbcTemplate.executeStatement(JdbcTemplate.java:244) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.sqlscript.ParsedSqlStatement.execute(ParsedSqlStatement.java:111) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor.executeStatement(DefaultSqlScriptExecutor.java:208) ~[flyway-core-6.0.8.jar:na] + ... 42 common frames omitted + +2021-02-12 15:43:34.587 INFO 17554 --- [main] c.m.i.k.t.adaptive.DemoApplication : No active profile set, falling back to default profiles: default +2021-02-12 15:43:35.310 INFO 17554 --- [main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode. +2021-02-12 15:43:35.361 INFO 17554 --- [main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 47ms. Found 7 JPA repository interfaces. +2021-02-12 15:43:35.505 INFO 17554 --- [main] o.s.cloud.context.scope.GenericScope : BeanFactory id=f0cd3bee-f190-387e-b69c-3ea724180170 +2021-02-12 15:43:35.597 INFO 17554 --- [main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2021-02-12 15:43:35.766 INFO 17554 --- [main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8082 (http) +2021-02-12 15:43:35.771 INFO 17554 --- [main] o.apache.catalina.core.StandardService : Starting service [Tomcat] +2021-02-12 15:43:35.771 INFO 17554 --- [main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.30] +2021-02-12 15:43:35.857 INFO 17554 --- [main] c.C.[.[.[/kypo-adaptive-training/api/v1] : Initializing Spring embedded WebApplicationContext +2021-02-12 15:43:35.857 INFO 17554 --- [main] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 1258 ms +2021-02-12 15:43:36.121 INFO 17554 --- [main] o.f.c.internal.license.VersionPrinter : Flyway Community Edition 6.0.8 by Redgate +2021-02-12 15:43:36.124 INFO 17554 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting... +2021-02-12 15:43:36.202 INFO 17554 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed. +2021-02-12 15:43:36.208 INFO 17554 --- [main] o.f.c.internal.database.DatabaseFactory : Database: jdbc:h2:mem:testdb (H2 1.4) +2021-02-12 15:43:36.223 WARN 17554 --- [main] o.f.c.internal.database.base.Database : Flyway upgrade recommended: H2 1.4.200 is newer than this version of Flyway and support has not been tested. The latest supported version of H2 is 1.4.199. +2021-02-12 15:43:36.242 INFO 17554 --- [main] o.f.core.internal.command.DbValidate : Successfully validated 2 migrations (execution time 00:00.013s) +2021-02-12 15:43:36.250 INFO 17554 --- [main] o.f.c.i.s.JdbcTableSchemaHistory : Creating Schema History table "PUBLIC"."flyway_schema_history" ... +2021-02-12 15:43:36.278 INFO 17554 --- [main] o.f.core.internal.command.DbMigrate : Current version of schema "PUBLIC": << Empty Schema >> +2021-02-12 15:43:36.286 INFO 17554 --- [main] o.f.core.internal.command.DbMigrate : Migrating schema "PUBLIC" to version 1 - db adaptive trainings schema +2021-02-12 15:43:36.323 INFO 17554 --- [main] o.f.core.internal.command.DbMigrate : Migrating schema "PUBLIC" to version 2 - db adaptive trainings indexes +2021-02-12 15:43:36.331 INFO 17554 --- [main] o.f.core.internal.command.DbMigrate : Successfully applied 2 migrations to schema "PUBLIC" (execution time 00:00.058s) +2021-02-12 15:43:36.381 INFO 17554 --- [main] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [name: default] +2021-02-12 15:43:36.414 INFO 17554 --- [main] org.hibernate.Version : HHH000412: Hibernate Core {5.4.10.Final} +2021-02-12 15:43:36.467 INFO 17554 --- [main] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {5.1.0.Final} +2021-02-12 15:43:36.517 INFO 17554 --- [main] org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.H2Dialect +2021-02-12 15:43:37.028 INFO 17554 --- [main] o.h.e.t.j.p.i.JtaPlatformInitiator : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform] +2021-02-12 15:43:37.092 INFO 17554 --- [main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default' +2021-02-12 15:43:37.517 WARN 17554 --- [main] JpaBaseConfiguration$JpaWebConfiguration : spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning +2021-02-12 15:43:37.603 INFO 17554 --- [main] o.s.b.a.e.web.EndpointLinksResolver : Exposing 2 endpoint(s) beneath base path '/actuator' +2021-02-12 15:43:37.650 INFO 17554 --- [main] pertySourcedRequestMappingHandlerMapping : Mapped URL path [/v2/api-docs] onto method [springfox.documentation.swagger2.web.Swagger2Controller#getDocumentation(String, HttpServletRequest)] +2021-02-12 15:43:37.826 INFO 17554 --- [main] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'applicationTaskExecutor' +2021-02-12 15:43:37.992 INFO 17554 --- [main] .s.s.UserDetailsServiceAutoConfiguration : + +Using generated security password: 477c236a-861f-4c5f-a129-e79778fed261 + +2021-02-12 15:43:38.035 INFO 17554 --- [main] o.s.s.web.DefaultSecurityFilterChain : Creating filter chain: any request, [org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@4f290f46, org.springframework.security.web.context.SecurityContextPersistenceFilter@6e87556f, org.springframework.security.web.header.HeaderWriterFilter@6fa98e98, org.springframework.security.web.csrf.CsrfFilter@2420e962, org.springframework.security.web.authentication.logout.LogoutFilter@512319dc, org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter@7c9d2ed7, org.springframework.security.web.authentication.ui.DefaultLoginPageGeneratingFilter@1d2b49b2, org.springframework.security.web.authentication.ui.DefaultLogoutPageGeneratingFilter@2bfe398b, org.springframework.security.web.authentication.www.BasicAuthenticationFilter@620ba2b0, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@38f1f6c9, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@27a717a7, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@4a23be9, org.springframework.security.web.session.SessionManagementFilter@42000298, org.springframework.security.web.access.ExceptionTranslationFilter@5f9cb96f, org.springframework.security.web.access.intercept.FilterSecurityInterceptor@4086e003] +2021-02-12 15:43:38.130 WARN 17554 --- [main] s.o.SpringCloudSecurityAutoConfiguration : All Spring Cloud Security modules and starters are deprecated. They will be moved to individual projects in the next major release. +2021-02-12 15:43:38.172 INFO 17554 --- [main] d.s.w.p.DocumentationPluginsBootstrapper : Context refreshed +2021-02-12 15:43:38.182 INFO 17554 --- [main] d.s.w.p.DocumentationPluginsBootstrapper : Found 1 custom documentation plugin(s) +2021-02-12 15:43:38.205 INFO 17554 --- [main] s.d.s.w.s.ApiListingReferenceScanner : Scanning for api listing references +2021-02-12 15:43:38.279 INFO 17554 --- [main] .d.s.w.r.o.CachingOperationNameGenerator : Generating unique operation named: handleUsingGET_1 +2021-02-12 15:43:38.281 INFO 17554 --- [main] .d.s.w.r.o.CachingOperationNameGenerator : Generating unique operation named: handleUsingGET_2 +2021-02-12 15:43:38.302 INFO 17554 --- [main] .d.s.w.r.o.CachingOperationNameGenerator : Generating unique operation named: getPhase_1 +2021-02-12 15:43:38.374 INFO 17554 --- [main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8082 (http) with context path '/kypo-adaptive-training/api/v1' +2021-02-12 15:43:38.594 INFO 17554 --- [main] c.m.i.k.t.adaptive.DemoApplication : Started DemoApplication in 4.55 seconds (JVM running for 4.99) +2021-02-12 15:43:38.798 DEBUG 17554 --- [main] c.m.i.k.commons.startup.StartUpRunner : Microservice with roles has been registered. +2021-02-12 15:43:38.924 INFO 17554 --- [RMI TCP Connection(3)-127.0.0.1] c.C.[.[.[/kypo-adaptive-training/api/v1] : Initializing Spring DispatcherServlet 'dispatcherServlet' +2021-02-12 15:43:38.925 INFO 17554 --- [RMI TCP Connection(3)-127.0.0.1] o.s.web.servlet.DispatcherServlet : Initializing Servlet 'dispatcherServlet' +2021-02-12 15:43:38.933 INFO 17554 --- [RMI TCP Connection(3)-127.0.0.1] o.s.web.servlet.DispatcherServlet : Completed initialization in 8 ms +2021-02-12 15:45:06.222 INFO 17554 --- [SpringContextShutdownHook] o.s.s.concurrent.ThreadPoolTaskExecutor : Shutting down ExecutorService 'applicationTaskExecutor' +2021-02-12 15:45:06.234 INFO 17554 --- [SpringContextShutdownHook] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default' +2021-02-12 15:45:06.239 INFO 17554 --- [SpringContextShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated... +2021-02-12 15:45:06.244 INFO 17554 --- [SpringContextShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed. +2021-02-12 15:45:08.681 INFO 17860 --- [main] c.m.i.k.t.adaptive.DemoApplication : No active profile set, falling back to default profiles: default +2021-02-12 15:45:09.379 INFO 17860 --- [main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode. +2021-02-12 15:45:09.426 INFO 17860 --- [main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 42ms. Found 7 JPA repository interfaces. +2021-02-12 15:45:09.570 INFO 17860 --- [main] o.s.cloud.context.scope.GenericScope : BeanFactory id=f0cd3bee-f190-387e-b69c-3ea724180170 +2021-02-12 15:45:09.687 INFO 17860 --- [main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2021-02-12 15:45:09.839 INFO 17860 --- [main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8082 (http) +2021-02-12 15:45:09.843 INFO 17860 --- [main] o.apache.catalina.core.StandardService : Starting service [Tomcat] +2021-02-12 15:45:09.844 INFO 17860 --- [main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.30] +2021-02-12 15:45:09.909 INFO 17860 --- [main] c.C.[.[.[/kypo-adaptive-training/api/v1] : Initializing Spring embedded WebApplicationContext +2021-02-12 15:45:09.909 INFO 17860 --- [main] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 1214 ms +2021-02-12 15:45:10.012 ERROR 17860 --- [main] o.s.b.web.embedded.tomcat.TomcatStarter : Error starting Tomcat context. Exception: org.springframework.beans.factory.BeanCreationException. Message: Error creating bean with name 'servletEndpointRegistrar' defined in class path resource [org/springframework/boot/actuate/autoconfigure/endpoint/web/ServletEndpointManagementContextConfiguration$WebMvcServletEndpointManagementContextConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.endpoint.web.ServletEndpointRegistrar]: Factory method 'servletEndpointRegistrar' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'healthEndpoint' defined in class path resource [org/springframework/boot/actuate/autoconfigure/health/HealthEndpointConfiguration.class]: Unsatisfied dependency expressed through method 'healthEndpoint' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'healthContributorRegistry' defined in class path resource [org/springframework/boot/actuate/autoconfigure/health/HealthEndpointConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.health.HealthContributorRegistry]: Factory method 'healthContributorRegistry' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.actuate.autoconfigure.jdbc.DataSourceHealthContributorAutoConfiguration': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is java.lang.IllegalStateException: Cannot load driver class: org.postgresql.Driver +2021-02-12 15:45:10.021 INFO 17860 --- [main] o.apache.catalina.core.StandardService : Stopping service [Tomcat] +2021-02-12 15:45:10.025 WARN 17860 --- [main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat +2021-02-12 15:45:10.036 INFO 17860 --- [main] ConditionEvaluationReportLoggingListener : + +Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. +2021-02-12 15:45:10.042 ERROR 17860 --- [main] o.s.boot.SpringApplication : Application run failed + +org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat + at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:156) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:544) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at cz.muni.ics.kypo.training.adaptive.DemoApplication.main(DemoApplication.java:13) ~[classes/:na] +Caused by: org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat + at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.initialize(TomcatWebServer.java:126) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.<init>(TomcatWebServer.java:88) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getTomcatWebServer(TomcatServletWebServerFactory.java:438) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getWebServer(TomcatServletWebServerFactory.java:191) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer(ServletWebServerApplicationContext.java:180) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:153) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + ... 8 common frames omitted +Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'servletEndpointRegistrar' defined in class path resource [org/springframework/boot/actuate/autoconfigure/endpoint/web/ServletEndpointManagementContextConfiguration$WebMvcServletEndpointManagementContextConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.endpoint.web.ServletEndpointRegistrar]: Factory method 'servletEndpointRegistrar' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'healthEndpoint' defined in class path resource [org/springframework/boot/actuate/autoconfigure/health/HealthEndpointConfiguration.class]: Unsatisfied dependency expressed through method 'healthEndpoint' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'healthContributorRegistry' defined in class path resource [org/springframework/boot/actuate/autoconfigure/health/HealthEndpointConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.health.HealthContributorRegistry]: Factory method 'healthContributorRegistry' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.actuate.autoconfigure.jdbc.DataSourceHealthContributorAutoConfiguration': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is java.lang.IllegalStateException: Cannot load driver class: org.postgresql.Driver + at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:656) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:636) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1338) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1177) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:557) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:207) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.boot.web.servlet.ServletContextInitializerBeans.getOrderedBeansOfType(ServletContextInitializerBeans.java:211) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.web.servlet.ServletContextInitializerBeans.getOrderedBeansOfType(ServletContextInitializerBeans.java:202) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.web.servlet.ServletContextInitializerBeans.addServletContextInitializerBeans(ServletContextInitializerBeans.java:96) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.web.servlet.ServletContextInitializerBeans.<init>(ServletContextInitializerBeans.java:85) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.getServletContextInitializerBeans(ServletWebServerApplicationContext.java:253) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.selfInitialize(ServletWebServerApplicationContext.java:227) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.web.embedded.tomcat.TomcatStarter.onStartup(TomcatStarter.java:53) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5135) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[na:na] + at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140) ~[na:na] + at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:841) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[na:na] + at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140) ~[na:na] + at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at org.apache.catalina.core.StandardService.startInternal(StandardService.java:421) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:930) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at org.apache.catalina.startup.Tomcat.start(Tomcat.java:459) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.initialize(TomcatWebServer.java:107) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + ... 13 common frames omitted +Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.endpoint.web.ServletEndpointRegistrar]: Factory method 'servletEndpointRegistrar' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'healthEndpoint' defined in class path resource [org/springframework/boot/actuate/autoconfigure/health/HealthEndpointConfiguration.class]: Unsatisfied dependency expressed through method 'healthEndpoint' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'healthContributorRegistry' defined in class path resource [org/springframework/boot/actuate/autoconfigure/health/HealthEndpointConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.health.HealthContributorRegistry]: Factory method 'healthContributorRegistry' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.actuate.autoconfigure.jdbc.DataSourceHealthContributorAutoConfiguration': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is java.lang.IllegalStateException: Cannot load driver class: org.postgresql.Driver + at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:651) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + ... 53 common frames omitted +Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'healthEndpoint' defined in class path resource [org/springframework/boot/actuate/autoconfigure/health/HealthEndpointConfiguration.class]: Unsatisfied dependency expressed through method 'healthEndpoint' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'healthContributorRegistry' defined in class path resource [org/springframework/boot/actuate/autoconfigure/health/HealthEndpointConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.health.HealthContributorRegistry]: Factory method 'healthContributorRegistry' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.actuate.autoconfigure.jdbc.DataSourceHealthContributorAutoConfiguration': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is java.lang.IllegalStateException: Cannot load driver class: org.postgresql.Driver + at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:798) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:539) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1338) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1177) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:557) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1108) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.boot.actuate.endpoint.annotation.EndpointDiscoverer.createEndpointBean(EndpointDiscoverer.java:143) ~[spring-boot-actuator-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.actuate.endpoint.annotation.EndpointDiscoverer.createEndpointBeans(EndpointDiscoverer.java:133) ~[spring-boot-actuator-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.actuate.endpoint.annotation.EndpointDiscoverer.discoverEndpoints(EndpointDiscoverer.java:122) ~[spring-boot-actuator-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.actuate.endpoint.annotation.EndpointDiscoverer.getEndpoints(EndpointDiscoverer.java:116) ~[spring-boot-actuator-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.actuate.autoconfigure.endpoint.web.ServletEndpointManagementContextConfiguration$WebMvcServletEndpointManagementContextConfiguration.servletEndpointRegistrar(ServletEndpointManagementContextConfiguration.java:65) ~[spring-boot-actuator-autoconfigure-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na] + at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[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:566) ~[na:na] + at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + ... 54 common frames omitted +Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'healthContributorRegistry' defined in class path resource [org/springframework/boot/actuate/autoconfigure/health/HealthEndpointConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.health.HealthContributorRegistry]: Factory method 'healthContributorRegistry' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.actuate.autoconfigure.jdbc.DataSourceHealthContributorAutoConfiguration': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is java.lang.IllegalStateException: Cannot load driver class: org.postgresql.Driver + at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:656) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:636) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1338) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1177) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:557) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1287) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1207) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:885) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:789) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + ... 74 common frames omitted +Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.health.HealthContributorRegistry]: Factory method 'healthContributorRegistry' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.actuate.autoconfigure.jdbc.DataSourceHealthContributorAutoConfiguration': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is java.lang.IllegalStateException: Cannot load driver class: org.postgresql.Driver + at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:651) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + ... 88 common frames omitted +Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.actuate.autoconfigure.jdbc.DataSourceHealthContributorAutoConfiguration': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is java.lang.IllegalStateException: Cannot load driver class: org.postgresql.Driver + at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:798) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:228) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1358) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1204) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:557) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:409) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1338) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1177) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:557) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:617) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:605) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:1242) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.boot.actuate.autoconfigure.health.HealthEndpointConfiguration.healthContributorRegistry(HealthEndpointConfiguration.java:78) ~[spring-boot-actuator-autoconfigure-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na] + at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[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:566) ~[na:na] + at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + ... 89 common frames omitted +Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is java.lang.IllegalStateException: Cannot load driver class: org.postgresql.Driver + at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:656) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:636) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1338) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1177) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:557) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.DefaultListableBeanFactory.addCandidateEntry(DefaultListableBeanFactory.java:1503) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1467) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveMultipleBeans(DefaultListableBeanFactory.java:1386) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1245) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1207) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:885) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:789) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + ... 116 common frames omitted +Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is java.lang.IllegalStateException: Cannot load driver class: org.postgresql.Driver + at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:651) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + ... 133 common frames omitted +Caused by: java.lang.IllegalStateException: Cannot load driver class: org.postgresql.Driver + at org.springframework.util.Assert.state(Assert.java:94) ~[spring-core-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.boot.autoconfigure.jdbc.DataSourceProperties.determineDriverClassName(DataSourceProperties.java:222) ~[spring-boot-autoconfigure-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.autoconfigure.jdbc.DataSourceProperties.initializeDataSourceBuilder(DataSourceProperties.java:174) ~[spring-boot-autoconfigure-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.autoconfigure.jdbc.DataSourceConfiguration.createDataSource(DataSourceConfiguration.java:43) ~[spring-boot-autoconfigure-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.autoconfigure.jdbc.DataSourceConfiguration$Hikari.dataSource(DataSourceConfiguration.java:85) ~[spring-boot-autoconfigure-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na] + at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[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:566) ~[na:na] + at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + ... 134 common frames omitted + +2021-02-12 15:47:56.470 INFO 18351 --- [main] c.m.i.k.t.adaptive.DemoApplication : No active profile set, falling back to default profiles: default +2021-02-12 15:47:57.217 INFO 18351 --- [main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode. +2021-02-12 15:47:57.262 INFO 18351 --- [main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 40ms. Found 7 JPA repository interfaces. +2021-02-12 15:47:57.391 INFO 18351 --- [main] o.s.cloud.context.scope.GenericScope : BeanFactory id=f0cd3bee-f190-387e-b69c-3ea724180170 +2021-02-12 15:47:57.484 INFO 18351 --- [main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2021-02-12 15:47:57.643 INFO 18351 --- [main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8082 (http) +2021-02-12 15:47:57.648 INFO 18351 --- [main] o.apache.catalina.core.StandardService : Starting service [Tomcat] +2021-02-12 15:47:57.648 INFO 18351 --- [main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.30] +2021-02-12 15:47:57.720 INFO 18351 --- [main] c.C.[.[.[/kypo-adaptive-training/api/v1] : Initializing Spring embedded WebApplicationContext +2021-02-12 15:47:57.721 INFO 18351 --- [main] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 1232 ms +2021-02-12 15:47:57.824 ERROR 18351 --- [main] o.s.b.web.embedded.tomcat.TomcatStarter : Error starting Tomcat context. Exception: org.springframework.beans.factory.BeanCreationException. Message: Error creating bean with name 'servletEndpointRegistrar' defined in class path resource [org/springframework/boot/actuate/autoconfigure/endpoint/web/ServletEndpointManagementContextConfiguration$WebMvcServletEndpointManagementContextConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.endpoint.web.ServletEndpointRegistrar]: Factory method 'servletEndpointRegistrar' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'healthEndpoint' defined in class path resource [org/springframework/boot/actuate/autoconfigure/health/HealthEndpointConfiguration.class]: Unsatisfied dependency expressed through method 'healthEndpoint' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'healthContributorRegistry' defined in class path resource [org/springframework/boot/actuate/autoconfigure/health/HealthEndpointConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.health.HealthContributorRegistry]: Factory method 'healthContributorRegistry' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.actuate.autoconfigure.jdbc.DataSourceHealthContributorAutoConfiguration': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is java.lang.IllegalStateException: Cannot load driver class: org.postgresql.Driver +2021-02-12 15:47:57.833 INFO 18351 --- [main] o.apache.catalina.core.StandardService : Stopping service [Tomcat] +2021-02-12 15:47:57.838 WARN 18351 --- [main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat +2021-02-12 15:47:57.848 INFO 18351 --- [main] ConditionEvaluationReportLoggingListener : + +Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. +2021-02-12 15:47:57.855 ERROR 18351 --- [main] o.s.boot.SpringApplication : Application run failed + +org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat + at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:156) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:544) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at cz.muni.ics.kypo.training.adaptive.DemoApplication.main(DemoApplication.java:13) ~[classes/:na] +Caused by: org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat + at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.initialize(TomcatWebServer.java:126) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.<init>(TomcatWebServer.java:88) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getTomcatWebServer(TomcatServletWebServerFactory.java:438) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getWebServer(TomcatServletWebServerFactory.java:191) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer(ServletWebServerApplicationContext.java:180) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:153) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + ... 8 common frames omitted +Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'servletEndpointRegistrar' defined in class path resource [org/springframework/boot/actuate/autoconfigure/endpoint/web/ServletEndpointManagementContextConfiguration$WebMvcServletEndpointManagementContextConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.endpoint.web.ServletEndpointRegistrar]: Factory method 'servletEndpointRegistrar' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'healthEndpoint' defined in class path resource [org/springframework/boot/actuate/autoconfigure/health/HealthEndpointConfiguration.class]: Unsatisfied dependency expressed through method 'healthEndpoint' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'healthContributorRegistry' defined in class path resource [org/springframework/boot/actuate/autoconfigure/health/HealthEndpointConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.health.HealthContributorRegistry]: Factory method 'healthContributorRegistry' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.actuate.autoconfigure.jdbc.DataSourceHealthContributorAutoConfiguration': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is java.lang.IllegalStateException: Cannot load driver class: org.postgresql.Driver + at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:656) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:636) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1338) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1177) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:557) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:207) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.boot.web.servlet.ServletContextInitializerBeans.getOrderedBeansOfType(ServletContextInitializerBeans.java:211) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.web.servlet.ServletContextInitializerBeans.getOrderedBeansOfType(ServletContextInitializerBeans.java:202) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.web.servlet.ServletContextInitializerBeans.addServletContextInitializerBeans(ServletContextInitializerBeans.java:96) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.web.servlet.ServletContextInitializerBeans.<init>(ServletContextInitializerBeans.java:85) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.getServletContextInitializerBeans(ServletWebServerApplicationContext.java:253) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.selfInitialize(ServletWebServerApplicationContext.java:227) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.web.embedded.tomcat.TomcatStarter.onStartup(TomcatStarter.java:53) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5135) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[na:na] + at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140) ~[na:na] + at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:841) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[na:na] + at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140) ~[na:na] + at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at org.apache.catalina.core.StandardService.startInternal(StandardService.java:421) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:930) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at org.apache.catalina.startup.Tomcat.start(Tomcat.java:459) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.initialize(TomcatWebServer.java:107) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + ... 13 common frames omitted +Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.endpoint.web.ServletEndpointRegistrar]: Factory method 'servletEndpointRegistrar' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'healthEndpoint' defined in class path resource [org/springframework/boot/actuate/autoconfigure/health/HealthEndpointConfiguration.class]: Unsatisfied dependency expressed through method 'healthEndpoint' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'healthContributorRegistry' defined in class path resource [org/springframework/boot/actuate/autoconfigure/health/HealthEndpointConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.health.HealthContributorRegistry]: Factory method 'healthContributorRegistry' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.actuate.autoconfigure.jdbc.DataSourceHealthContributorAutoConfiguration': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is java.lang.IllegalStateException: Cannot load driver class: org.postgresql.Driver + at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:651) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + ... 53 common frames omitted +Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'healthEndpoint' defined in class path resource [org/springframework/boot/actuate/autoconfigure/health/HealthEndpointConfiguration.class]: Unsatisfied dependency expressed through method 'healthEndpoint' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'healthContributorRegistry' defined in class path resource [org/springframework/boot/actuate/autoconfigure/health/HealthEndpointConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.health.HealthContributorRegistry]: Factory method 'healthContributorRegistry' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.actuate.autoconfigure.jdbc.DataSourceHealthContributorAutoConfiguration': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is java.lang.IllegalStateException: Cannot load driver class: org.postgresql.Driver + at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:798) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:539) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1338) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1177) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:557) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1108) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.boot.actuate.endpoint.annotation.EndpointDiscoverer.createEndpointBean(EndpointDiscoverer.java:143) ~[spring-boot-actuator-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.actuate.endpoint.annotation.EndpointDiscoverer.createEndpointBeans(EndpointDiscoverer.java:133) ~[spring-boot-actuator-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.actuate.endpoint.annotation.EndpointDiscoverer.discoverEndpoints(EndpointDiscoverer.java:122) ~[spring-boot-actuator-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.actuate.endpoint.annotation.EndpointDiscoverer.getEndpoints(EndpointDiscoverer.java:116) ~[spring-boot-actuator-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.actuate.autoconfigure.endpoint.web.ServletEndpointManagementContextConfiguration$WebMvcServletEndpointManagementContextConfiguration.servletEndpointRegistrar(ServletEndpointManagementContextConfiguration.java:65) ~[spring-boot-actuator-autoconfigure-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na] + at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[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:566) ~[na:na] + at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + ... 54 common frames omitted +Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'healthContributorRegistry' defined in class path resource [org/springframework/boot/actuate/autoconfigure/health/HealthEndpointConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.health.HealthContributorRegistry]: Factory method 'healthContributorRegistry' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.actuate.autoconfigure.jdbc.DataSourceHealthContributorAutoConfiguration': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is java.lang.IllegalStateException: Cannot load driver class: org.postgresql.Driver + at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:656) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:636) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1338) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1177) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:557) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1287) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1207) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:885) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:789) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + ... 74 common frames omitted +Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.health.HealthContributorRegistry]: Factory method 'healthContributorRegistry' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.actuate.autoconfigure.jdbc.DataSourceHealthContributorAutoConfiguration': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is java.lang.IllegalStateException: Cannot load driver class: org.postgresql.Driver + at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:651) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + ... 88 common frames omitted +Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.actuate.autoconfigure.jdbc.DataSourceHealthContributorAutoConfiguration': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is java.lang.IllegalStateException: Cannot load driver class: org.postgresql.Driver + at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:798) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:228) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1358) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1204) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:557) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:409) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1338) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1177) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:557) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:617) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:605) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:1242) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.boot.actuate.autoconfigure.health.HealthEndpointConfiguration.healthContributorRegistry(HealthEndpointConfiguration.java:78) ~[spring-boot-actuator-autoconfigure-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na] + at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[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:566) ~[na:na] + at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + ... 89 common frames omitted +Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is java.lang.IllegalStateException: Cannot load driver class: org.postgresql.Driver + at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:656) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:636) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1338) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1177) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:557) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.DefaultListableBeanFactory.addCandidateEntry(DefaultListableBeanFactory.java:1503) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1467) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveMultipleBeans(DefaultListableBeanFactory.java:1386) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1245) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1207) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:885) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:789) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + ... 116 common frames omitted +Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is java.lang.IllegalStateException: Cannot load driver class: org.postgresql.Driver + at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:651) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + ... 133 common frames omitted +Caused by: java.lang.IllegalStateException: Cannot load driver class: org.postgresql.Driver + at org.springframework.util.Assert.state(Assert.java:94) ~[spring-core-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.boot.autoconfigure.jdbc.DataSourceProperties.determineDriverClassName(DataSourceProperties.java:222) ~[spring-boot-autoconfigure-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.autoconfigure.jdbc.DataSourceProperties.initializeDataSourceBuilder(DataSourceProperties.java:174) ~[spring-boot-autoconfigure-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.autoconfigure.jdbc.DataSourceConfiguration.createDataSource(DataSourceConfiguration.java:43) ~[spring-boot-autoconfigure-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.autoconfigure.jdbc.DataSourceConfiguration$Hikari.dataSource(DataSourceConfiguration.java:85) ~[spring-boot-autoconfigure-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na] + at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[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:566) ~[na:na] + at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + ... 134 common frames omitted + +2021-02-12 15:52:08.691 INFO 18855 --- [main] c.m.i.k.t.adaptive.DemoApplication : No active profile set, falling back to default profiles: default +2021-02-12 15:52:09.046 INFO 18855 --- [main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode. +2021-02-12 15:52:09.085 INFO 18855 --- [main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 34ms. Found 7 JPA repository interfaces. +2021-02-12 15:52:09.368 INFO 18855 --- [main] o.s.cloud.context.scope.GenericScope : BeanFactory id=82a04008-e7c8-30ba-96c8-d5a215c84edc +2021-02-12 15:52:09.458 INFO 18855 --- [main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2021-02-12 15:52:09.635 INFO 18855 --- [main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8082 (http) +2021-02-12 15:52:09.640 INFO 18855 --- [main] o.apache.catalina.core.StandardService : Starting service [Tomcat] +2021-02-12 15:52:09.640 INFO 18855 --- [main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.30] +2021-02-12 15:52:09.721 INFO 18855 --- [main] c.C.[.[.[/kypo-adaptive-training/api/v1] : Initializing Spring embedded WebApplicationContext +2021-02-12 15:52:09.721 INFO 18855 --- [main] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 1000 ms +2021-02-12 15:52:09.813 ERROR 18855 --- [main] o.s.b.web.embedded.tomcat.TomcatStarter : Error starting Tomcat context. Exception: org.springframework.beans.factory.BeanCreationException. Message: Error creating bean with name 'servletEndpointRegistrar' defined in class path resource [org/springframework/boot/actuate/autoconfigure/endpoint/web/ServletEndpointManagementContextConfiguration$WebMvcServletEndpointManagementContextConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.endpoint.web.ServletEndpointRegistrar]: Factory method 'servletEndpointRegistrar' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'healthEndpoint' defined in class path resource [org/springframework/boot/actuate/autoconfigure/health/HealthEndpointConfiguration.class]: Unsatisfied dependency expressed through method 'healthEndpoint' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'healthContributorRegistry' defined in class path resource [org/springframework/boot/actuate/autoconfigure/health/HealthEndpointConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.health.HealthContributorRegistry]: Factory method 'healthContributorRegistry' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.actuate.autoconfigure.jdbc.DataSourceHealthContributorAutoConfiguration': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is java.lang.IllegalStateException: Cannot load driver class: org.postgresql.Driver +2021-02-12 15:52:09.823 INFO 18855 --- [main] o.apache.catalina.core.StandardService : Stopping service [Tomcat] +2021-02-12 15:52:09.827 WARN 18855 --- [main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat +2021-02-12 15:52:09.838 INFO 18855 --- [main] ConditionEvaluationReportLoggingListener : + +Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. +2021-02-12 15:52:09.847 ERROR 18855 --- [main] o.s.boot.SpringApplication : Application run failed + +org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat + at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:156) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:544) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at cz.muni.ics.kypo.training.adaptive.DemoApplication.main(DemoApplication.java:19) ~[classes/:na] +Caused by: org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat + at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.initialize(TomcatWebServer.java:126) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.<init>(TomcatWebServer.java:88) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getTomcatWebServer(TomcatServletWebServerFactory.java:438) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getWebServer(TomcatServletWebServerFactory.java:191) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer(ServletWebServerApplicationContext.java:180) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:153) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + ... 8 common frames omitted +Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'servletEndpointRegistrar' defined in class path resource [org/springframework/boot/actuate/autoconfigure/endpoint/web/ServletEndpointManagementContextConfiguration$WebMvcServletEndpointManagementContextConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.endpoint.web.ServletEndpointRegistrar]: Factory method 'servletEndpointRegistrar' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'healthEndpoint' defined in class path resource [org/springframework/boot/actuate/autoconfigure/health/HealthEndpointConfiguration.class]: Unsatisfied dependency expressed through method 'healthEndpoint' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'healthContributorRegistry' defined in class path resource [org/springframework/boot/actuate/autoconfigure/health/HealthEndpointConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.health.HealthContributorRegistry]: Factory method 'healthContributorRegistry' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.actuate.autoconfigure.jdbc.DataSourceHealthContributorAutoConfiguration': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is java.lang.IllegalStateException: Cannot load driver class: org.postgresql.Driver + at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:656) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:636) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1338) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1177) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:557) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:207) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.boot.web.servlet.ServletContextInitializerBeans.getOrderedBeansOfType(ServletContextInitializerBeans.java:211) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.web.servlet.ServletContextInitializerBeans.getOrderedBeansOfType(ServletContextInitializerBeans.java:202) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.web.servlet.ServletContextInitializerBeans.addServletContextInitializerBeans(ServletContextInitializerBeans.java:96) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.web.servlet.ServletContextInitializerBeans.<init>(ServletContextInitializerBeans.java:85) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.getServletContextInitializerBeans(ServletWebServerApplicationContext.java:253) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.selfInitialize(ServletWebServerApplicationContext.java:227) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.web.embedded.tomcat.TomcatStarter.onStartup(TomcatStarter.java:53) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5135) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[na:na] + at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140) ~[na:na] + at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:841) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[na:na] + at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140) ~[na:na] + at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at org.apache.catalina.core.StandardService.startInternal(StandardService.java:421) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:930) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at org.apache.catalina.startup.Tomcat.start(Tomcat.java:459) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.initialize(TomcatWebServer.java:107) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + ... 13 common frames omitted +Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.endpoint.web.ServletEndpointRegistrar]: Factory method 'servletEndpointRegistrar' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'healthEndpoint' defined in class path resource [org/springframework/boot/actuate/autoconfigure/health/HealthEndpointConfiguration.class]: Unsatisfied dependency expressed through method 'healthEndpoint' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'healthContributorRegistry' defined in class path resource [org/springframework/boot/actuate/autoconfigure/health/HealthEndpointConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.health.HealthContributorRegistry]: Factory method 'healthContributorRegistry' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.actuate.autoconfigure.jdbc.DataSourceHealthContributorAutoConfiguration': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is java.lang.IllegalStateException: Cannot load driver class: org.postgresql.Driver + at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:651) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + ... 53 common frames omitted +Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'healthEndpoint' defined in class path resource [org/springframework/boot/actuate/autoconfigure/health/HealthEndpointConfiguration.class]: Unsatisfied dependency expressed through method 'healthEndpoint' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'healthContributorRegistry' defined in class path resource [org/springframework/boot/actuate/autoconfigure/health/HealthEndpointConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.health.HealthContributorRegistry]: Factory method 'healthContributorRegistry' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.actuate.autoconfigure.jdbc.DataSourceHealthContributorAutoConfiguration': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is java.lang.IllegalStateException: Cannot load driver class: org.postgresql.Driver + at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:798) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:539) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1338) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1177) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:557) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1108) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.boot.actuate.endpoint.annotation.EndpointDiscoverer.createEndpointBean(EndpointDiscoverer.java:143) ~[spring-boot-actuator-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.actuate.endpoint.annotation.EndpointDiscoverer.createEndpointBeans(EndpointDiscoverer.java:133) ~[spring-boot-actuator-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.actuate.endpoint.annotation.EndpointDiscoverer.discoverEndpoints(EndpointDiscoverer.java:122) ~[spring-boot-actuator-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.actuate.endpoint.annotation.EndpointDiscoverer.getEndpoints(EndpointDiscoverer.java:116) ~[spring-boot-actuator-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.actuate.autoconfigure.endpoint.web.ServletEndpointManagementContextConfiguration$WebMvcServletEndpointManagementContextConfiguration.servletEndpointRegistrar(ServletEndpointManagementContextConfiguration.java:65) ~[spring-boot-actuator-autoconfigure-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na] + at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[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:566) ~[na:na] + at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + ... 54 common frames omitted +Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'healthContributorRegistry' defined in class path resource [org/springframework/boot/actuate/autoconfigure/health/HealthEndpointConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.health.HealthContributorRegistry]: Factory method 'healthContributorRegistry' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.actuate.autoconfigure.jdbc.DataSourceHealthContributorAutoConfiguration': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is java.lang.IllegalStateException: Cannot load driver class: org.postgresql.Driver + at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:656) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:636) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1338) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1177) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:557) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1287) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1207) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:885) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:789) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + ... 74 common frames omitted +Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.health.HealthContributorRegistry]: Factory method 'healthContributorRegistry' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.actuate.autoconfigure.jdbc.DataSourceHealthContributorAutoConfiguration': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is java.lang.IllegalStateException: Cannot load driver class: org.postgresql.Driver + at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:651) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + ... 88 common frames omitted +Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.actuate.autoconfigure.jdbc.DataSourceHealthContributorAutoConfiguration': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is java.lang.IllegalStateException: Cannot load driver class: org.postgresql.Driver + at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:798) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:228) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1358) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1204) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:557) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:409) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1338) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1177) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:557) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:617) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:605) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:1242) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.boot.actuate.autoconfigure.health.HealthEndpointConfiguration.healthContributorRegistry(HealthEndpointConfiguration.java:78) ~[spring-boot-actuator-autoconfigure-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na] + at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[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:566) ~[na:na] + at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + ... 89 common frames omitted +Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is java.lang.IllegalStateException: Cannot load driver class: org.postgresql.Driver + at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:656) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:636) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1338) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1177) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:557) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.DefaultListableBeanFactory.addCandidateEntry(DefaultListableBeanFactory.java:1503) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1467) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveMultipleBeans(DefaultListableBeanFactory.java:1386) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1245) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1207) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:885) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:789) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + ... 116 common frames omitted +Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is java.lang.IllegalStateException: Cannot load driver class: org.postgresql.Driver + at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:651) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + ... 133 common frames omitted +Caused by: java.lang.IllegalStateException: Cannot load driver class: org.postgresql.Driver + at org.springframework.util.Assert.state(Assert.java:94) ~[spring-core-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.boot.autoconfigure.jdbc.DataSourceProperties.determineDriverClassName(DataSourceProperties.java:222) ~[spring-boot-autoconfigure-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.autoconfigure.jdbc.DataSourceProperties.initializeDataSourceBuilder(DataSourceProperties.java:174) ~[spring-boot-autoconfigure-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.autoconfigure.jdbc.DataSourceConfiguration.createDataSource(DataSourceConfiguration.java:43) ~[spring-boot-autoconfigure-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.autoconfigure.jdbc.DataSourceConfiguration$Hikari.dataSource(DataSourceConfiguration.java:85) ~[spring-boot-autoconfigure-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na] + at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[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:566) ~[na:na] + at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + ... 134 common frames omitted + +2021-02-12 15:53:32.223 INFO 19410 --- [main] c.m.i.k.t.adaptive.DemoApplication : No active profile set, falling back to default profiles: default +2021-02-12 15:53:32.582 INFO 19410 --- [main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode. +2021-02-12 15:53:32.622 INFO 19410 --- [main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 35ms. Found 7 JPA repository interfaces. +2021-02-12 15:53:32.916 INFO 19410 --- [main] o.s.cloud.context.scope.GenericScope : BeanFactory id=a79441cf-1ef7-328c-a88c-d0c1eff53fa2 +2021-02-12 15:53:33.001 INFO 19410 --- [main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2021-02-12 15:53:33.158 INFO 19410 --- [main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8082 (http) +2021-02-12 15:53:33.163 INFO 19410 --- [main] o.apache.catalina.core.StandardService : Starting service [Tomcat] +2021-02-12 15:53:33.163 INFO 19410 --- [main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.30] +2021-02-12 15:53:33.247 INFO 19410 --- [main] c.C.[.[.[/kypo-adaptive-training/api/v1] : Initializing Spring embedded WebApplicationContext +2021-02-12 15:53:33.247 INFO 19410 --- [main] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 1006 ms +2021-02-12 15:53:33.337 ERROR 19410 --- [main] o.s.b.web.embedded.tomcat.TomcatStarter : Error starting Tomcat context. Exception: org.springframework.beans.factory.BeanCreationException. Message: Error creating bean with name 'servletEndpointRegistrar' defined in class path resource [org/springframework/boot/actuate/autoconfigure/endpoint/web/ServletEndpointManagementContextConfiguration$WebMvcServletEndpointManagementContextConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.endpoint.web.ServletEndpointRegistrar]: Factory method 'servletEndpointRegistrar' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'healthEndpoint' defined in class path resource [org/springframework/boot/actuate/autoconfigure/health/HealthEndpointConfiguration.class]: Unsatisfied dependency expressed through method 'healthEndpoint' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'healthContributorRegistry' defined in class path resource [org/springframework/boot/actuate/autoconfigure/health/HealthEndpointConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.health.HealthContributorRegistry]: Factory method 'healthContributorRegistry' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.actuate.autoconfigure.jdbc.DataSourceHealthContributorAutoConfiguration': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is java.lang.IllegalStateException: Cannot load driver class: org.postgresql.Driver +2021-02-12 15:53:33.346 INFO 19410 --- [main] o.apache.catalina.core.StandardService : Stopping service [Tomcat] +2021-02-12 15:53:33.350 WARN 19410 --- [main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat +2021-02-12 15:53:33.360 INFO 19410 --- [main] ConditionEvaluationReportLoggingListener : + +Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. +2021-02-12 15:53:33.367 ERROR 19410 --- [main] o.s.boot.SpringApplication : Application run failed + +org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat + at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:156) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:544) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at cz.muni.ics.kypo.training.adaptive.DemoApplication.main(DemoApplication.java:21) ~[classes/:na] +Caused by: org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat + at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.initialize(TomcatWebServer.java:126) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.<init>(TomcatWebServer.java:88) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getTomcatWebServer(TomcatServletWebServerFactory.java:438) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getWebServer(TomcatServletWebServerFactory.java:191) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer(ServletWebServerApplicationContext.java:180) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:153) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + ... 8 common frames omitted +Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'servletEndpointRegistrar' defined in class path resource [org/springframework/boot/actuate/autoconfigure/endpoint/web/ServletEndpointManagementContextConfiguration$WebMvcServletEndpointManagementContextConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.endpoint.web.ServletEndpointRegistrar]: Factory method 'servletEndpointRegistrar' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'healthEndpoint' defined in class path resource [org/springframework/boot/actuate/autoconfigure/health/HealthEndpointConfiguration.class]: Unsatisfied dependency expressed through method 'healthEndpoint' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'healthContributorRegistry' defined in class path resource [org/springframework/boot/actuate/autoconfigure/health/HealthEndpointConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.health.HealthContributorRegistry]: Factory method 'healthContributorRegistry' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.actuate.autoconfigure.jdbc.DataSourceHealthContributorAutoConfiguration': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is java.lang.IllegalStateException: Cannot load driver class: org.postgresql.Driver + at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:656) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:636) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1338) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1177) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:557) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:207) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.boot.web.servlet.ServletContextInitializerBeans.getOrderedBeansOfType(ServletContextInitializerBeans.java:211) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.web.servlet.ServletContextInitializerBeans.getOrderedBeansOfType(ServletContextInitializerBeans.java:202) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.web.servlet.ServletContextInitializerBeans.addServletContextInitializerBeans(ServletContextInitializerBeans.java:96) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.web.servlet.ServletContextInitializerBeans.<init>(ServletContextInitializerBeans.java:85) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.getServletContextInitializerBeans(ServletWebServerApplicationContext.java:253) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.selfInitialize(ServletWebServerApplicationContext.java:227) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.web.embedded.tomcat.TomcatStarter.onStartup(TomcatStarter.java:53) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5135) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[na:na] + at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140) ~[na:na] + at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:841) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[na:na] + at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140) ~[na:na] + at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at org.apache.catalina.core.StandardService.startInternal(StandardService.java:421) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:930) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at org.apache.catalina.startup.Tomcat.start(Tomcat.java:459) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.initialize(TomcatWebServer.java:107) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + ... 13 common frames omitted +Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.endpoint.web.ServletEndpointRegistrar]: Factory method 'servletEndpointRegistrar' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'healthEndpoint' defined in class path resource [org/springframework/boot/actuate/autoconfigure/health/HealthEndpointConfiguration.class]: Unsatisfied dependency expressed through method 'healthEndpoint' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'healthContributorRegistry' defined in class path resource [org/springframework/boot/actuate/autoconfigure/health/HealthEndpointConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.health.HealthContributorRegistry]: Factory method 'healthContributorRegistry' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.actuate.autoconfigure.jdbc.DataSourceHealthContributorAutoConfiguration': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is java.lang.IllegalStateException: Cannot load driver class: org.postgresql.Driver + at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:651) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + ... 53 common frames omitted +Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'healthEndpoint' defined in class path resource [org/springframework/boot/actuate/autoconfigure/health/HealthEndpointConfiguration.class]: Unsatisfied dependency expressed through method 'healthEndpoint' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'healthContributorRegistry' defined in class path resource [org/springframework/boot/actuate/autoconfigure/health/HealthEndpointConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.health.HealthContributorRegistry]: Factory method 'healthContributorRegistry' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.actuate.autoconfigure.jdbc.DataSourceHealthContributorAutoConfiguration': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is java.lang.IllegalStateException: Cannot load driver class: org.postgresql.Driver + at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:798) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:539) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1338) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1177) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:557) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1108) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.boot.actuate.endpoint.annotation.EndpointDiscoverer.createEndpointBean(EndpointDiscoverer.java:143) ~[spring-boot-actuator-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.actuate.endpoint.annotation.EndpointDiscoverer.createEndpointBeans(EndpointDiscoverer.java:133) ~[spring-boot-actuator-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.actuate.endpoint.annotation.EndpointDiscoverer.discoverEndpoints(EndpointDiscoverer.java:122) ~[spring-boot-actuator-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.actuate.endpoint.annotation.EndpointDiscoverer.getEndpoints(EndpointDiscoverer.java:116) ~[spring-boot-actuator-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.actuate.autoconfigure.endpoint.web.ServletEndpointManagementContextConfiguration$WebMvcServletEndpointManagementContextConfiguration.servletEndpointRegistrar(ServletEndpointManagementContextConfiguration.java:65) ~[spring-boot-actuator-autoconfigure-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na] + at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[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:566) ~[na:na] + at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + ... 54 common frames omitted +Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'healthContributorRegistry' defined in class path resource [org/springframework/boot/actuate/autoconfigure/health/HealthEndpointConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.health.HealthContributorRegistry]: Factory method 'healthContributorRegistry' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.actuate.autoconfigure.jdbc.DataSourceHealthContributorAutoConfiguration': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is java.lang.IllegalStateException: Cannot load driver class: org.postgresql.Driver + at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:656) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:636) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1338) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1177) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:557) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1287) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1207) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:885) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:789) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + ... 74 common frames omitted +Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.health.HealthContributorRegistry]: Factory method 'healthContributorRegistry' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.actuate.autoconfigure.jdbc.DataSourceHealthContributorAutoConfiguration': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is java.lang.IllegalStateException: Cannot load driver class: org.postgresql.Driver + at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:651) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + ... 88 common frames omitted +Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.actuate.autoconfigure.jdbc.DataSourceHealthContributorAutoConfiguration': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is java.lang.IllegalStateException: Cannot load driver class: org.postgresql.Driver + at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:798) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:228) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1358) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1204) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:557) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:409) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1338) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1177) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:557) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:617) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:605) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:1242) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.boot.actuate.autoconfigure.health.HealthEndpointConfiguration.healthContributorRegistry(HealthEndpointConfiguration.java:78) ~[spring-boot-actuator-autoconfigure-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na] + at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[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:566) ~[na:na] + at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + ... 89 common frames omitted +Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is java.lang.IllegalStateException: Cannot load driver class: org.postgresql.Driver + at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:656) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:636) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1338) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1177) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:557) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.DefaultListableBeanFactory.addCandidateEntry(DefaultListableBeanFactory.java:1503) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1467) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveMultipleBeans(DefaultListableBeanFactory.java:1386) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1245) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1207) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:885) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:789) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + ... 116 common frames omitted +Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is java.lang.IllegalStateException: Cannot load driver class: org.postgresql.Driver + at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:651) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + ... 133 common frames omitted +Caused by: java.lang.IllegalStateException: Cannot load driver class: org.postgresql.Driver + at org.springframework.util.Assert.state(Assert.java:94) ~[spring-core-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.boot.autoconfigure.jdbc.DataSourceProperties.determineDriverClassName(DataSourceProperties.java:222) ~[spring-boot-autoconfigure-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.autoconfigure.jdbc.DataSourceProperties.initializeDataSourceBuilder(DataSourceProperties.java:174) ~[spring-boot-autoconfigure-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.autoconfigure.jdbc.DataSourceConfiguration.createDataSource(DataSourceConfiguration.java:43) ~[spring-boot-autoconfigure-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.autoconfigure.jdbc.DataSourceConfiguration$Hikari.dataSource(DataSourceConfiguration.java:85) ~[spring-boot-autoconfigure-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na] + at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[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:566) ~[na:na] + at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + ... 134 common frames omitted + +2021-02-12 15:54:57.339 INFO 19626 --- [main] c.m.i.k.t.adaptive.DemoApplication : No active profile set, falling back to default profiles: default +2021-02-12 15:54:58.010 INFO 19626 --- [main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode. +2021-02-12 15:54:58.059 INFO 19626 --- [main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 43ms. Found 7 JPA repository interfaces. +2021-02-12 15:54:58.187 INFO 19626 --- [main] o.s.cloud.context.scope.GenericScope : BeanFactory id=f0cd3bee-f190-387e-b69c-3ea724180170 +2021-02-12 15:54:58.276 INFO 19626 --- [main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2021-02-12 15:54:58.432 INFO 19626 --- [main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8082 (http) +2021-02-12 15:54:58.436 INFO 19626 --- [main] o.apache.catalina.core.StandardService : Starting service [Tomcat] +2021-02-12 15:54:58.437 INFO 19626 --- [main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.30] +2021-02-12 15:54:58.507 INFO 19626 --- [main] c.C.[.[.[/kypo-adaptive-training/api/v1] : Initializing Spring embedded WebApplicationContext +2021-02-12 15:54:58.507 INFO 19626 --- [main] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 1158 ms +2021-02-12 15:54:58.606 ERROR 19626 --- [main] o.s.b.web.embedded.tomcat.TomcatStarter : Error starting Tomcat context. Exception: org.springframework.beans.factory.BeanCreationException. Message: Error creating bean with name 'servletEndpointRegistrar' defined in class path resource [org/springframework/boot/actuate/autoconfigure/endpoint/web/ServletEndpointManagementContextConfiguration$WebMvcServletEndpointManagementContextConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.endpoint.web.ServletEndpointRegistrar]: Factory method 'servletEndpointRegistrar' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'healthEndpoint' defined in class path resource [org/springframework/boot/actuate/autoconfigure/health/HealthEndpointConfiguration.class]: Unsatisfied dependency expressed through method 'healthEndpoint' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'healthContributorRegistry' defined in class path resource [org/springframework/boot/actuate/autoconfigure/health/HealthEndpointConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.health.HealthContributorRegistry]: Factory method 'healthContributorRegistry' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.actuate.autoconfigure.jdbc.DataSourceHealthContributorAutoConfiguration': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is java.lang.IllegalStateException: Cannot load driver class: org.postgresql.Driver +2021-02-12 15:54:58.615 INFO 19626 --- [main] o.apache.catalina.core.StandardService : Stopping service [Tomcat] +2021-02-12 15:54:58.620 WARN 19626 --- [main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat +2021-02-12 15:54:58.630 INFO 19626 --- [main] ConditionEvaluationReportLoggingListener : + +Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. +2021-02-12 15:54:58.636 ERROR 19626 --- [main] o.s.boot.SpringApplication : Application run failed + +org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat + at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:156) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:544) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at cz.muni.ics.kypo.training.adaptive.DemoApplication.main(DemoApplication.java:17) ~[classes/:na] +Caused by: org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat + at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.initialize(TomcatWebServer.java:126) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.<init>(TomcatWebServer.java:88) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getTomcatWebServer(TomcatServletWebServerFactory.java:438) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getWebServer(TomcatServletWebServerFactory.java:191) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer(ServletWebServerApplicationContext.java:180) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:153) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + ... 8 common frames omitted +Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'servletEndpointRegistrar' defined in class path resource [org/springframework/boot/actuate/autoconfigure/endpoint/web/ServletEndpointManagementContextConfiguration$WebMvcServletEndpointManagementContextConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.endpoint.web.ServletEndpointRegistrar]: Factory method 'servletEndpointRegistrar' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'healthEndpoint' defined in class path resource [org/springframework/boot/actuate/autoconfigure/health/HealthEndpointConfiguration.class]: Unsatisfied dependency expressed through method 'healthEndpoint' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'healthContributorRegistry' defined in class path resource [org/springframework/boot/actuate/autoconfigure/health/HealthEndpointConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.health.HealthContributorRegistry]: Factory method 'healthContributorRegistry' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.actuate.autoconfigure.jdbc.DataSourceHealthContributorAutoConfiguration': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is java.lang.IllegalStateException: Cannot load driver class: org.postgresql.Driver + at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:656) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:636) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1338) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1177) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:557) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:207) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.boot.web.servlet.ServletContextInitializerBeans.getOrderedBeansOfType(ServletContextInitializerBeans.java:211) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.web.servlet.ServletContextInitializerBeans.getOrderedBeansOfType(ServletContextInitializerBeans.java:202) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.web.servlet.ServletContextInitializerBeans.addServletContextInitializerBeans(ServletContextInitializerBeans.java:96) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.web.servlet.ServletContextInitializerBeans.<init>(ServletContextInitializerBeans.java:85) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.getServletContextInitializerBeans(ServletWebServerApplicationContext.java:253) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.selfInitialize(ServletWebServerApplicationContext.java:227) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.web.embedded.tomcat.TomcatStarter.onStartup(TomcatStarter.java:53) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5135) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[na:na] + at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140) ~[na:na] + at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:841) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[na:na] + at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140) ~[na:na] + at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at org.apache.catalina.core.StandardService.startInternal(StandardService.java:421) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:930) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at org.apache.catalina.startup.Tomcat.start(Tomcat.java:459) ~[tomcat-embed-core-9.0.30.jar:9.0.30] + at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.initialize(TomcatWebServer.java:107) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + ... 13 common frames omitted +Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.endpoint.web.ServletEndpointRegistrar]: Factory method 'servletEndpointRegistrar' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'healthEndpoint' defined in class path resource [org/springframework/boot/actuate/autoconfigure/health/HealthEndpointConfiguration.class]: Unsatisfied dependency expressed through method 'healthEndpoint' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'healthContributorRegistry' defined in class path resource [org/springframework/boot/actuate/autoconfigure/health/HealthEndpointConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.health.HealthContributorRegistry]: Factory method 'healthContributorRegistry' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.actuate.autoconfigure.jdbc.DataSourceHealthContributorAutoConfiguration': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is java.lang.IllegalStateException: Cannot load driver class: org.postgresql.Driver + at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:651) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + ... 53 common frames omitted +Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'healthEndpoint' defined in class path resource [org/springframework/boot/actuate/autoconfigure/health/HealthEndpointConfiguration.class]: Unsatisfied dependency expressed through method 'healthEndpoint' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'healthContributorRegistry' defined in class path resource [org/springframework/boot/actuate/autoconfigure/health/HealthEndpointConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.health.HealthContributorRegistry]: Factory method 'healthContributorRegistry' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.actuate.autoconfigure.jdbc.DataSourceHealthContributorAutoConfiguration': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is java.lang.IllegalStateException: Cannot load driver class: org.postgresql.Driver + at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:798) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:539) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1338) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1177) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:557) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1108) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.boot.actuate.endpoint.annotation.EndpointDiscoverer.createEndpointBean(EndpointDiscoverer.java:143) ~[spring-boot-actuator-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.actuate.endpoint.annotation.EndpointDiscoverer.createEndpointBeans(EndpointDiscoverer.java:133) ~[spring-boot-actuator-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.actuate.endpoint.annotation.EndpointDiscoverer.discoverEndpoints(EndpointDiscoverer.java:122) ~[spring-boot-actuator-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.actuate.endpoint.annotation.EndpointDiscoverer.getEndpoints(EndpointDiscoverer.java:116) ~[spring-boot-actuator-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.actuate.autoconfigure.endpoint.web.ServletEndpointManagementContextConfiguration$WebMvcServletEndpointManagementContextConfiguration.servletEndpointRegistrar(ServletEndpointManagementContextConfiguration.java:65) ~[spring-boot-actuator-autoconfigure-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na] + at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[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:566) ~[na:na] + at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + ... 54 common frames omitted +Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'healthContributorRegistry' defined in class path resource [org/springframework/boot/actuate/autoconfigure/health/HealthEndpointConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.health.HealthContributorRegistry]: Factory method 'healthContributorRegistry' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.actuate.autoconfigure.jdbc.DataSourceHealthContributorAutoConfiguration': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is java.lang.IllegalStateException: Cannot load driver class: org.postgresql.Driver + at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:656) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:636) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1338) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1177) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:557) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1287) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1207) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:885) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:789) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + ... 74 common frames omitted +Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.health.HealthContributorRegistry]: Factory method 'healthContributorRegistry' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.actuate.autoconfigure.jdbc.DataSourceHealthContributorAutoConfiguration': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is java.lang.IllegalStateException: Cannot load driver class: org.postgresql.Driver + at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:651) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + ... 88 common frames omitted +Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.actuate.autoconfigure.jdbc.DataSourceHealthContributorAutoConfiguration': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is java.lang.IllegalStateException: Cannot load driver class: org.postgresql.Driver + at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:798) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:228) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1358) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1204) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:557) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:409) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1338) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1177) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:557) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:617) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:605) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:1242) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.boot.actuate.autoconfigure.health.HealthEndpointConfiguration.healthContributorRegistry(HealthEndpointConfiguration.java:78) ~[spring-boot-actuator-autoconfigure-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na] + at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[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:566) ~[na:na] + at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + ... 89 common frames omitted +Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is java.lang.IllegalStateException: Cannot load driver class: org.postgresql.Driver + at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:656) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:636) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1338) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1177) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:557) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.DefaultListableBeanFactory.addCandidateEntry(DefaultListableBeanFactory.java:1503) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1467) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveMultipleBeans(DefaultListableBeanFactory.java:1386) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1245) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1207) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:885) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:789) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + ... 116 common frames omitted +Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is java.lang.IllegalStateException: Cannot load driver class: org.postgresql.Driver + at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:651) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + ... 133 common frames omitted +Caused by: java.lang.IllegalStateException: Cannot load driver class: org.postgresql.Driver + at org.springframework.util.Assert.state(Assert.java:94) ~[spring-core-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.boot.autoconfigure.jdbc.DataSourceProperties.determineDriverClassName(DataSourceProperties.java:222) ~[spring-boot-autoconfigure-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.autoconfigure.jdbc.DataSourceProperties.initializeDataSourceBuilder(DataSourceProperties.java:174) ~[spring-boot-autoconfigure-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.autoconfigure.jdbc.DataSourceConfiguration.createDataSource(DataSourceConfiguration.java:43) ~[spring-boot-autoconfigure-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.autoconfigure.jdbc.DataSourceConfiguration$Hikari.dataSource(DataSourceConfiguration.java:85) ~[spring-boot-autoconfigure-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na] + at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[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:566) ~[na:na] + at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + ... 134 common frames omitted + +2021-02-12 15:55:15.127 INFO 19794 --- [main] c.m.i.k.t.adaptive.DemoApplication : No active profile set, falling back to default profiles: default +2021-02-12 15:55:15.787 INFO 19794 --- [main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode. +2021-02-12 15:55:15.832 INFO 19794 --- [main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 40ms. Found 7 JPA repository interfaces. +2021-02-12 15:55:15.963 INFO 19794 --- [main] o.s.cloud.context.scope.GenericScope : BeanFactory id=f0cd3bee-f190-387e-b69c-3ea724180170 +2021-02-12 15:55:16.078 INFO 19794 --- [main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2021-02-12 15:55:16.228 INFO 19794 --- [main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8082 (http) +2021-02-12 15:55:16.233 INFO 19794 --- [main] o.apache.catalina.core.StandardService : Starting service [Tomcat] +2021-02-12 15:55:16.233 INFO 19794 --- [main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.30] +2021-02-12 15:55:16.298 INFO 19794 --- [main] c.C.[.[.[/kypo-adaptive-training/api/v1] : Initializing Spring embedded WebApplicationContext +2021-02-12 15:55:16.298 INFO 19794 --- [main] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 1162 ms +2021-02-12 15:55:16.686 INFO 19794 --- [main] o.f.c.internal.license.VersionPrinter : Flyway Community Edition 6.0.8 by Redgate +2021-02-12 15:55:16.689 INFO 19794 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting... +2021-02-12 15:55:16.836 INFO 19794 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed. +2021-02-12 15:55:16.845 INFO 19794 --- [main] o.f.c.internal.database.DatabaseFactory : Database: jdbc:postgresql://localhost:5432/adaptive-training (PostgreSQL 10.13) +2021-02-12 15:55:16.859 INFO 19794 --- [main] o.f.core.internal.command.DbValidate : Successfully validated 2 migrations (execution time 00:00.007s) +2021-02-12 15:55:16.866 INFO 19794 --- [main] o.f.c.i.s.JdbcTableSchemaHistory : Creating Schema History table "public"."flyway_schema_history" ... +2021-02-12 15:55:16.895 INFO 19794 --- [main] o.f.core.internal.command.DbMigrate : Current version of schema "public": << Empty Schema >> +2021-02-12 15:55:16.908 INFO 19794 --- [main] o.f.core.internal.command.DbMigrate : Migrating schema "public" to version 1 - db adaptive trainings schema +2021-02-12 15:55:16.970 ERROR 19794 --- [main] o.f.core.internal.command.DbMigrate : Migration of schema "public" to version 1 - db adaptive trainings schema failed! Changes successfully rolled back. +2021-02-12 15:55:16.972 WARN 19794 --- [main] 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]: Invocation of init method failed; nested exception is org.flywaydb.core.internal.command.DbMigrate$FlywayMigrateException: +Migration V1__db_adaptive_trainings_schema.sql failed +----------------------------------------------------- +SQL State : 42704 +Error Code : 0 +Message : ERROR: type "double" does not exist + Position: 150 +Location : db/migration/V1__db_adaptive_trainings_schema.sql (/home/dominik/Desktop/Workspace/BACKEND/kypo-adaptive-training/target/classes/db/migration/V1__db_adaptive_trainings_schema.sql) +Line : 113 +Statement : create table decision_matrix_row ( + decision_matrix_row_id bigserial not null, + order_in_training_phase int4 not null, + assessment_answered double not null, + keyword_used double not null, + completed_in_time double not null, + solution_displayed double not null, + wrong_answers double not null, + phase_id int8 not null, + primary key (decision_matrix_row_id), + foreign key (phase_id) references training_phase +) + +2021-02-12 15:55:16.973 INFO 19794 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated... +2021-02-12 15:55:16.980 INFO 19794 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed. +2021-02-12 15:55:16.981 INFO 19794 --- [main] o.apache.catalina.core.StandardService : Stopping service [Tomcat] +2021-02-12 15:55:16.992 INFO 19794 --- [main] ConditionEvaluationReportLoggingListener : + +Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. +2021-02-12 15:55:16.998 ERROR 19794 --- [main] 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]: Invocation of init method failed; nested exception is org.flywaydb.core.internal.command.DbMigrate$FlywayMigrateException: +Migration V1__db_adaptive_trainings_schema.sql failed +----------------------------------------------------- +SQL State : 42704 +Error Code : 0 +Message : ERROR: type "double" does not exist + Position: 150 +Location : db/migration/V1__db_adaptive_trainings_schema.sql (/home/dominik/Desktop/Workspace/BACKEND/kypo-adaptive-training/target/classes/db/migration/V1__db_adaptive_trainings_schema.sql) +Line : 113 +Statement : create table decision_matrix_row ( + decision_matrix_row_id bigserial not null, + order_in_training_phase int4 not null, + assessment_answered double not null, + keyword_used double not null, + completed_in_time double not null, + solution_displayed double not null, + wrong_answers double not null, + phase_id int8 not null, + primary key (decision_matrix_row_id), + foreign key (phase_id) references training_phase +) + + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1796) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:595) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:310) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1108) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:868) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at cz.muni.ics.kypo.training.adaptive.DemoApplication.main(DemoApplication.java:17) ~[classes/:na] +Caused by: org.flywaydb.core.internal.command.DbMigrate$FlywayMigrateException: +Migration V1__db_adaptive_trainings_schema.sql failed +----------------------------------------------------- +SQL State : 42704 +Error Code : 0 +Message : ERROR: type "double" does not exist + Position: 150 +Location : db/migration/V1__db_adaptive_trainings_schema.sql (/home/dominik/Desktop/Workspace/BACKEND/kypo-adaptive-training/target/classes/db/migration/V1__db_adaptive_trainings_schema.sql) +Line : 113 +Statement : create table decision_matrix_row ( + decision_matrix_row_id bigserial not null, + order_in_training_phase int4 not null, + assessment_answered double not null, + keyword_used double not null, + completed_in_time double not null, + solution_displayed double not null, + wrong_answers double not null, + phase_id int8 not null, + primary key (decision_matrix_row_id), + foreign key (phase_id) references training_phase +) + + at org.flywaydb.core.internal.command.DbMigrate.doMigrateGroup(DbMigrate.java:369) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate.access$200(DbMigrate.java:54) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate$3.call(DbMigrate.java:282) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.jdbc.TransactionTemplate.execute(TransactionTemplate.java:74) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate.applyMigrations(DbMigrate.java:279) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate.migrateGroup(DbMigrate.java:244) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate.access$100(DbMigrate.java:54) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate$2.call(DbMigrate.java:162) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate$2.call(DbMigrate.java:159) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.database.postgresql.PostgreSQLAdvisoryLockTemplate.execute(PostgreSQLAdvisoryLockTemplate.java:71) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.database.postgresql.PostgreSQLConnection.lock(PostgreSQLConnection.java:94) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory.lock(JdbcTableSchemaHistory.java:139) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate.migrateAll(DbMigrate.java:159) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate.migrate(DbMigrate.java:137) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.Flyway$1.execute(Flyway.java:189) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.Flyway$1.execute(Flyway.java:149) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.Flyway.execute(Flyway.java:511) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.Flyway.migrate(Flyway.java:149) ~[flyway-core-6.0.8.jar:na] + at org.springframework.boot.autoconfigure.flyway.FlywayMigrationInitializer.afterPropertiesSet(FlywayMigrationInitializer.java:65) ~[spring-boot-autoconfigure-2.2.4.RELEASE.jar:2.2.4.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1855) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1792) ~[spring-beans-5.2.3.RELEASE.jar:5.2.3.RELEASE] + ... 18 common frames omitted +Caused by: org.flywaydb.core.internal.sqlscript.FlywaySqlScriptException: +Migration V1__db_adaptive_trainings_schema.sql failed +----------------------------------------------------- +SQL State : 42704 +Error Code : 0 +Message : ERROR: type "double" does not exist + Position: 150 +Location : db/migration/V1__db_adaptive_trainings_schema.sql (/home/dominik/Desktop/Workspace/BACKEND/kypo-adaptive-training/target/classes/db/migration/V1__db_adaptive_trainings_schema.sql) +Line : 113 +Statement : create table decision_matrix_row ( + decision_matrix_row_id bigserial not null, + order_in_training_phase int4 not null, + assessment_answered double not null, + keyword_used double not null, + completed_in_time double not null, + solution_displayed double not null, + wrong_answers double not null, + phase_id int8 not null, + primary key (decision_matrix_row_id), + foreign key (phase_id) references training_phase +) + + at org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor.handleException(DefaultSqlScriptExecutor.java:274) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor.executeStatement(DefaultSqlScriptExecutor.java:220) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor.execute(DefaultSqlScriptExecutor.java:127) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.resolver.sql.SqlMigrationExecutor.execute(SqlMigrationExecutor.java:70) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.command.DbMigrate.doMigrateGroup(DbMigrate.java:366) ~[flyway-core-6.0.8.jar:na] + ... 38 common frames omitted +Caused by: org.postgresql.util.PSQLException: ERROR: type "double" does not exist + Position: 150 + at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2505) ~[postgresql-42.2.9.jar:42.2.9] + at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2241) ~[postgresql-42.2.9.jar:42.2.9] + at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:310) ~[postgresql-42.2.9.jar:42.2.9] + at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:447) ~[postgresql-42.2.9.jar:42.2.9] + at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:368) ~[postgresql-42.2.9.jar:42.2.9] + at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:309) ~[postgresql-42.2.9.jar:42.2.9] + at org.postgresql.jdbc.PgStatement.executeCachedSql(PgStatement.java:295) ~[postgresql-42.2.9.jar:42.2.9] + at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:272) ~[postgresql-42.2.9.jar:42.2.9] + at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:267) ~[postgresql-42.2.9.jar:42.2.9] + at com.zaxxer.hikari.pool.ProxyStatement.execute(ProxyStatement.java:95) ~[HikariCP-3.4.2.jar:na] + at com.zaxxer.hikari.pool.HikariProxyStatement.execute(HikariProxyStatement.java) ~[HikariCP-3.4.2.jar:na] + at org.flywaydb.core.internal.jdbc.JdbcTemplate.executeStatement(JdbcTemplate.java:244) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.sqlscript.ParsedSqlStatement.execute(ParsedSqlStatement.java:111) ~[flyway-core-6.0.8.jar:na] + at org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor.executeStatement(DefaultSqlScriptExecutor.java:208) ~[flyway-core-6.0.8.jar:na] + ... 41 common frames omitted + +2021-02-12 15:56:20.778 INFO 19977 --- [main] c.m.i.k.t.adaptive.DemoApplication : No active profile set, falling back to default profiles: default +2021-02-12 15:56:21.461 INFO 19977 --- [main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode. +2021-02-12 15:56:21.506 INFO 19977 --- [main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 41ms. Found 7 JPA repository interfaces. +2021-02-12 15:56:21.631 INFO 19977 --- [main] o.s.cloud.context.scope.GenericScope : BeanFactory id=f0cd3bee-f190-387e-b69c-3ea724180170 +2021-02-12 15:56:21.730 INFO 19977 --- [main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2021-02-12 15:56:21.873 INFO 19977 --- [main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8082 (http) +2021-02-12 15:56:21.878 INFO 19977 --- [main] o.apache.catalina.core.StandardService : Starting service [Tomcat] +2021-02-12 15:56:21.878 INFO 19977 --- [main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.30] +2021-02-12 15:56:21.947 INFO 19977 --- [main] c.C.[.[.[/kypo-adaptive-training/api/v1] : Initializing Spring embedded WebApplicationContext +2021-02-12 15:56:21.947 INFO 19977 --- [main] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 1136 ms +2021-02-12 15:56:22.201 INFO 19977 --- [main] o.f.c.internal.license.VersionPrinter : Flyway Community Edition 6.0.8 by Redgate +2021-02-12 15:56:22.205 INFO 19977 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting... +2021-02-12 15:56:22.349 INFO 19977 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed. +2021-02-12 15:56:22.357 INFO 19977 --- [main] o.f.c.internal.database.DatabaseFactory : Database: jdbc:postgresql://localhost:5432/adaptive-training (PostgreSQL 10.13) +2021-02-12 15:56:22.373 INFO 19977 --- [main] o.f.core.internal.command.DbValidate : Successfully validated 2 migrations (execution time 00:00.008s) +2021-02-12 15:56:22.377 INFO 19977 --- [main] o.f.core.internal.command.DbMigrate : Current version of schema "public": << Empty Schema >> +2021-02-12 15:56:22.390 INFO 19977 --- [main] o.f.core.internal.command.DbMigrate : Migrating schema "public" to version 1 - db adaptive trainings schema +2021-02-12 15:56:22.499 INFO 19977 --- [main] o.f.core.internal.command.DbMigrate : Migrating schema "public" to version 2 - db adaptive trainings indexes +2021-02-12 15:56:22.523 INFO 19977 --- [main] o.f.core.internal.command.DbMigrate : Successfully applied 2 migrations to schema "public" (execution time 00:00.148s) +2021-02-12 15:56:22.575 INFO 19977 --- [main] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [name: default] +2021-02-12 15:56:22.605 INFO 19977 --- [main] org.hibernate.Version : HHH000412: Hibernate Core {5.4.10.Final} +2021-02-12 15:56:22.658 INFO 19977 --- [main] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {5.1.0.Final} +2021-02-12 15:56:22.712 INFO 19977 --- [main] org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.PostgreSQL10Dialect +2021-02-12 15:56:23.229 INFO 19977 --- [main] o.h.e.t.j.p.i.JtaPlatformInitiator : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform] +2021-02-12 15:56:23.293 INFO 19977 --- [main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default' +2021-02-12 15:56:23.683 WARN 19977 --- [main] JpaBaseConfiguration$JpaWebConfiguration : spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning +2021-02-12 15:56:23.758 INFO 19977 --- [main] o.s.b.a.e.web.EndpointLinksResolver : Exposing 2 endpoint(s) beneath base path '/actuator' +2021-02-12 15:56:23.832 INFO 19977 --- [main] pertySourcedRequestMappingHandlerMapping : Mapped URL path [/v2/api-docs] onto method [springfox.documentation.swagger2.web.Swagger2Controller#getDocumentation(String, HttpServletRequest)] +2021-02-12 15:56:23.948 INFO 19977 --- [main] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'applicationTaskExecutor' +2021-02-12 15:56:24.120 INFO 19977 --- [main] .s.s.UserDetailsServiceAutoConfiguration : + +Using generated security password: f7a81929-0f74-489c-a8a8-6a48ff126940 + +2021-02-12 15:56:24.164 INFO 19977 --- [main] o.s.s.web.DefaultSecurityFilterChain : Creating filter chain: any request, [org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@237bdd46, org.springframework.security.web.context.SecurityContextPersistenceFilter@24c8bc1e, org.springframework.security.web.header.HeaderWriterFilter@592efd6, org.springframework.security.web.csrf.CsrfFilter@246701d5, org.springframework.security.web.authentication.logout.LogoutFilter@139a97e7, org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter@1d5e0621, org.springframework.security.web.authentication.ui.DefaultLoginPageGeneratingFilter@3cd6cab5, org.springframework.security.web.authentication.ui.DefaultLogoutPageGeneratingFilter@7e32442d, org.springframework.security.web.authentication.www.BasicAuthenticationFilter@14f05ca0, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@3ac2772d, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@790bd0e, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@310df168, org.springframework.security.web.session.SessionManagementFilter@6149adee, org.springframework.security.web.access.ExceptionTranslationFilter@1da9f44c, org.springframework.security.web.access.intercept.FilterSecurityInterceptor@7fec354] +2021-02-12 15:56:24.370 WARN 19977 --- [main] s.o.SpringCloudSecurityAutoConfiguration : All Spring Cloud Security modules and starters are deprecated. They will be moved to individual projects in the next major release. +2021-02-12 15:56:24.416 INFO 19977 --- [main] d.s.w.p.DocumentationPluginsBootstrapper : Context refreshed +2021-02-12 15:56:24.429 INFO 19977 --- [main] d.s.w.p.DocumentationPluginsBootstrapper : Found 1 custom documentation plugin(s) +2021-02-12 15:56:24.456 INFO 19977 --- [main] s.d.s.w.s.ApiListingReferenceScanner : Scanning for api listing references +2021-02-12 15:56:24.527 INFO 19977 --- [main] .d.s.w.r.o.CachingOperationNameGenerator : Generating unique operation named: handleUsingGET_1 +2021-02-12 15:56:24.528 INFO 19977 --- [main] .d.s.w.r.o.CachingOperationNameGenerator : Generating unique operation named: handleUsingGET_2 +2021-02-12 15:56:24.548 INFO 19977 --- [main] .d.s.w.r.o.CachingOperationNameGenerator : Generating unique operation named: getPhase_1 +2021-02-12 15:56:24.618 INFO 19977 --- [main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8082 (http) with context path '/kypo-adaptive-training/api/v1' +2021-02-12 15:56:24.664 INFO 19977 --- [main] c.m.i.k.t.adaptive.DemoApplication : Started DemoApplication in 4.572 seconds (JVM running for 5.016) +2021-02-12 15:56:24.833 DEBUG 19977 --- [main] c.m.i.k.commons.startup.StartUpRunner : Microservice with roles has been registered. +2021-02-12 15:56:25.015 INFO 19977 --- [RMI TCP Connection(2)-127.0.0.1] c.C.[.[.[/kypo-adaptive-training/api/v1] : Initializing Spring DispatcherServlet 'dispatcherServlet' +2021-02-12 15:56:25.016 INFO 19977 --- [RMI TCP Connection(2)-127.0.0.1] o.s.web.servlet.DispatcherServlet : Initializing Servlet 'dispatcherServlet' +2021-02-12 15:56:25.022 INFO 19977 --- [RMI TCP Connection(2)-127.0.0.1] o.s.web.servlet.DispatcherServlet : Completed initialization in 6 ms +2021-02-12 15:56:59.886 INFO 19977 --- [SpringContextShutdownHook] o.s.s.concurrent.ThreadPoolTaskExecutor : Shutting down ExecutorService 'applicationTaskExecutor' +2021-02-12 15:56:59.901 INFO 19977 --- [SpringContextShutdownHook] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default' +2021-02-12 15:56:59.908 INFO 19977 --- [SpringContextShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated... +2021-02-12 15:56:59.936 INFO 19977 --- [SpringContextShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed. diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/DemoApplication.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/DemoApplication.java index 300930d3d86cad2bab000936addd5df2c78775dd..983d9e46babbcac857704ecdccaed7ead472194d 100644 --- a/src/main/java/cz/muni/ics/kypo/training/adaptive/DemoApplication.java +++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/DemoApplication.java @@ -13,3 +13,4 @@ public class DemoApplication { SpringApplication.run(DemoApplication.class, args); } } + diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/domain/AbstractEntity.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/domain/AbstractEntity.java new file mode 100644 index 0000000000000000000000000000000000000000..5892f365aaf89aefacd021f9195ca68300dae7d8 --- /dev/null +++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/domain/AbstractEntity.java @@ -0,0 +1,50 @@ +package cz.muni.ics.kypo.training.adaptive.domain; + +import javax.persistence.*; +import java.io.Serializable; + +/** + * The type Abstract entity. + * + * @param <PK> Primary key for a given entity. + */ +@MappedSuperclass +public abstract class AbstractEntity<PK extends Serializable> implements Serializable { + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "id", unique = true, nullable = false, insertable = false) + private PK id; + + /** + * Instantiates a new Abstract entity. + */ + public AbstractEntity() { + } + + /** + * Gets id. + * + * @return the id + */ + public PK getId() { + return id; + } + + /** + * Sets id. + * + * @param id the id + */ + public void setId(PK id) { + this.id = id; + } + + @Override + public String toString() { + return "AbstractEntity{" + + "id=" + id + + '}'; + } +} + diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/domain/AccessToken.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/domain/AccessToken.java new file mode 100644 index 0000000000000000000000000000000000000000..dc97d18f3f7a36318fede45d6d313c7905ed38a2 --- /dev/null +++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/domain/AccessToken.java @@ -0,0 +1,98 @@ +package cz.muni.ics.kypo.training.adaptive.domain; + +import javax.persistence.*; +import java.util.Objects; + +/** + * Class representing access token needed by trainee to start a Training run. + * Access tokens are associated with Training instances. + */ +@Entity +@Table(name = "access_token") +@NamedQueries({ + @NamedQuery( + name = "AccessToken.findOneByAccessToken", + query = "SELECT at FROM AccessToken at WHERE at.accessToken = :accessToken" + ), +}) +public class AccessToken extends AbstractEntity<Long> { + + @Column(name = "access_token", nullable = false, unique = true) + private String accessToken; + + /** + * Instantiates a new Access token + */ + public AccessToken() { + } + + /** + * Instantiates a new Access token + * + * @param id unique identification number of access token + * @param accessToken string representing token that trainee needs to know to access Training run + */ + public AccessToken(Long id, String accessToken) { + this.accessToken = accessToken; + super.setId(id); + } + + /** + * Gets unique identification number of access token + * + * @return the id + */ + public Long getId() { + return super.getId(); + } + + /** + * Sets unique identification number of access token + * + * @param id the id + */ + public void setId(Long id) { + super.setId(id); + } + + /** + * Gets string representing token that trainee needs to know to access Training run + * + * @return the access token + */ + public String getAccessToken() { + return accessToken; + } + + /** + * Sets string representing token that trainee needs to know to access Training run + * + * @param accessToken the access token + */ + public void setAccessToken(String accessToken) { + this.accessToken = accessToken; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + if (!(o instanceof AccessToken)) + return false; + AccessToken accessToken = (AccessToken) o; + return Objects.equals(super.getId(), accessToken.getId()) && Objects.equals(this.accessToken, accessToken.getAccessToken()); + } + + @Override + public int hashCode() { + return Objects.hash(super.getId(), accessToken); + } + + @Override + public String toString() { + return "AccessToken{" + + "id=" + super.getId() + + ", accessToken='" + accessToken + '\'' + + '}'; + } +} diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/domain/TRAcquisitionLock.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/domain/TRAcquisitionLock.java new file mode 100644 index 0000000000000000000000000000000000000000..3e5e7b7b165160a792925dbe7eb4d9dccfebe497 --- /dev/null +++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/domain/TRAcquisitionLock.java @@ -0,0 +1,133 @@ +package cz.muni.ics.kypo.training.adaptive.domain; + +import javax.persistence.*; +import java.time.LocalDateTime; +import java.util.Objects; + +/** + * The entity which prevents multiple training runs to be created in parallel threads. Basically it determines active training runs. + */ +@Entity +@Table(name = "training_run_acquisition_lock", + uniqueConstraints = @UniqueConstraint(columnNames = {"participant_ref_id", "training_instance_id"})) +@NamedQueries({ + @NamedQuery( + name = "TRAcquisitionLock.deleteByParticipantRefIdAndTrainingInstanceId", + query = "DELETE FROM TRAcquisitionLock tral WHERE tral.participantRefId = :participantRefId AND tral.trainingInstanceId = :trainingInstanceId" + ) +}) +public class TRAcquisitionLock extends AbstractEntity<Long> { + + @Column(name = "participant_ref_id") + private Long participantRefId; + @Column(name = "training_instance_id") + private Long trainingInstanceId; + @Column(name = "creation_time") + private LocalDateTime creationTime; + + /** + * Instantiates a new Tr acquisition lock. + */ + public TRAcquisitionLock() { + } + + /** + * Instantiates a new Tr acquisition lock. + * + * @param participantRefId the participant ref id + * @param trainingInstanceId the training instance id + * @param creationTime the creation time + */ + public TRAcquisitionLock(Long participantRefId, Long trainingInstanceId, LocalDateTime creationTime) { + this.participantRefId = participantRefId; + this.trainingInstanceId = trainingInstanceId; + this.creationTime = creationTime; + } + + public Long getId() { + return super.getId(); + } + + public void setId(Long id) { + super.setId(id); + } + + /** + * Gets participant ref id. + * + * @return the participant ref id + */ + public Long getParticipantRefId() { + return participantRefId; + } + + /** + * Sets participant ref id. + * + * @param participantRefId the participant ref id + */ + public void setParticipantRefId(Long participantRefId) { + this.participantRefId = participantRefId; + } + + /** + * Gets training instance id. + * + * @return the training instance id + */ + public Long getTrainingInstanceId() { + return trainingInstanceId; + } + + /** + * Sets training instance id. + * + * @param trainingInstanceId the training instance id + */ + public void setTrainingInstanceId(Long trainingInstanceId) { + this.trainingInstanceId = trainingInstanceId; + } + + /** + * Gets creation time. + * + * @return the creation time + */ + public LocalDateTime getCreationTime() { + return creationTime; + } + + /** + * Sets creation time. + * + * @param creationTime the creation time + */ + public void setCreationTime(LocalDateTime creationTime) { + this.creationTime = creationTime; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (!(o instanceof TRAcquisitionLock)) + return false; + TRAcquisitionLock that = (TRAcquisitionLock) o; + return Objects.equals(getParticipantRefId(), that.getParticipantRefId()) && + Objects.equals(getTrainingInstanceId(), that.getTrainingInstanceId()); + } + + @Override + public int hashCode() { + return Objects.hash(getParticipantRefId(), getTrainingInstanceId()); + } + + @Override + public String toString() { + return "TRAcquisitionLock{" + + "id=" + super.getId() + + ", participantRefId=" + participantRefId + + ", trainingInstanceId=" + trainingInstanceId + + ", creationTime=" + creationTime + + '}'; + } +} diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/domain/UserRef.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/domain/UserRef.java new file mode 100644 index 0000000000000000000000000000000000000000..da0098fbfe5bb36ae4ad03b4a1f08d8f9c5ac3cd --- /dev/null +++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/domain/UserRef.java @@ -0,0 +1,177 @@ +package cz.muni.ics.kypo.training.adaptive.domain; + +import cz.muni.ics.kypo.training.adaptive.domain.training.TrainingDefinition; +import cz.muni.ics.kypo.training.adaptive.domain.training.TrainingInstance; + +import javax.persistence.*; +import java.util.Collections; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; + +/** + * Class representing DB reference for user and training instances and definition they can access + */ +@Entity +@Table(name = "user_ref", uniqueConstraints = @UniqueConstraint(columnNames = {"user_ref_id"})) +@NamedQueries({ + @NamedQuery( + name = "UserRef.findUsers", + query = "SELECT ur FROM UserRef ur WHERE ur.userRefId IN :userRefId" + ), + @NamedQuery( + name = "UserRef.findUserByUserRefId", + query = "SELECT ur FROM UserRef ur WHERE ur.userRefId = :userRefId" + ), + @NamedQuery( + name = "UserRef.findParticipantsRefByTrainingInstanceId", + query = "SELECT pr.userRefId FROM TrainingRun tr " + + "INNER JOIN tr.participantRef pr " + + "INNER JOIN tr.trainingInstance ti " + + "WHERE ti.id = :trainingInstanceId" + ) +}) +public class UserRef extends AbstractEntity<Long> { + + @Column(name = "user_ref_id", nullable = false) + private Long userRefId; + @ManyToMany(mappedBy = "organizers", fetch = FetchType.LAZY) + private Set<TrainingInstance> trainingInstances = new HashSet<>(); + @ManyToMany(mappedBy = "authors", fetch = FetchType.LAZY) + private Set<TrainingDefinition> trainingDefinitions = new HashSet<>(); + + /** + * Instantiates a new user reference + */ + public UserRef() { + } + + /** + * Gets unique identification number of user reference + * + * @return the id + */ + public Long getId() { + return super.getId(); + } + + /** + * Sets unique identification number of user reference + * + * @param id the id + */ + public void setId(Long id) { + super.setId(id); + } + + /** + * Gets user ref id. + * + * @return the user ref id + */ + public Long getUserRefId() { + return userRefId; + } + + /** + * Sets user ref id. + * + * @param userRefId the user ref id + */ + public void setUserRefId(Long userRefId) { + this.userRefId = userRefId; + } + + /** + * Gets set of training instances user can access + * + * @return the training instances + */ + public Set<TrainingInstance> getTrainingInstances() { + return Collections.unmodifiableSet(trainingInstances); + } + + /** + * Sets set of training instances user can access + * + * @param trainingInstances the training instances + */ + public void setTrainingInstances(Set<TrainingInstance> trainingInstances) { + this.trainingInstances = trainingInstances; + } + + /** + * Gets set of training definitions user can access + * + * @return the training definitions + */ + public Set<TrainingDefinition> getTrainingDefinitions() { + return Collections.unmodifiableSet(trainingDefinitions); + } + + /** + * Sets set of training definitions user can access + * + * @param trainingDefinitions the training definitions + */ + public void setTrainingDefinitions(Set<TrainingDefinition> trainingDefinitions) { + this.trainingDefinitions = trainingDefinitions; + } + + /** + * Adds definition to the set of training definitions user can access + * + * @param trainingDefinition the training definition + */ + public void addTrainingDefinition(TrainingDefinition trainingDefinition) { + this.trainingDefinitions.add(trainingDefinition); + } + + /** + * Removes definition from the set of training definitions user can access + * + * @param trainingDefinition the training definition + */ + public void removeTrainingDefinition(TrainingDefinition trainingDefinition) { + this.trainingDefinitions.remove(trainingDefinition); + } + + /** + * Adds instance to the set of training instances user can access + * + * @param trainingInstance the training instance + */ + public void addTrainingInstance(TrainingInstance trainingInstance) { + this.trainingInstances.add(trainingInstance); + } + + /** + * Removes instance from the set of training instances user can access + * + * @param trainingInstance the training instance + */ + public void removeTrainingInstance(TrainingInstance trainingInstance) { + this.trainingInstances.remove(trainingInstance); + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (!(o instanceof UserRef)) return false; + UserRef userRef = (UserRef) o; + return Objects.equals(getUserRefId(), userRef.getUserRefId()); + } + + @Override + public int hashCode() { + return Objects.hash(getUserRefId()); + } + + @Override + public String toString() { + return "UserRef{" + + "id=" + super.getId() + + ", userRefId=" + userRefId + + '}'; + } +} diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/domain/enums/TDState.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/domain/enums/TDState.java new file mode 100644 index 0000000000000000000000000000000000000000..e84b85330a303256130830ce9f54b544fa1bded7 --- /dev/null +++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/domain/enums/TDState.java @@ -0,0 +1,25 @@ +package cz.muni.ics.kypo.training.adaptive.domain.enums; + +/** + * States represented in Training Definition entity. + * + */ +public enum TDState { + + /** + * Privated definition state. + */ + PRIVATED, + /** + * Released definition state. + */ + RELEASED, + /** + * Archived definition state. + */ + ARCHIVED, + /** + * Unreleased definition state. + */ + UNRELEASED; +} diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/domain/enums/TRState.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/domain/enums/TRState.java new file mode 100644 index 0000000000000000000000000000000000000000..0ad7ee112237f6574d5c2164b8c76c4730b4cd3b --- /dev/null +++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/domain/enums/TRState.java @@ -0,0 +1,21 @@ +package cz.muni.ics.kypo.training.adaptive.domain.enums; + +/** + * States represented in Training Run entity. + * + */ +public enum TRState { + + /** + * Running run state. + */ + RUNNING, + /** + * Finished run state. + */ + FINISHED, + /** + * Archived run state. + */ + ARCHIVED; +} diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/domain/AbstractPhase.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/domain/phases/AbstractPhase.java similarity index 97% rename from src/main/java/cz/muni/ics/kypo/training/adaptive/domain/AbstractPhase.java rename to src/main/java/cz/muni/ics/kypo/training/adaptive/domain/phases/AbstractPhase.java index c2a77de28ea3639d482df5294f912f191db42173..0ea3b0079b55ffd814c8cfe8551ea2fc25861c4b 100644 --- a/src/main/java/cz/muni/ics/kypo/training/adaptive/domain/AbstractPhase.java +++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/domain/phases/AbstractPhase.java @@ -1,4 +1,4 @@ -package cz.muni.ics.kypo.training.adaptive.domain; +package cz.muni.ics.kypo.training.adaptive.domain.phases; import javax.persistence.Column; diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/domain/DecisionMatrixRow.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/domain/phases/DecisionMatrixRow.java similarity index 98% rename from src/main/java/cz/muni/ics/kypo/training/adaptive/domain/DecisionMatrixRow.java rename to src/main/java/cz/muni/ics/kypo/training/adaptive/domain/phases/DecisionMatrixRow.java index 964d9aa41fe0c9e4d824afa92dc6a915c2f93770..51a1fdc9d64dbcd91cd442fa8a57704d49aff0ef 100644 --- a/src/main/java/cz/muni/ics/kypo/training/adaptive/domain/DecisionMatrixRow.java +++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/domain/phases/DecisionMatrixRow.java @@ -1,4 +1,5 @@ -package cz.muni.ics.kypo.training.adaptive.domain; +package cz.muni.ics.kypo.training.adaptive.domain.phases; + import javax.persistence.Column; import javax.persistence.Entity; diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/domain/InfoPhase.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/domain/phases/InfoPhase.java similarity index 89% rename from src/main/java/cz/muni/ics/kypo/training/adaptive/domain/InfoPhase.java rename to src/main/java/cz/muni/ics/kypo/training/adaptive/domain/phases/InfoPhase.java index ccc0f87ffcebc6b32f543519b8f80e18d929f349..638bf26dd570375a07737e6ca7af41d8bf7b0e20 100644 --- a/src/main/java/cz/muni/ics/kypo/training/adaptive/domain/InfoPhase.java +++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/domain/phases/InfoPhase.java @@ -1,4 +1,4 @@ -package cz.muni.ics.kypo.training.adaptive.domain; +package cz.muni.ics.kypo.training.adaptive.domain.phases; import javax.persistence.Entity; import javax.persistence.Table; diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/domain/QuestionnairePhase.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/domain/phases/QuestionnairePhase.java similarity index 88% rename from src/main/java/cz/muni/ics/kypo/training/adaptive/domain/QuestionnairePhase.java rename to src/main/java/cz/muni/ics/kypo/training/adaptive/domain/phases/QuestionnairePhase.java index 85e53f08e5e2e5677c4fcca3a6375176b78ec124..dca2f9bad70ffdd6ac128060f7ef70145afe88c3 100644 --- a/src/main/java/cz/muni/ics/kypo/training/adaptive/domain/QuestionnairePhase.java +++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/domain/phases/QuestionnairePhase.java @@ -1,5 +1,7 @@ -package cz.muni.ics.kypo.training.adaptive.domain; +package cz.muni.ics.kypo.training.adaptive.domain.phases; +import cz.muni.ics.kypo.training.adaptive.domain.phases.questions.Question; +import cz.muni.ics.kypo.training.adaptive.domain.phases.questions.QuestionPhaseRelation; import cz.muni.ics.kypo.training.adaptive.enums.QuestionnaireType; import javax.persistence.CascadeType; diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/domain/Task.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/domain/phases/Task.java similarity index 90% rename from src/main/java/cz/muni/ics/kypo/training/adaptive/domain/Task.java rename to src/main/java/cz/muni/ics/kypo/training/adaptive/domain/phases/Task.java index 8a5cd20c69e6b3d8fb1e5f8a47bf9e70ff3f591a..0c4421c025e3f0f6d305d91842ad230aabfb30cd 100644 --- a/src/main/java/cz/muni/ics/kypo/training/adaptive/domain/Task.java +++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/domain/phases/Task.java @@ -1,4 +1,4 @@ -package cz.muni.ics.kypo.training.adaptive.domain; +package cz.muni.ics.kypo.training.adaptive.domain.phases; import javax.persistence.Column; import javax.persistence.Entity; @@ -27,7 +27,7 @@ public class Task implements Serializable { private String answer; private String solution; private int incorrectAnswerLimit; - private boolean isSandboxModified; + private boolean modifiedSandbox; private int sandboxChangeExpectedDuration; @Column(name = "order_in_training_phase", nullable = false) @@ -100,12 +100,12 @@ public class Task implements Serializable { this.trainingPhase = trainingPhase; } - public boolean isSandboxModified() { - return isSandboxModified; + public boolean isModifiedSandbox() { + return modifiedSandbox; } - public void setSandboxModified(boolean sandboxModified) { - isSandboxModified = sandboxModified; + public void setModifiedSandbox(boolean modifiedSandbox) { + this.modifiedSandbox = modifiedSandbox; } public int getSandboxChangeExpectedDuration() { @@ -125,7 +125,7 @@ public class Task implements Serializable { ", answer='" + answer + '\'' + ", solution='" + solution + '\'' + ", incorrectAnswerLimit=" + incorrectAnswerLimit + - ", isSandboxModified=" + isSandboxModified + + ", isSandboxModified=" + modifiedSandbox + ", sandboxChangeExpectedDuration=" + sandboxChangeExpectedDuration + ", order=" + order + ", trainingPhase=" + trainingPhase.getId() + diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/domain/TrainingPhase.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/domain/phases/TrainingPhase.java similarity index 94% rename from src/main/java/cz/muni/ics/kypo/training/adaptive/domain/TrainingPhase.java rename to src/main/java/cz/muni/ics/kypo/training/adaptive/domain/phases/TrainingPhase.java index be1db20ab43f314eef6258b2f61bff641484e8a9..ebf827eda4ef61c18bceca54bd7652935d25607b 100644 --- a/src/main/java/cz/muni/ics/kypo/training/adaptive/domain/TrainingPhase.java +++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/domain/phases/TrainingPhase.java @@ -1,4 +1,6 @@ -package cz.muni.ics.kypo.training.adaptive.domain; +package cz.muni.ics.kypo.training.adaptive.domain.phases; + +import cz.muni.ics.kypo.training.adaptive.domain.phases.questions.QuestionPhaseRelation; import javax.persistence.CascadeType; import javax.persistence.Entity; diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/domain/Question.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/domain/phases/questions/Question.java similarity index 95% rename from src/main/java/cz/muni/ics/kypo/training/adaptive/domain/Question.java rename to src/main/java/cz/muni/ics/kypo/training/adaptive/domain/phases/questions/Question.java index 4f02b68c4f239a213d47f7069199a2d85b94b9a5..2499f000b1ace56eadc106bbb97d598dc263ad1d 100644 --- a/src/main/java/cz/muni/ics/kypo/training/adaptive/domain/Question.java +++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/domain/phases/questions/Question.java @@ -1,5 +1,6 @@ -package cz.muni.ics.kypo.training.adaptive.domain; +package cz.muni.ics.kypo.training.adaptive.domain.phases.questions; +import cz.muni.ics.kypo.training.adaptive.domain.phases.QuestionnairePhase; import cz.muni.ics.kypo.training.adaptive.enums.QuestionType; import javax.persistence.CascadeType; diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/domain/QuestionChoice.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/domain/phases/questions/QuestionChoice.java similarity index 96% rename from src/main/java/cz/muni/ics/kypo/training/adaptive/domain/QuestionChoice.java rename to src/main/java/cz/muni/ics/kypo/training/adaptive/domain/phases/questions/QuestionChoice.java index 1aa21438b9876ffb2dbcc258a51affaa3e32b5f0..edcdde9c4faf38cab123a840c91b8d2e581725b4 100644 --- a/src/main/java/cz/muni/ics/kypo/training/adaptive/domain/QuestionChoice.java +++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/domain/phases/questions/QuestionChoice.java @@ -1,4 +1,4 @@ -package cz.muni.ics.kypo.training.adaptive.domain; +package cz.muni.ics.kypo.training.adaptive.domain.phases.questions; import javax.persistence.Column; import javax.persistence.Entity; diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/domain/QuestionPhaseRelation.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/domain/phases/questions/QuestionPhaseRelation.java similarity index 89% rename from src/main/java/cz/muni/ics/kypo/training/adaptive/domain/QuestionPhaseRelation.java rename to src/main/java/cz/muni/ics/kypo/training/adaptive/domain/phases/questions/QuestionPhaseRelation.java index 87fd9068daffc46e90cd74ce0001ab6f0edb3a63..d4ccfcc8fde7d8907ab63cbe2fc33dc78760dbb3 100644 --- a/src/main/java/cz/muni/ics/kypo/training/adaptive/domain/QuestionPhaseRelation.java +++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/domain/phases/questions/QuestionPhaseRelation.java @@ -1,4 +1,8 @@ -package cz.muni.ics.kypo.training.adaptive.domain; +package cz.muni.ics.kypo.training.adaptive.domain.phases.questions; + +import cz.muni.ics.kypo.training.adaptive.domain.phases.QuestionnairePhase; +import cz.muni.ics.kypo.training.adaptive.domain.phases.TrainingPhase; +import cz.muni.ics.kypo.training.adaptive.domain.phases.questions.Question; import javax.persistence.CascadeType; import javax.persistence.Column; diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/domain/training/TrainingDefinition.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/domain/training/TrainingDefinition.java new file mode 100644 index 0000000000000000000000000000000000000000..f5d07b89afc08653af05e1131e29c6e06301abbe --- /dev/null +++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/domain/training/TrainingDefinition.java @@ -0,0 +1,293 @@ +package cz.muni.ics.kypo.training.adaptive.domain.training; + +import cz.muni.ics.kypo.training.adaptive.domain.AbstractEntity; +import cz.muni.ics.kypo.training.adaptive.domain.UserRef; +import cz.muni.ics.kypo.training.adaptive.domain.enums.TDState; + +import javax.persistence.*; +import java.time.LocalDateTime; +import java.util.*; + +/** + * Class represents Training definition. + * Training instances can be created based on definitions. + */ +@Entity +@Table(name = "training_definition") +@NamedQueries({ + @NamedQuery( + name = "TrainingDefinition.findAllForOrganizers", + query = "SELECT DISTINCT td FROM TrainingDefinition td WHERE td.state = :state" + ), + @NamedQuery( + name = "TrainingDefinition.findAllForDesigners", + query = "SELECT DISTINCT td FROM TrainingDefinition td " + + "LEFT JOIN td.authors aut " + + "WHERE aut.userRefId = :userRefId AND td.state = 'UNRELEASED'" + ) +}) +public class TrainingDefinition extends AbstractEntity<Long> { + + @Column(name = "title", nullable = false) + private String title; + @Column(name = "description", nullable = true) + private String description; + @Column(name = "prerequisites", nullable = true) + private String[] prerequisites; + @Column(name = "outcomes", nullable = true) + private String[] outcomes; + @Column(name = "state", length = 128, nullable = false) + @Enumerated(EnumType.STRING) + private TDState state; + @ManyToMany(fetch = FetchType.LAZY, cascade = CascadeType.PERSIST) + @JoinTable(name = "training_definition_user_ref", + joinColumns = @JoinColumn(name = "training_definition_id"), + inverseJoinColumns = @JoinColumn(name = "user_ref_id") + ) + private Set<UserRef> authors = new HashSet<>(); + @Column(name = "show_stepper_bar", nullable = false) + private boolean showStepperBar; + @Column(name = "estimated_duration", nullable = true) + private long estimatedDuration; + @Column(name = "last_edited", nullable = false) + private LocalDateTime lastEdited; + + /** + * Gets unique identification number of Training definition + * + * @return the id + */ + public Long getId() { + return super.getId(); + } + + /** + * Sets unique identification number of Training definition + * + * @param id the id + */ + public void setId(Long id) { + super.setId(id); + } + + /** + * Gets title of Training definition + * + * @return the title + */ + public String getTitle() { + return title; + } + + /** + * Sets title of Training definition + * + * @param title the title + */ + public void setTitle(String title) { + this.title = title; + } + + /** + * Gets text description specifying info about Training definition + * + * @return the description + */ + public String getDescription() { + return description; + } + + /** + * Sets text description specifying info about Training definition + * + * @param description the description + */ + public void setDescription(String description) { + this.description = description; + } + + /** + * Gets skill prerequisites that trainee should have to be able to complete training runs created + * from this Training definition + * + * @return the string [ ] + */ + public String[] getPrerequisites() { + return prerequisites; + } + + /** + * Sets skill prerequisites that trainee should have to be able to complete training runs created + * from this Training definition + * + * @param prerequisites the prerequisities + */ + public void setPrerequisites(String[] prerequisites) { + this.prerequisites = prerequisites; + } + + /** + * Gets knowledge that trainee can learn from training runs created from this Training definition + * + * @return the string [ ] + */ + public String[] getOutcomes() { + return outcomes; + } + + /** + * Sets knowledge that trainee can learn from training runs created from this Training definition + * + * @param outcomes the outcomes + */ + public void setOutcomes(String[] outcomes) { + this.outcomes = outcomes; + } + + /** + * Gets development state in which is Training definition + * States are PRIVATED, RELEASED, ARCHIVED and UNRELEASED + * + * @return the state + */ + public TDState getState() { + return state; + } + + /** + * Sets development state in which is Training definition + * States are PRIVATED, RELEASED, ARCHIVED and UNRELEASED + * + * @param state the state + */ + public void setState(TDState state) { + this.state = state; + } + + /** + * Gets set of users that can make changes to the Training definition + * + * @return the authors + */ + public Set<UserRef> getAuthors() { + return Collections.unmodifiableSet(authors); + } + + /** + * Sets set of users that can make changes to the Training definition + * + * @param authors the authors + */ + public void setAuthors(Set<UserRef> authors) { + this.authors = authors; + } + + /** + * Adds user to the set of authors that can make changes to the Training definition + * + * @param authorRef the author ref + */ + public void addAuthor(UserRef authorRef) { + this.authors.add(authorRef); + authorRef.addTrainingDefinition(this); + } + + /** + * Remove authors with given ids from the set of authors. + * + * @param userRefIds ids of the authors to be removed. + */ + public void removeAuthorsByUserRefIds(Set<Long> userRefIds) { + this.authors.removeIf(userRef -> userRefIds.contains(userRef.getUserRefId())); + } + + /** + * Gets if stepper bar is shown while in run. + * + * @return true if bar is shown + */ + public boolean isShowStepperBar() { + return showStepperBar; + } + + /** + * Sets if stepper bar is shown while in run. + * + * @param showStepperBar true if bar is shown + */ + public void setShowStepperBar(boolean showStepperBar) { + this.showStepperBar = showStepperBar; + } + + /** + * Gets estimated duration in minutes that it should take to complete run based on given Training definition + * + * @return the estimated duration + */ + public long getEstimatedDuration() { + return estimatedDuration; + } + + /** + * Sets estimated duration in minutes that it should take to complete run based on given Training definition + * + * @param estimatedDuration the estimated duration + */ + public void setEstimatedDuration(long estimatedDuration) { + this.estimatedDuration = estimatedDuration; + } + + /** + * Gets time of last edit done to Training Definition + * + * @return the last edited + */ + public LocalDateTime getLastEdited() { + return lastEdited; + } + + /** + * Sets time of last edit done to Training Definition + * + * @param lastEdited the last edited + */ + public void setLastEdited(LocalDateTime lastEdited) { + this.lastEdited = lastEdited; + } + + @Override + public int hashCode() { + return Objects.hash(description, outcomes, prerequisites, state, title); + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (!(obj instanceof TrainingDefinition)) + return false; + TrainingDefinition other = (TrainingDefinition) obj; + return Objects.equals(description, other.getDescription()) + && Arrays.equals(outcomes, other.getOutcomes()) + && Arrays.equals(prerequisites, other.getPrerequisites()) + && Objects.equals(state, other.getState()) + && Objects.equals(title, other.getTitle()); + } + + @Override + public String toString() { + return "TrainingDefinition{" + + "id=" + super.getId() + + ", title='" + title + '\'' + + ", description='" + description + '\'' + + ", prerequisities=" + Arrays.toString(prerequisites) + + ", outcomes=" + Arrays.toString(outcomes) + + ", state=" + state + + ", showStepperBar=" + showStepperBar + + ", estimatedDuration=" + estimatedDuration + + ", lastEdited=" + lastEdited + + '}'; + } +} diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/domain/training/TrainingInstance.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/domain/training/TrainingInstance.java new file mode 100644 index 0000000000000000000000000000000000000000..5e80535224f2e5f8bcf9774f75c3341a50a5b8a8 --- /dev/null +++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/domain/training/TrainingInstance.java @@ -0,0 +1,288 @@ +package cz.muni.ics.kypo.training.adaptive.domain.training; + +import cz.muni.ics.kypo.training.adaptive.domain.AbstractEntity; +import cz.muni.ics.kypo.training.adaptive.domain.UserRef; + +import javax.persistence.*; +import java.time.LocalDateTime; +import java.util.Collections; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; + +/** + * Class represents Training instance. + * Training instances can be created based on definitions. + * Training runs can be created based on instances. + */ +@Entity +@Table(name = "training_instance") +@NamedEntityGraphs({ + @NamedEntityGraph( + name = "TrainingInstance.findAllAuthorsOrganizers", + attributeNodes = { + @NamedAttributeNode(value = "organizers"), + @NamedAttributeNode(value = "trainingDefinition", subgraph = "trainingDefinition"), + }, + subgraphs = { + @NamedSubgraph(name = "trainingDefinition", attributeNodes = { + @NamedAttributeNode(value = "authors"), + }), + } + ), + @NamedEntityGraph( + name = "TrainingInstance.findByIdAuthorsOrganizers", + attributeNodes = { + @NamedAttributeNode(value = "organizers"), + @NamedAttributeNode(value = "trainingDefinition", subgraph = "trainingDefinition.authors") + }, + subgraphs = { + @NamedSubgraph(name = "trainingDefinition.authors", attributeNodes = @NamedAttributeNode(value = "authors")) + } + ) +}) +@NamedQueries({ + @NamedQuery( + name = "TrainingInstance.findByStartTimeAfterAndEndTimeBeforeAndAccessToken", + query = "SELECT ti FROM TrainingInstance ti " + + "JOIN FETCH ti.trainingDefinition td " + + "WHERE ti.startTime < :datetime AND ti.endTime > :datetime AND ti.accessToken = :accessToken" + ), + @NamedQuery( + name = "TrainingInstance.findByIdIncludingDefinition", + query = "SELECT ti FROM TrainingInstance ti " + + "LEFT OUTER JOIN FETCH ti.organizers " + + "JOIN FETCH ti.trainingDefinition td " + + "LEFT OUTER JOIN FETCH td.authors " + + "WHERE ti.id = :instanceId" + ), + @NamedQuery( + name = "TrainingInstance.findAllByTrainingDefinitionId", + query = "SELECT ti FROM TrainingInstance ti JOIN FETCH ti.trainingDefinition td WHERE td.id = :trainingDefId" + ), + @NamedQuery( + name = "TrainingInstance.existsAnyForTrainingDefinition", + query = "SELECT (COUNT(ti) > 0) FROM TrainingInstance ti " + + "INNER JOIN ti.trainingDefinition td WHERE td.id = :trainingDefinitionId" + ), + @NamedQuery( + name = "TrainingInstance.isFinished", + query = "SELECT (COUNT(ti) > 0) FROM TrainingInstance ti WHERE ti.id = :instanceId AND ti.endTime < :currentTime" + ) +}) +public class TrainingInstance extends AbstractEntity<Long> { + + @Column(name = "start_time", nullable = false) + private LocalDateTime startTime; + @Column(name = "end_time", nullable = false) + private LocalDateTime endTime; + @Column(name = "title", nullable = false) + private String title; + @Column(name = "pool_id") + private Long poolId; + @Column(name = "access_token", nullable = false, unique = true) + private String accessToken; + @ManyToOne(fetch = FetchType.LAZY) + private TrainingDefinition trainingDefinition; + @ManyToMany(fetch = FetchType.LAZY, cascade = CascadeType.PERSIST) + @JoinTable(name = "training_instance_user_ref", + joinColumns = @JoinColumn(name = "training_instance_id"), + inverseJoinColumns = @JoinColumn(name = "user_ref_id") + ) + private Set<UserRef> organizers = new HashSet<>(); + + /** + * Gets unique identification number of Training instance + * + * @return the id + */ + public Long getId() { + return super.getId(); + } + + /** + * Sets unique identification number of Training instance + * + * @param id the id + */ + public void setId(Long id) { + super.setId(id); + } + + /** + * Gets initiation time of Training instance + * + * @return the start time + */ + public LocalDateTime getStartTime() { + return startTime; + } + + /** + * Sets initiation time of Training instance + * + * @param startTime the start time + */ + public void setStartTime(LocalDateTime startTime) { + this.startTime = startTime; + } + + /** + * Gets finish time of Training instance + * + * @return the end time + */ + public LocalDateTime getEndTime() { + return endTime; + } + + /** + * Sets finish time of Training instance + * + * @param endTime the end time + */ + public void setEndTime(LocalDateTime endTime) { + this.endTime = endTime; + } + + /** + * Gets access token needed to start Training runs associated with given Training Instance + * + * @return the access token + */ + public String getAccessToken() { + return accessToken; + } + + /** + * Sets access token needed to start Training runs associated with given Training Instance + * + * @param accessToken the access token + */ + public void setAccessToken(String accessToken) { + this.accessToken = accessToken; + } + + /** + * Gets title of Training Instance + * + * @return the title + */ + public String getTitle() { + return title; + } + + /** + * Sets title of Training Instance + * + * @param title the title + */ + public void setTitle(String title) { + this.title = title; + } + + /** + * Gets unique identification number of sandbox pool associated with given Training instance + * + * @return the pool id + */ + public Long getPoolId() { + return poolId; + } + + /** + * Sets unique identification number of sandbox pool associated with given Training instance + * + * @param poolId the pool id + */ + public void setPoolId(Long poolId) { + this.poolId = poolId; + } + + /** + * Gets Training definition associated with given Training instance + * + * @return the training definition + */ + public TrainingDefinition getTrainingDefinition() { + return trainingDefinition; + } + + /** + * Sets Training definition associated with given Training instance + * + * @param trainingDefinition the training definition + */ + public void setTrainingDefinition(TrainingDefinition trainingDefinition) { + this.trainingDefinition = trainingDefinition; + } + + /** + * Gets set of users that can make changes to the Training instance + * + * @return the organizers + */ + public Set<UserRef> getOrganizers() { + return Collections.unmodifiableSet(organizers); + } + + /** + * Sets set of users that can make changes to the Training instance + * + * @param organizers the organizers + */ + public void setOrganizers(Set<UserRef> organizers) { + this.organizers = organizers; + } + + /** + * Adds user to the set of users that can make changes to the Training instance + * + * @param userRef the user ref + */ + public void addOrganizer(UserRef userRef) { + this.organizers.add(userRef); + userRef.addTrainingInstance(this); + } + + /** + * Remove organizers with given ids from the set of organizers. + * + * @param userRefIds ids of the organizers to be removed. + */ + public void removeOrganizersByUserRefIds(Set<Long> userRefIds) { + this.organizers.removeIf(userRef -> userRefIds.contains(userRef.getUserRefId())); + } + + @Override + public int hashCode() { + return Objects.hash(accessToken, startTime, endTime, title, trainingDefinition); + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (!(obj instanceof TrainingInstance)) + return false; + TrainingInstance other = (TrainingInstance) obj; + return Objects.equals(accessToken, other.getAccessToken()) + && Objects.equals(startTime, other.getStartTime()) + && Objects.equals(endTime, other.getEndTime()) + && Objects.equals(title, other.getTitle()) + && Objects.equals(trainingDefinition, other.getTrainingDefinition()); + } + + @Override + public String toString() { + return "TrainingInstance{" + + "id=" + super.getId() + + ", startTime=" + startTime + + ", endTime=" + endTime + + ", title='" + title + '\'' + + ", accessToken='" + accessToken + '\'' + + '}'; + } +} diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/domain/training/TrainingRun.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/domain/training/TrainingRun.java new file mode 100644 index 0000000000000000000000000000000000000000..a112cdd5fe6c455f3eff941aff2277fc1a977093 --- /dev/null +++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/domain/training/TrainingRun.java @@ -0,0 +1,414 @@ +package cz.muni.ics.kypo.training.adaptive.domain.training; + +import cz.muni.ics.kypo.training.adaptive.domain.AbstractEntity; +import cz.muni.ics.kypo.training.adaptive.domain.UserRef; +import cz.muni.ics.kypo.training.adaptive.domain.phases.AbstractPhase; +import cz.muni.ics.kypo.training.adaptive.domain.phases.InfoPhase; +import cz.muni.ics.kypo.training.adaptive.domain.enums.TRState; +import org.hibernate.annotations.Type; + +import javax.persistence.*; +import java.time.LocalDateTime; +import java.util.Objects; + +/** + * Class represents Training run. + * Training runs can be created based on instances. + * Training runs are accessed by trainees + */ +@Entity +@Table(name = "training_run") +@NamedEntityGraphs({ + @NamedEntityGraph( + name = "TrainingRun.findAllParticipantRef", + attributeNodes = @NamedAttributeNode(value = "participantRef") + ), + @NamedEntityGraph( + name = "TrainingRun.findByIdParticipantRefTrainingInstance", + attributeNodes = { + @NamedAttributeNode(value = "participantRef"), + @NamedAttributeNode(value = "trainingInstance") + } + ) +}) +@NamedQueries({ + @NamedQuery( + name = "TrainingRun.findRunningTrainingRunOfUser", + query = "SELECT tr FROM TrainingRun tr " + + "JOIN FETCH tr.trainingInstance ti " + + "JOIN FETCH tr.participantRef pr " + + "JOIN FETCH tr.currentPhase " + + "WHERE ti.accessToken = :accessToken AND pr.userRefId = :userRefId AND tr.sandboxInstanceRefId IS NOT NULL AND tr.state NOT LIKE 'FINISHED'" + ), + @NamedQuery( + name = "TrainingRun.findByIdWithLevel", + query = "SELECT tr FROM TrainingRun tr " + + "JOIN FETCH tr.currentPhase " + + "JOIN FETCH tr.trainingInstance ti " + + "JOIN FETCH ti.trainingDefinition " + + "WHERE tr.id= :trainingRunId", + lockMode = LockModeType.PESSIMISTIC_WRITE + ), + @NamedQuery( + name = "TrainingRun.deleteTrainingRunsByTrainingInstance", + query = "DELETE FROM TrainingRun tr WHERE tr.trainingInstance.id = :trainingInstanceId" + ), + @NamedQuery( + name = "TrainingRun.existsAnyForTrainingInstance", + query = "SELECT (COUNT(tr) > 0) FROM TrainingRun tr INNER JOIN tr.trainingInstance ti WHERE ti.id = :trainingInstanceId" + ), + @NamedQuery( + name = "TrainingRun.findAllByParticipantRefId", + query = "SELECT tr FROM TrainingRun tr " + + "INNER JOIN tr.participantRef pr " + + "INNER JOIN tr.trainingInstance ti " + + "INNER JOIN ti.trainingDefinition " + + "WHERE pr.userRefId = :userRefId" + ), + @NamedQuery( + name = "TrainingRun.findAllByTrainingDefinitionIdAndParticipantUserRefId", + query = "SELECT tr FROM TrainingRun tr " + + "INNER JOIN tr.participantRef pr " + + "INNER JOIN tr.trainingInstance ti " + + "INNER JOIN ti.trainingDefinition td " + + "WHERE td.id = :trainingDefinitionId AND pr.userRefId = :userRefId" + ), + @NamedQuery( + name = "TrainingRun.findAllActiveByTrainingInstanceId", + query = "SELECT tr FROM TrainingRun tr " + + "INNER JOIN tr.trainingInstance ti " + + "WHERE ti.id = :trainingInstanceId AND tr.state <> 'ARCHIVED'" + ), + @NamedQuery( + name = "TrainingRun.findAllInactiveByTrainingInstanceId", + query = "SELECT tr FROM TrainingRun tr " + + "INNER JOIN tr.trainingInstance ti " + + "WHERE ti.id = :trainingInstanceId AND tr.state = 'ARCHIVED'" + ), + @NamedQuery( + name = "TrainingRun.findAllByTrainingDefinitionId", + query = "SELECT tr FROM TrainingRun tr " + + "INNER JOIN tr.trainingInstance ti " + + "INNER JOIN ti.trainingDefinition td " + + "WHERE td.id = :trainingDefinitionId" + ) +}) +public class TrainingRun extends AbstractEntity<Long> { + + @Column(name = "start_time", nullable = false) + private LocalDateTime startTime; + @Column(name = "end_time", nullable = false) + private LocalDateTime endTime; + @Column(name = "state", length = 128, nullable = false) + @Enumerated(EnumType.STRING) + private TRState state; + @Column(name = "incorrect_flag_count", nullable = false) + private int incorrectFlagCount; + @Column(name = "solution_taken", nullable = false) + private boolean solutionTaken; + @ManyToOne(fetch = FetchType.LAZY, optional = false) + private AbstractPhase currentPhase; + @Column(name = "current_task_order", nullable = false) + private Integer currentTaskOrder; + @ManyToOne(fetch = FetchType.LAZY, optional = false) + private TrainingInstance trainingInstance; + @Column(name = "sandbox_instance_ref_id") + private Long sandboxInstanceRefId; + @ManyToOne(fetch = FetchType.LAZY) + @JoinColumn(name = "user_ref_id", nullable = false) + private UserRef participantRef; + @Lob + @Type(type = "org.hibernate.type.TextType") + @Column(name = "assessment_responses", nullable = true) + private String assessmentResponses; + @Column(name = "level_answered") + private boolean levelAnswered; + @Column(name = "previous_sandbox_instance_ref_id") + private Long previousSandboxInstanceRefId; + + /** + * Gets unique identification number of Training run + * + * @return the id + */ + public Long getId() { + return super.getId(); + } + + /** + * Sets unique identification number of Training run + * + * @param id the id + */ + public void setId(Long id) { + super.setId(id); + } + + /** + * Gets initiation time of Training run + * + * @return the start time + */ + public LocalDateTime getStartTime() { + return startTime; + } + + /** + * Sets initiation time of Training run + * + * @param startTime the start time + */ + public void setStartTime(LocalDateTime startTime) { + this.startTime = startTime; + } + + /** + * Gets finish time of Training run + * + * @return the end time + */ + public LocalDateTime getEndTime() { + return endTime; + } + + /** + * Sets finish time of Training run + * + * @param endTime the end time + */ + public void setEndTime(LocalDateTime endTime) { + this.endTime = endTime; + } + + /** + * Gets completion state of Training run + * States are RUNNING, FINISHED, ARCHIVED + * + * @return the state + */ + public TRState getState() { + return state; + } + + /** + * Sets completion state of Training run + * States are RUNNING, FINISHED, ARCHIVED + * + * @param state the state + */ + public void setState(TRState state) { + this.state = state; + } + + /** + * Gets phase that is currently being displayed to the trainee + * + * @return the current phase + */ + public AbstractPhase getCurrentPhase() { + return currentPhase; + } + + /** + * Sets level that is currently being displayed to the trainee + * Sets default data about level to training run + * + * @param currentPhase the current phase + */ + public void setCurrentPhase(AbstractPhase currentPhase) { + this.levelAnswered = currentPhase instanceof InfoPhase; + this.solutionTaken = false; + this.currentPhase = currentPhase; + } + + public Integer getCurrentTaskOrder() { + return currentTaskOrder; + } + + public void setCurrentTaskOrder(Integer currentTaskOrder) { + this.currentTaskOrder = currentTaskOrder; + } + + /** + * Gets Training instance associated to Training run + * + * @return the training instance + */ + public TrainingInstance getTrainingInstance() { + return trainingInstance; + } + + /** + * Sets Training instance associated to Training run + * + * @param trainingInstance the training instance + */ + public void setTrainingInstance(TrainingInstance trainingInstance) { + this.trainingInstance = trainingInstance; + } + + /** + * Gets id of sandbox instance associated with Training run + * + * @return the sandbox instance ref id + */ + public Long getSandboxInstanceRefId() { + return sandboxInstanceRefId; + } + + /** + * Sets id of sandbox instance associated with Training run + * + * @param sandboxInstanceRefId the sandbox instance ref id + */ + public void setSandboxInstanceRefId(Long sandboxInstanceRefId) { + this.sandboxInstanceRefId = sandboxInstanceRefId; + } + + /** + * Gets number of failed attempts by trainee to submit correct flag on current level + * + * @return the incorrect flag count + */ + public int getIncorrectFlagCount() { + return incorrectFlagCount; + } + + /** + * Sets number of failed attempts trainee can submit on current level + * + * @param incorrectFlagCount the incorrect flag count + */ + public void setIncorrectFlagCount(int incorrectFlagCount) { + this.incorrectFlagCount = incorrectFlagCount; + } + + /** + * Gets solution was taken on current level + * + * @return the boolean + */ + public boolean isSolutionTaken() { + return solutionTaken; + } + + /** + * Sets solution was taken on current level + * + * @param solutionTaken the solution taken + */ + public void setSolutionTaken(boolean solutionTaken) { + this.solutionTaken = solutionTaken; + } + + /** + * Gets responses of current assessment level + * + * @return the assessment responses + */ + public String getAssessmentResponses() { + return assessmentResponses; + } + + /** + * Sets responses of current assessment level + * + * @param assessmentResponses the assessment responses + */ + public void setAssessmentResponses(String assessmentResponses) { + this.assessmentResponses = assessmentResponses; + } + + /** + * Gets DB reference of trainee + * + * @return the participant ref + */ + public UserRef getParticipantRef() { + return participantRef; + } + + /** + * Sets DB reference of trainee + * + * @param participantRef the participant ref + */ + public void setParticipantRef(UserRef participantRef) { + this.participantRef = participantRef; + } + + /** + * Gets if level was answered + * + * @return the boolean + */ + public boolean isLevelAnswered() { + return levelAnswered; + } + + /** + * Sets if level was answered + * + * @param levelAnswered the level answered + */ + public void setLevelAnswered(boolean levelAnswered) { + this.levelAnswered = levelAnswered; + } + + /** + * Gets id of previous sandbox instance ref assigned by training run. + * + * @return the id of previous sandbox instance ref + */ + public Long getPreviousSandboxInstanceRefId() { + return previousSandboxInstanceRefId; + } + + /** + * Sets previous sandbox instance ref ID + * + * @param previousSandboxInstanceRefId the id of previous sandbox instance ref + */ + public void setPreviousSandboxInstanceRefId(Long previousSandboxInstanceRefId) { + this.previousSandboxInstanceRefId = previousSandboxInstanceRefId; + } + + @Override + public int hashCode() { + return Objects.hash(currentPhase, startTime, endTime, state, trainingInstance, incorrectFlagCount); + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (!(obj instanceof TrainingRun)) + return false; + TrainingRun other = (TrainingRun) obj; + return Objects.equals(currentPhase, other.getCurrentPhase()) + && Objects.equals(startTime, other.getStartTime()) + && Objects.equals(endTime, other.getEndTime()) + && Objects.equals(state, other.getState()) + && Objects.equals(incorrectFlagCount, other.getIncorrectFlagCount()) + && Objects.equals(trainingInstance, other.getTrainingInstance()) + && Objects.equals(participantRef, other.getParticipantRef()) + && Objects.equals(solutionTaken, other.isSolutionTaken()); + } + + @Override + public String toString() { + return "TrainingRun{" + + "id=" + super.getId() + + ", startTime=" + startTime + + ", endTime=" + endTime + + ", state=" + state + + ", incorrectFlagCount=" + incorrectFlagCount + + ", solutionTaken=" + solutionTaken + + ", currentPhase=" + currentPhase + + ", sandboxInstanceRefId=" + sandboxInstanceRefId + + ", levelAnswered=" + levelAnswered + + '}'; + } +} diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/mapper/BeanMapper.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/mapper/BeanMapper.java index 192e806c87e91ceaa035497ea765f44a0edf3b6f..e8fe737f1ed450435fa7dba5ce8cf72ae686a2dc 100644 --- a/src/main/java/cz/muni/ics/kypo/training/adaptive/mapper/BeanMapper.java +++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/mapper/BeanMapper.java @@ -1,14 +1,14 @@ package cz.muni.ics.kypo.training.adaptive.mapper; -import cz.muni.ics.kypo.training.adaptive.domain.AbstractPhase; -import cz.muni.ics.kypo.training.adaptive.domain.DecisionMatrixRow; -import cz.muni.ics.kypo.training.adaptive.domain.InfoPhase; -import cz.muni.ics.kypo.training.adaptive.domain.Question; -import cz.muni.ics.kypo.training.adaptive.domain.QuestionChoice; -import cz.muni.ics.kypo.training.adaptive.domain.QuestionPhaseRelation; -import cz.muni.ics.kypo.training.adaptive.domain.QuestionnairePhase; -import cz.muni.ics.kypo.training.adaptive.domain.Task; -import cz.muni.ics.kypo.training.adaptive.domain.TrainingPhase; +import cz.muni.ics.kypo.training.adaptive.domain.phases.AbstractPhase; +import cz.muni.ics.kypo.training.adaptive.domain.phases.DecisionMatrixRow; +import cz.muni.ics.kypo.training.adaptive.domain.phases.InfoPhase; +import cz.muni.ics.kypo.training.adaptive.domain.phases.questions.Question; +import cz.muni.ics.kypo.training.adaptive.domain.phases.questions.QuestionChoice; +import cz.muni.ics.kypo.training.adaptive.domain.phases.questions.QuestionPhaseRelation; +import cz.muni.ics.kypo.training.adaptive.domain.phases.QuestionnairePhase; +import cz.muni.ics.kypo.training.adaptive.domain.phases.Task; +import cz.muni.ics.kypo.training.adaptive.domain.phases.TrainingPhase; import cz.muni.ics.kypo.training.adaptive.dto.AbstractPhaseDTO; import cz.muni.ics.kypo.training.adaptive.dto.info.InfoPhaseDTO; import cz.muni.ics.kypo.training.adaptive.dto.info.InfoPhaseUpdateDTO; diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/repository/AbstractPhaseRepository.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/repository/AbstractPhaseRepository.java index b3613abbebfdfe90c156ea7f0e36178668fef5d7..469917595f28a2d9e9c2abf0b8f95550c4ecbc1a 100644 --- a/src/main/java/cz/muni/ics/kypo/training/adaptive/repository/AbstractPhaseRepository.java +++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/repository/AbstractPhaseRepository.java @@ -1,6 +1,6 @@ package cz.muni.ics.kypo.training.adaptive.repository; -import cz.muni.ics.kypo.training.adaptive.domain.AbstractPhase; +import cz.muni.ics.kypo.training.adaptive.domain.phases.AbstractPhase; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Modifying; import org.springframework.data.jpa.repository.Query; diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/repository/InfoPhaseRepository.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/repository/InfoPhaseRepository.java index bafec1c8f685565b1f6461b512551c42e49f99ea..6332c75de7dd3dc0c9dd73b362b8d2c908bf0d78 100644 --- a/src/main/java/cz/muni/ics/kypo/training/adaptive/repository/InfoPhaseRepository.java +++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/repository/InfoPhaseRepository.java @@ -1,6 +1,6 @@ package cz.muni.ics.kypo.training.adaptive.repository; -import cz.muni.ics.kypo.training.adaptive.domain.InfoPhase; +import cz.muni.ics.kypo.training.adaptive.domain.phases.InfoPhase; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/repository/QuestionPhaseRelationRepository.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/repository/QuestionPhaseRelationRepository.java index a79d1229070bca9ac526af0b62e2af5476bdd917..512036d2da652ec285bc79e6d7d03e86711fcb67 100644 --- a/src/main/java/cz/muni/ics/kypo/training/adaptive/repository/QuestionPhaseRelationRepository.java +++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/repository/QuestionPhaseRelationRepository.java @@ -1,6 +1,6 @@ package cz.muni.ics.kypo.training.adaptive.repository; -import cz.muni.ics.kypo.training.adaptive.domain.QuestionPhaseRelation; +import cz.muni.ics.kypo.training.adaptive.domain.phases.questions.QuestionPhaseRelation; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/repository/QuestionRepository.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/repository/QuestionRepository.java index f20e7080473e2ebcca5bfc68f8714ec557b1bc4f..a0e87334c91ba8478c226caefb00d0cdbc6dc3cc 100644 --- a/src/main/java/cz/muni/ics/kypo/training/adaptive/repository/QuestionRepository.java +++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/repository/QuestionRepository.java @@ -1,6 +1,6 @@ package cz.muni.ics.kypo.training.adaptive.repository; -import cz.muni.ics.kypo.training.adaptive.domain.Question; +import cz.muni.ics.kypo.training.adaptive.domain.phases.questions.Question; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/repository/QuestionnairePhaseRepository.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/repository/QuestionnairePhaseRepository.java index 9a0362d4804a117142e94a044de8288a3b168e28..7f016a61b3e2fae841c07dce9e37100312ad2b6f 100644 --- a/src/main/java/cz/muni/ics/kypo/training/adaptive/repository/QuestionnairePhaseRepository.java +++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/repository/QuestionnairePhaseRepository.java @@ -1,6 +1,6 @@ package cz.muni.ics.kypo.training.adaptive.repository; -import cz.muni.ics.kypo.training.adaptive.domain.QuestionnairePhase; +import cz.muni.ics.kypo.training.adaptive.domain.phases.QuestionnairePhase; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/repository/TaskRepository.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/repository/TaskRepository.java index a5bf4e245e944bef02c83be0d7a3cfbf2f6f2f7a..c0b32edfd770d7ba414de0e1f001855c5e335e7c 100644 --- a/src/main/java/cz/muni/ics/kypo/training/adaptive/repository/TaskRepository.java +++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/repository/TaskRepository.java @@ -1,6 +1,6 @@ package cz.muni.ics.kypo.training.adaptive.repository; -import cz.muni.ics.kypo.training.adaptive.domain.Task; +import cz.muni.ics.kypo.training.adaptive.domain.phases.Task; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Modifying; import org.springframework.data.jpa.repository.Query; diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/repository/TrainingPhaseRepository.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/repository/TrainingPhaseRepository.java index d09677540354b053fb632cd42e9b8bf3cf8d0a57..13518e74687c7d50e98b704654b2b1f9671cfade 100644 --- a/src/main/java/cz/muni/ics/kypo/training/adaptive/repository/TrainingPhaseRepository.java +++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/repository/TrainingPhaseRepository.java @@ -1,6 +1,6 @@ package cz.muni.ics.kypo.training.adaptive.repository; -import cz.muni.ics.kypo.training.adaptive.domain.TrainingPhase; +import cz.muni.ics.kypo.training.adaptive.domain.phases.TrainingPhase; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.query.Param; diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/service/InfoPhaseService.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/service/InfoPhaseService.java index 557d3466fb30108c1205b901dca5aac254267aa7..a62d7f80d60e03bfd4feb5d4948ff192bf654204 100644 --- a/src/main/java/cz/muni/ics/kypo/training/adaptive/service/InfoPhaseService.java +++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/service/InfoPhaseService.java @@ -1,6 +1,6 @@ package cz.muni.ics.kypo.training.adaptive.service; -import cz.muni.ics.kypo.training.adaptive.domain.InfoPhase; +import cz.muni.ics.kypo.training.adaptive.domain.phases.InfoPhase; import cz.muni.ics.kypo.training.adaptive.dto.info.InfoPhaseDTO; import cz.muni.ics.kypo.training.adaptive.dto.info.InfoPhaseUpdateDTO; import cz.muni.ics.kypo.training.adaptive.mapper.BeanMapper; diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/service/PhaseService.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/service/PhaseService.java index db837ce5901184f5bedffcc0b9b78d4e3124ac5a..be6def7838d5a121f1f052100db9192641e87ab7 100644 --- a/src/main/java/cz/muni/ics/kypo/training/adaptive/service/PhaseService.java +++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/service/PhaseService.java @@ -1,6 +1,6 @@ package cz.muni.ics.kypo.training.adaptive.service; -import cz.muni.ics.kypo.training.adaptive.domain.AbstractPhase; +import cz.muni.ics.kypo.training.adaptive.domain.phases.AbstractPhase; import cz.muni.ics.kypo.training.adaptive.dto.AbstractPhaseDTO; import cz.muni.ics.kypo.training.adaptive.mapper.BeanMapper; import cz.muni.ics.kypo.training.adaptive.repository.AbstractPhaseRepository; diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/service/QuestionnairePhaseService.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/service/QuestionnairePhaseService.java index 04ed529a647a0ca54fcc63b4169d03aabd5e11b9..1b389bb9bbd9ee6bf1e43c8e61f37e5833a644da 100644 --- a/src/main/java/cz/muni/ics/kypo/training/adaptive/service/QuestionnairePhaseService.java +++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/service/QuestionnairePhaseService.java @@ -1,9 +1,9 @@ package cz.muni.ics.kypo.training.adaptive.service; -import cz.muni.ics.kypo.training.adaptive.domain.Question; -import cz.muni.ics.kypo.training.adaptive.domain.QuestionPhaseRelation; -import cz.muni.ics.kypo.training.adaptive.domain.QuestionnairePhase; -import cz.muni.ics.kypo.training.adaptive.domain.TrainingPhase; +import cz.muni.ics.kypo.training.adaptive.domain.phases.questions.Question; +import cz.muni.ics.kypo.training.adaptive.domain.phases.questions.QuestionPhaseRelation; +import cz.muni.ics.kypo.training.adaptive.domain.phases.QuestionnairePhase; +import cz.muni.ics.kypo.training.adaptive.domain.phases.TrainingPhase; import cz.muni.ics.kypo.training.adaptive.dto.PhaseCreateDTO; import cz.muni.ics.kypo.training.adaptive.dto.questionnaire.QuestionPhaseRelationDTO; import cz.muni.ics.kypo.training.adaptive.dto.questionnaire.QuestionnairePhaseDTO; diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/service/TaskService.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/service/TaskService.java index 67ccb756d62c6aa87d3ec87092b3dda88706b490..d90fc4c96bc55207fc82228c0c72d1e81b0ae9b4 100644 --- a/src/main/java/cz/muni/ics/kypo/training/adaptive/service/TaskService.java +++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/service/TaskService.java @@ -1,7 +1,7 @@ package cz.muni.ics.kypo.training.adaptive.service; -import cz.muni.ics.kypo.training.adaptive.domain.Task; -import cz.muni.ics.kypo.training.adaptive.domain.TrainingPhase; +import cz.muni.ics.kypo.training.adaptive.domain.phases.Task; +import cz.muni.ics.kypo.training.adaptive.domain.phases.TrainingPhase; import cz.muni.ics.kypo.training.adaptive.dto.training.TaskCopyDTO; import cz.muni.ics.kypo.training.adaptive.dto.training.TaskDTO; import cz.muni.ics.kypo.training.adaptive.dto.training.TaskUpdateDTO; diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/service/TrainingPhaseService.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/service/TrainingPhaseService.java index eb966328881ed69d2ed02badf9162fec60e9dd8f..9ae890e836d98ae8d4a19d3c92ba66542f7783d8 100644 --- a/src/main/java/cz/muni/ics/kypo/training/adaptive/service/TrainingPhaseService.java +++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/service/TrainingPhaseService.java @@ -1,7 +1,7 @@ package cz.muni.ics.kypo.training.adaptive.service; -import cz.muni.ics.kypo.training.adaptive.domain.DecisionMatrixRow; -import cz.muni.ics.kypo.training.adaptive.domain.TrainingPhase; +import cz.muni.ics.kypo.training.adaptive.domain.phases.DecisionMatrixRow; +import cz.muni.ics.kypo.training.adaptive.domain.phases.TrainingPhase; import cz.muni.ics.kypo.training.adaptive.dto.training.TrainingPhaseDTO; import cz.muni.ics.kypo.training.adaptive.dto.training.TrainingPhaseUpdateDTO; import cz.muni.ics.kypo.training.adaptive.mapper.BeanMapper; diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index a31816f8448efd57f0aab12ecfcdfa5c167a584c..d20a87fb6b442fc46daa26bd548650613578bb8e 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -3,3 +3,5 @@ server.servlet.context-path=/kypo-adaptive-training-rest/api/v1/ spring.h2.console.enabled=true spring.h2.console.path=/h2-console +spring.flyway.enabled=false +user-and-group-server.uri=https://localhost:8084/kypo2-user-and-group-rest/api/v1/ \ No newline at end of file diff --git a/src/main/resources/db/migration/V1__db_adaptive_trainings_schema.sql b/src/main/resources/db/migration/V1__db_adaptive_trainings_schema.sql new file mode 100644 index 0000000000000000000000000000000000000000..fc04820012cea65b19b4efe6b961bfd6f1e1dce2 --- /dev/null +++ b/src/main/resources/db/migration/V1__db_adaptive_trainings_schema.sql @@ -0,0 +1,186 @@ +-- USER_REF +create table user_ref ( + id bigserial not null, + user_ref_id int8 not null, + primary key (id) +); + +-- TRAINING +create table training_definition ( + id bigserial not null, + description text, + last_edited timestamp not null, + estimated_duration int8, + outcomes bytea, + prerequisites bytea, + show_stepper_bar boolean not null, + state varchar(128) not null, + title varchar(255) not null, + primary key (id) +); + +create table training_definition_user_ref ( + training_definition_id int8 not null, + user_ref_id int8 not null, + primary key (training_definition_id, user_ref_id), + foreign key (training_definition_id) references training_definition, + foreign key (user_ref_id) references user_ref +); + +create table training_instance ( + id bigserial not null, + access_token varchar(255) not null, + end_time timestamp not null, + pool_id int8, + start_time timestamp not null, + title varchar(255) not null, + training_definition_id int8, + primary key (id), + foreign key (training_definition_id) references training_definition + +); + +create table training_instance_user_ref ( + training_instance_id int8 not null, + user_ref_id int8 not null, + primary key (training_instance_id, user_ref_id), + foreign key (training_instance_id) references training_instance, + foreign key (user_ref_id) references user_ref + +); + +create table training_run ( + id bigserial not null, + assessment_responses text, + end_time timestamp not null, + incorrect_flag_count int4 not null, + level_answered boolean, + solution_taken boolean not null, + start_time timestamp not null, + state varchar(128) not null, + current_phase_id int8 not null, + current_task_order_id int8 not null, + user_ref_id int8 not null, + sandbox_instance_ref_id int8 null, + training_instance_id int8 not null, + previous_sandbox_instance_ref_id int8 null, + primary key (id), + foreign key (training_instance_id) references training_instance, + foreign key (user_ref_id) references user_ref +); + +-- PHASES +create table abstract_phase ( + phase_id bigserial not null, + title varchar(255) not null, + order_in_training_definition int4 not null, + training_definition_id int8, + primary key (phase_id), + foreign key (training_definition_id) references training_definition +); + +-- INFO PHASE +create table info_phase ( + phase_id bigserial not null, + content text not null, + primary key (phase_id) +); + +-- TRAINING PHASE +create table training_phase ( + phase_id bigserial not null, + estimated_duration int8 not null, + allowed_commands int8 , + allowed_wrong_answers int8 not null, + primary key (phase_id) +); + +create table task ( + task_id bigserial not null, + title varchar(255) not null, + content text not null, + answer varchar(255) not null, + solution varchar(1048) not null, + incorrect_answer_limit int4, + modify_sandbox boolean not null, + sandbox_change_expected_duration int8 not null, + order_in_training_phase int4 not null, + phase_id int8 not null, + primary key (task_id), + foreign key (phase_id) references training_phase +); + +create table decision_matrix_row ( + decision_matrix_row_id bigserial not null, + order_in_training_phase int4 not null, + assessment_answered double precision not null, + keyword_used double precision not null, + completed_in_time double precision not null, + solution_displayed double precision not null, + wrong_answers double precision not null, + phase_id int8 not null, + primary key (decision_matrix_row_id), + foreign key (phase_id) references training_phase +); + +-- QUESTIONNAIRE PHASE +create table questionnaire_phase ( + phase_id bigserial not null, + primary key (phase_id) +); + +create table question ( + question_id bigserial not null, + question_type varchar(64) not null, + text text not null, + phase_id int8 not null, + primary key (question_id), + foreign key (phase_id) references questionnaire_phase +); + +create table question_choice ( + question_choice_id bigserial not null, + correct boolean not null, + text text not null, + order_in_question int4 not null, + question_id int8 not null, + primary key (question_choice_id), + foreign key (question_id) references question +); + +create table question_phase_relation ( + question_phase_relation_id bigserial not null, + success_rate int4 not null, + related_training_phase int8 not null, + order_in_questionnaire int4 not null, + phase_id int8 not null, + primary key (question_phase_relation_id), + foreign key (related_training_phase) references training_phase, + foreign key (phase_id) references questionnaire_phase +); + +create table question_phase_relation_question ( + question_phase_relation_id int8 not null, + question_id int8 not null, + primary key (question_phase_relation_id, question_id), + foreign key (question_phase_relation_id) references question_phase_relation, + foreign key (question_id) references question +); + +-- ACCESS TOKEN +create table access_token ( + id bigserial not null, + access_token varchar(255) not null, + primary key (id) +); + +-- ACQUISITION LOCK +create table training_run_acquisition_lock ( + id bigserial not null, + participant_ref_id int8 not null, + training_instance_id int8 not null, + creation_time timestamp not null, + primary key (id), + foreign key (participant_ref_id) references user_ref, + foreign key (training_instance_id) references training_instance +); diff --git a/src/main/resources/db/migration/V2__db_adaptive_trainings_indexes.sql b/src/main/resources/db/migration/V2__db_adaptive_trainings_indexes.sql new file mode 100644 index 0000000000000000000000000000000000000000..8648873e2bf6a594bd5437be836f8c7478c74944 --- /dev/null +++ b/src/main/resources/db/migration/V2__db_adaptive_trainings_indexes.sql @@ -0,0 +1,17 @@ +CREATE INDEX abstract_phase_order_in_training_definition_index +ON abstract_phase (order_in_training_definition); + +CREATE UNIQUE INDEX access_token_access_token_index +ON access_token (access_token); + +CREATE UNIQUE INDEX training_instance_access_token_index +ON training_instance (access_token); + +CREATE INDEX training_instance_start_time_and_end_time_index +ON training_instance (start_time, end_time DESC); + +CREATE INDEX training_definition_state_index +ON training_definition (state); + +CREATE INDEX training_run_start_time_and_end_time_index +ON training_run (start_time, end_time DESC); diff --git a/src/test/java/cz/muni/ics/kypo/training/adaptive/DemoApplicationTests.java b/src/test/java/cz/muni/ics/kypo/training/adaptive/DemoApplicationTests.java index 6a9221cfb2fb29b060a75d1d84162896236a21d9..425864f7a252aecc8b5616b6bd55a0ba83e3988f 100644 --- a/src/test/java/cz/muni/ics/kypo/training/adaptive/DemoApplicationTests.java +++ b/src/test/java/cz/muni/ics/kypo/training/adaptive/DemoApplicationTests.java @@ -3,7 +3,7 @@ package cz.muni.ics.kypo.training.adaptive; import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; -@SpringBootTest +@SpringBootTest(classes = TestAdaptiveTrainingConfiguration.class) class DemoApplicationTests { @Test diff --git a/src/test/java/cz/muni/ics/kypo/training/adaptive/TestAdaptiveTrainingConfiguration.java b/src/test/java/cz/muni/ics/kypo/training/adaptive/TestAdaptiveTrainingConfiguration.java new file mode 100644 index 0000000000000000000000000000000000000000..7190a3bce38908307fe1a58af35f86960052ecdd --- /dev/null +++ b/src/test/java/cz/muni/ics/kypo/training/adaptive/TestAdaptiveTrainingConfiguration.java @@ -0,0 +1,8 @@ +package cz.muni.ics.kypo.training.adaptive; + +import org.springframework.context.annotation.Configuration; + +@Configuration +public class TestAdaptiveTrainingConfiguration { + +}