diff --git a/.gradle/8.6/checksums/checksums.lock b/.gradle/8.6/checksums/checksums.lock new file mode 100644 index 0000000..18dbccd Binary files /dev/null and b/.gradle/8.6/checksums/checksums.lock differ diff --git a/.gradle/8.6/dependencies-accessors/gc.properties b/.gradle/8.6/dependencies-accessors/gc.properties new file mode 100644 index 0000000..e69de29 diff --git a/.gradle/8.6/executionHistory/executionHistory.bin b/.gradle/8.6/executionHistory/executionHistory.bin new file mode 100644 index 0000000..e84db00 Binary files /dev/null and b/.gradle/8.6/executionHistory/executionHistory.bin differ diff --git a/.gradle/8.6/executionHistory/executionHistory.lock b/.gradle/8.6/executionHistory/executionHistory.lock new file mode 100644 index 0000000..5a83308 Binary files /dev/null and b/.gradle/8.6/executionHistory/executionHistory.lock differ diff --git a/.gradle/8.6/fileChanges/last-build.bin b/.gradle/8.6/fileChanges/last-build.bin new file mode 100644 index 0000000..f76dd23 Binary files /dev/null and b/.gradle/8.6/fileChanges/last-build.bin differ diff --git a/.gradle/8.6/fileHashes/fileHashes.bin b/.gradle/8.6/fileHashes/fileHashes.bin new file mode 100644 index 0000000..a433aed Binary files /dev/null and b/.gradle/8.6/fileHashes/fileHashes.bin differ diff --git a/.gradle/8.6/fileHashes/fileHashes.lock b/.gradle/8.6/fileHashes/fileHashes.lock new file mode 100644 index 0000000..b7a7c13 Binary files /dev/null and b/.gradle/8.6/fileHashes/fileHashes.lock differ diff --git a/.gradle/8.6/fileHashes/resourceHashesCache.bin b/.gradle/8.6/fileHashes/resourceHashesCache.bin new file mode 100644 index 0000000..e1c7890 Binary files /dev/null and b/.gradle/8.6/fileHashes/resourceHashesCache.bin differ diff --git a/.gradle/8.6/gc.properties b/.gradle/8.6/gc.properties new file mode 100644 index 0000000..e69de29 diff --git a/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/.gradle/buildOutputCleanup/buildOutputCleanup.lock new file mode 100644 index 0000000..88d2010 Binary files /dev/null and b/.gradle/buildOutputCleanup/buildOutputCleanup.lock differ diff --git a/.gradle/buildOutputCleanup/cache.properties b/.gradle/buildOutputCleanup/cache.properties new file mode 100644 index 0000000..e831b08 --- /dev/null +++ b/.gradle/buildOutputCleanup/cache.properties @@ -0,0 +1,2 @@ +#Thu May 23 14:18:27 MSK 2024 +gradle.version=8.6 diff --git a/.gradle/buildOutputCleanup/outputFiles.bin b/.gradle/buildOutputCleanup/outputFiles.bin new file mode 100644 index 0000000..e60173e Binary files /dev/null and b/.gradle/buildOutputCleanup/outputFiles.bin differ diff --git a/.gradle/file-system.probe b/.gradle/file-system.probe new file mode 100644 index 0000000..34ce3a2 Binary files /dev/null and b/.gradle/file-system.probe differ diff --git a/.gradle/vcs-1/gc.properties b/.gradle/vcs-1/gc.properties new file mode 100644 index 0000000..e69de29 diff --git a/HELP.md b/HELP.md new file mode 100644 index 0000000..95612af --- /dev/null +++ b/HELP.md @@ -0,0 +1,22 @@ +# Getting Started + +### Reference Documentation +For further reference, please consider the following sections: + +* [Official Gradle documentation](https://docs.gradle.org) +* [Spring Boot Gradle Plugin Reference Guide](https://docs.spring.io/spring-boot/docs/3.2.4/gradle-plugin/reference/html/) +* [Create an OCI image](https://docs.spring.io/spring-boot/docs/3.2.4/gradle-plugin/reference/html/#build-image) +* [Spring Web](https://docs.spring.io/spring-boot/docs/3.2.4/reference/htmlsingle/index.html#web) + +### Guides +The following guides illustrate how to use some features concretely: + +* [Building a RESTful Web Service](https://spring.io/guides/gs/rest-service/) +* [Serving Web Content with Spring MVC](https://spring.io/guides/gs/serving-web-content/) +* [Building REST services with Spring](https://spring.io/guides/tutorials/rest/) + +### Additional Links +These additional references should also help you: + +* [Gradle Build Scans – insights for your project's build](https://scans.gradle.com#gradle) + diff --git a/bin/main/application.properties b/bin/main/application.properties new file mode 100644 index 0000000..62ab433 --- /dev/null +++ b/bin/main/application.properties @@ -0,0 +1,20 @@ +# Server +spring.main.banner-mode=off +server.port=8080 + +# Logger settings +# Available levels are: TRACE, DEBUG, INFO, WARN, ERROR, FATAL, OFF +logging.level.com.example.demo=DEBUG + +# JPA Settings +spring.datasource.url=jdbc:h2:file:./data +spring.datasource.username=sa +spring.datasource.password=password +spring.datasource.driver-class-name=org.h2.Driver +spring.jpa.hibernate.ddl-auto=create +spring.jpa.open-in-view=false +# spring.jpa.show-sql=true +# spring.jpa.properties.hibernate.format_sql=true + +# H2 console +spring.h2.console.enabled=true \ No newline at end of file diff --git a/bin/main/com/example/demo/DemoApplication.class b/bin/main/com/example/demo/DemoApplication.class new file mode 100644 index 0000000..da61dfb Binary files /dev/null and b/bin/main/com/example/demo/DemoApplication.class differ diff --git a/bin/main/com/example/demo/core/api/PageDto.class b/bin/main/com/example/demo/core/api/PageDto.class new file mode 100644 index 0000000..3ab1f83 Binary files /dev/null and b/bin/main/com/example/demo/core/api/PageDto.class differ diff --git a/bin/main/com/example/demo/core/api/PageDtoMapper.class b/bin/main/com/example/demo/core/api/PageDtoMapper.class new file mode 100644 index 0000000..78f64ee Binary files /dev/null and b/bin/main/com/example/demo/core/api/PageDtoMapper.class differ diff --git a/bin/main/com/example/demo/core/configuration/Constants.class b/bin/main/com/example/demo/core/configuration/Constants.class new file mode 100644 index 0000000..6be2bf9 Binary files /dev/null and b/bin/main/com/example/demo/core/configuration/Constants.class differ diff --git a/bin/main/com/example/demo/core/configuration/MapperConfiguration.class b/bin/main/com/example/demo/core/configuration/MapperConfiguration.class new file mode 100644 index 0000000..5204601 Binary files /dev/null and b/bin/main/com/example/demo/core/configuration/MapperConfiguration.class differ diff --git a/bin/main/com/example/demo/core/configuration/WebConfiguration.class b/bin/main/com/example/demo/core/configuration/WebConfiguration.class new file mode 100644 index 0000000..bbe56ed Binary files /dev/null and b/bin/main/com/example/demo/core/configuration/WebConfiguration.class differ diff --git a/bin/main/com/example/demo/core/error/NotFoundException.class b/bin/main/com/example/demo/core/error/NotFoundException.class new file mode 100644 index 0000000..68345e0 Binary files /dev/null and b/bin/main/com/example/demo/core/error/NotFoundException.class differ diff --git a/bin/main/com/example/demo/core/model/BaseEntity.class b/bin/main/com/example/demo/core/model/BaseEntity.class new file mode 100644 index 0000000..f755234 Binary files /dev/null and b/bin/main/com/example/demo/core/model/BaseEntity.class differ diff --git a/bin/main/com/example/demo/orders/api/OrdersController.class b/bin/main/com/example/demo/orders/api/OrdersController.class new file mode 100644 index 0000000..367c868 Binary files /dev/null and b/bin/main/com/example/demo/orders/api/OrdersController.class differ diff --git a/bin/main/com/example/demo/orders/api/OrdersDto.class b/bin/main/com/example/demo/orders/api/OrdersDto.class new file mode 100644 index 0000000..2d0459e Binary files /dev/null and b/bin/main/com/example/demo/orders/api/OrdersDto.class differ diff --git a/bin/main/com/example/demo/orders/model/OrdersEntity.class b/bin/main/com/example/demo/orders/model/OrdersEntity.class new file mode 100644 index 0000000..297985f Binary files /dev/null and b/bin/main/com/example/demo/orders/model/OrdersEntity.class differ diff --git a/bin/main/com/example/demo/orders/repository/OrdersRepository.class b/bin/main/com/example/demo/orders/repository/OrdersRepository.class new file mode 100644 index 0000000..25c8dc1 Binary files /dev/null and b/bin/main/com/example/demo/orders/repository/OrdersRepository.class differ diff --git a/bin/main/com/example/demo/orders/service/OrdersService.class b/bin/main/com/example/demo/orders/service/OrdersService.class new file mode 100644 index 0000000..658c25e Binary files /dev/null and b/bin/main/com/example/demo/orders/service/OrdersService.class differ diff --git a/bin/main/com/example/demo/products/api/ProductsController.class b/bin/main/com/example/demo/products/api/ProductsController.class new file mode 100644 index 0000000..6e49298 Binary files /dev/null and b/bin/main/com/example/demo/products/api/ProductsController.class differ diff --git a/bin/main/com/example/demo/products/api/ProductsDto.class b/bin/main/com/example/demo/products/api/ProductsDto.class new file mode 100644 index 0000000..39b0342 Binary files /dev/null and b/bin/main/com/example/demo/products/api/ProductsDto.class differ diff --git a/bin/main/com/example/demo/products/api/ProductsGroupedDto.class b/bin/main/com/example/demo/products/api/ProductsGroupedDto.class new file mode 100644 index 0000000..b5b4f77 Binary files /dev/null and b/bin/main/com/example/demo/products/api/ProductsGroupedDto.class differ diff --git a/bin/main/com/example/demo/products/model/ProductsEntity.class b/bin/main/com/example/demo/products/model/ProductsEntity.class new file mode 100644 index 0000000..5e92be3 Binary files /dev/null and b/bin/main/com/example/demo/products/model/ProductsEntity.class differ diff --git a/bin/main/com/example/demo/products/model/ProductsGrouped.class b/bin/main/com/example/demo/products/model/ProductsGrouped.class new file mode 100644 index 0000000..fa1ed39 Binary files /dev/null and b/bin/main/com/example/demo/products/model/ProductsGrouped.class differ diff --git a/bin/main/com/example/demo/products/repository/ProductsRepository.class b/bin/main/com/example/demo/products/repository/ProductsRepository.class new file mode 100644 index 0000000..5a874c8 Binary files /dev/null and b/bin/main/com/example/demo/products/repository/ProductsRepository.class differ diff --git a/bin/main/com/example/demo/products/service/ProductsService.class b/bin/main/com/example/demo/products/service/ProductsService.class new file mode 100644 index 0000000..bca5d03 Binary files /dev/null and b/bin/main/com/example/demo/products/service/ProductsService.class differ diff --git a/bin/main/com/example/demo/types/api/TypesController.class b/bin/main/com/example/demo/types/api/TypesController.class new file mode 100644 index 0000000..6d36d96 Binary files /dev/null and b/bin/main/com/example/demo/types/api/TypesController.class differ diff --git a/bin/main/com/example/demo/types/api/TypesDto.class b/bin/main/com/example/demo/types/api/TypesDto.class new file mode 100644 index 0000000..e2afda8 Binary files /dev/null and b/bin/main/com/example/demo/types/api/TypesDto.class differ diff --git a/bin/main/com/example/demo/types/model/TypesEntity.class b/bin/main/com/example/demo/types/model/TypesEntity.class new file mode 100644 index 0000000..d81360c Binary files /dev/null and b/bin/main/com/example/demo/types/model/TypesEntity.class differ diff --git a/bin/main/com/example/demo/types/repository/TypesRepository.class b/bin/main/com/example/demo/types/repository/TypesRepository.class new file mode 100644 index 0000000..79f9057 Binary files /dev/null and b/bin/main/com/example/demo/types/repository/TypesRepository.class differ diff --git a/bin/main/com/example/demo/types/service/TypesService.class b/bin/main/com/example/demo/types/service/TypesService.class new file mode 100644 index 0000000..6766a3f Binary files /dev/null and b/bin/main/com/example/demo/types/service/TypesService.class differ diff --git a/bin/main/com/example/demo/users/api/UsersController.class b/bin/main/com/example/demo/users/api/UsersController.class new file mode 100644 index 0000000..f9a86ca Binary files /dev/null and b/bin/main/com/example/demo/users/api/UsersController.class differ diff --git a/bin/main/com/example/demo/users/api/UsersDto.class b/bin/main/com/example/demo/users/api/UsersDto.class new file mode 100644 index 0000000..2b8960c Binary files /dev/null and b/bin/main/com/example/demo/users/api/UsersDto.class differ diff --git a/bin/main/com/example/demo/users/model/UsersEntity.class b/bin/main/com/example/demo/users/model/UsersEntity.class new file mode 100644 index 0000000..4aed6ee Binary files /dev/null and b/bin/main/com/example/demo/users/model/UsersEntity.class differ diff --git a/bin/main/com/example/demo/users/repository/UsersRepository.class b/bin/main/com/example/demo/users/repository/UsersRepository.class new file mode 100644 index 0000000..0d83f28 Binary files /dev/null and b/bin/main/com/example/demo/users/repository/UsersRepository.class differ diff --git a/bin/main/com/example/demo/users/service/UsersService.class b/bin/main/com/example/demo/users/service/UsersService.class new file mode 100644 index 0000000..bb9c8d1 Binary files /dev/null and b/bin/main/com/example/demo/users/service/UsersService.class differ diff --git a/bin/test/application.properties b/bin/test/application.properties new file mode 100644 index 0000000..d5f355c --- /dev/null +++ b/bin/test/application.properties @@ -0,0 +1,14 @@ +# Server +spring.main.banner-mode=off + +# Logger settings +# Available levels are: TRACE, DEBUG, INFO, WARN, ERROR, FATAL, OFF +logging.level.com.example.demo=DEBUG + +# JPA Settings +spring.datasource.url=jdbc:h2:mem:testdb +spring.datasource.username=sa +spring.datasource.password=password +spring.datasource.driver-class-name=org.h2.Driver +spring.jpa.hibernate.ddl-auto=create +spring.jpa.open-in-view=false \ No newline at end of file diff --git a/bin/test/com/example/demo/ProductsServiceTests.class b/bin/test/com/example/demo/ProductsServiceTests.class new file mode 100644 index 0000000..205e8bf Binary files /dev/null and b/bin/test/com/example/demo/ProductsServiceTests.class differ diff --git a/bin/test/com/example/demo/TypesServiceTests.class b/bin/test/com/example/demo/TypesServiceTests.class new file mode 100644 index 0000000..7a19279 Binary files /dev/null and b/bin/test/com/example/demo/TypesServiceTests.class differ diff --git a/bin/test/com/example/demo/UsersOrdersServiceTests.class b/bin/test/com/example/demo/UsersOrdersServiceTests.class new file mode 100644 index 0000000..9549889 Binary files /dev/null and b/bin/test/com/example/demo/UsersOrdersServiceTests.class differ diff --git a/build.gradle b/build.gradle new file mode 100644 index 0000000..42a3cac --- /dev/null +++ b/build.gradle @@ -0,0 +1,43 @@ +plugins { + id 'java' + id 'org.springframework.boot' version '3.2.5' + id 'io.spring.dependency-management' version '1.1.4' +} + +group = 'com.example' +version = '0.0.1-SNAPSHOT' + +defaultTasks 'bootRun' + +jar { + enabled = false +} + +bootJar { + archiveFileName = String.format('%s-%s.jar', rootProject.name, version) +} + +assert System.properties['java.specification.version'] == '17' || '21' +java { + sourceCompatibility = '17' +} + +repositories { + mavenCentral() +} + +dependencies { + implementation 'org.springframework.boot:spring-boot-starter-web' + implementation 'org.springframework.boot:spring-boot-starter-validation' + implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.3.0' + implementation 'org.modelmapper:modelmapper:3.2.0' + + implementation 'org.springframework.boot:spring-boot-starter-data-jpa' + implementation 'com.h2database:h2:2.2.224' + + testImplementation 'org.springframework.boot:spring-boot-starter-test' +} + +tasks.named('test') { + useJUnitPlatform() +} diff --git a/build/classes/java/main/com/example/demo/DemoApplication.class b/build/classes/java/main/com/example/demo/DemoApplication.class new file mode 100644 index 0000000..198dd29 Binary files /dev/null and b/build/classes/java/main/com/example/demo/DemoApplication.class differ diff --git a/build/classes/java/main/com/example/demo/core/api/PageDto.class b/build/classes/java/main/com/example/demo/core/api/PageDto.class new file mode 100644 index 0000000..1cf240f Binary files /dev/null and b/build/classes/java/main/com/example/demo/core/api/PageDto.class differ diff --git a/build/classes/java/main/com/example/demo/core/api/PageDtoMapper.class b/build/classes/java/main/com/example/demo/core/api/PageDtoMapper.class new file mode 100644 index 0000000..3a18f78 Binary files /dev/null and b/build/classes/java/main/com/example/demo/core/api/PageDtoMapper.class differ diff --git a/build/classes/java/main/com/example/demo/core/configuration/Constants.class b/build/classes/java/main/com/example/demo/core/configuration/Constants.class new file mode 100644 index 0000000..cf3bcaa Binary files /dev/null and b/build/classes/java/main/com/example/demo/core/configuration/Constants.class differ diff --git a/build/classes/java/main/com/example/demo/core/configuration/MapperConfiguration.class b/build/classes/java/main/com/example/demo/core/configuration/MapperConfiguration.class new file mode 100644 index 0000000..11aa632 Binary files /dev/null and b/build/classes/java/main/com/example/demo/core/configuration/MapperConfiguration.class differ diff --git a/build/classes/java/main/com/example/demo/core/configuration/WebConfiguration.class b/build/classes/java/main/com/example/demo/core/configuration/WebConfiguration.class new file mode 100644 index 0000000..fcf79f2 Binary files /dev/null and b/build/classes/java/main/com/example/demo/core/configuration/WebConfiguration.class differ diff --git a/build/classes/java/main/com/example/demo/core/error/NotFoundException.class b/build/classes/java/main/com/example/demo/core/error/NotFoundException.class new file mode 100644 index 0000000..0e26e11 Binary files /dev/null and b/build/classes/java/main/com/example/demo/core/error/NotFoundException.class differ diff --git a/build/classes/java/main/com/example/demo/core/model/BaseEntity.class b/build/classes/java/main/com/example/demo/core/model/BaseEntity.class new file mode 100644 index 0000000..660765d Binary files /dev/null and b/build/classes/java/main/com/example/demo/core/model/BaseEntity.class differ diff --git a/build/classes/java/main/com/example/demo/orders/api/OrdersController.class b/build/classes/java/main/com/example/demo/orders/api/OrdersController.class new file mode 100644 index 0000000..efa0de7 Binary files /dev/null and b/build/classes/java/main/com/example/demo/orders/api/OrdersController.class differ diff --git a/build/classes/java/main/com/example/demo/orders/api/OrdersDto.class b/build/classes/java/main/com/example/demo/orders/api/OrdersDto.class new file mode 100644 index 0000000..30ba756 Binary files /dev/null and b/build/classes/java/main/com/example/demo/orders/api/OrdersDto.class differ diff --git a/build/classes/java/main/com/example/demo/orders/model/OrdersEntity.class b/build/classes/java/main/com/example/demo/orders/model/OrdersEntity.class new file mode 100644 index 0000000..1e71fe2 Binary files /dev/null and b/build/classes/java/main/com/example/demo/orders/model/OrdersEntity.class differ diff --git a/build/classes/java/main/com/example/demo/orders/repository/OrdersRepository.class b/build/classes/java/main/com/example/demo/orders/repository/OrdersRepository.class new file mode 100644 index 0000000..61712d7 Binary files /dev/null and b/build/classes/java/main/com/example/demo/orders/repository/OrdersRepository.class differ diff --git a/build/classes/java/main/com/example/demo/orders/service/OrdersService.class b/build/classes/java/main/com/example/demo/orders/service/OrdersService.class new file mode 100644 index 0000000..04bd17e Binary files /dev/null and b/build/classes/java/main/com/example/demo/orders/service/OrdersService.class differ diff --git a/build/classes/java/main/com/example/demo/products/api/ProductsController.class b/build/classes/java/main/com/example/demo/products/api/ProductsController.class new file mode 100644 index 0000000..053fee0 Binary files /dev/null and b/build/classes/java/main/com/example/demo/products/api/ProductsController.class differ diff --git a/build/classes/java/main/com/example/demo/products/api/ProductsDto.class b/build/classes/java/main/com/example/demo/products/api/ProductsDto.class new file mode 100644 index 0000000..af385aa Binary files /dev/null and b/build/classes/java/main/com/example/demo/products/api/ProductsDto.class differ diff --git a/build/classes/java/main/com/example/demo/products/api/ProductsGroupedDto.class b/build/classes/java/main/com/example/demo/products/api/ProductsGroupedDto.class new file mode 100644 index 0000000..a886c72 Binary files /dev/null and b/build/classes/java/main/com/example/demo/products/api/ProductsGroupedDto.class differ diff --git a/build/classes/java/main/com/example/demo/products/model/ProductsEntity.class b/build/classes/java/main/com/example/demo/products/model/ProductsEntity.class new file mode 100644 index 0000000..8d4599f Binary files /dev/null and b/build/classes/java/main/com/example/demo/products/model/ProductsEntity.class differ diff --git a/build/classes/java/main/com/example/demo/products/model/ProductsGrouped.class b/build/classes/java/main/com/example/demo/products/model/ProductsGrouped.class new file mode 100644 index 0000000..fa1ed39 Binary files /dev/null and b/build/classes/java/main/com/example/demo/products/model/ProductsGrouped.class differ diff --git a/build/classes/java/main/com/example/demo/products/repository/ProductsRepository.class b/build/classes/java/main/com/example/demo/products/repository/ProductsRepository.class new file mode 100644 index 0000000..9b05de1 Binary files /dev/null and b/build/classes/java/main/com/example/demo/products/repository/ProductsRepository.class differ diff --git a/build/classes/java/main/com/example/demo/products/service/ProductsService.class b/build/classes/java/main/com/example/demo/products/service/ProductsService.class new file mode 100644 index 0000000..c17eecc Binary files /dev/null and b/build/classes/java/main/com/example/demo/products/service/ProductsService.class differ diff --git a/build/classes/java/main/com/example/demo/types/api/TypesController.class b/build/classes/java/main/com/example/demo/types/api/TypesController.class new file mode 100644 index 0000000..19a5a08 Binary files /dev/null and b/build/classes/java/main/com/example/demo/types/api/TypesController.class differ diff --git a/build/classes/java/main/com/example/demo/types/api/TypesDto.class b/build/classes/java/main/com/example/demo/types/api/TypesDto.class new file mode 100644 index 0000000..7e3980d Binary files /dev/null and b/build/classes/java/main/com/example/demo/types/api/TypesDto.class differ diff --git a/build/classes/java/main/com/example/demo/types/model/TypesEntity.class b/build/classes/java/main/com/example/demo/types/model/TypesEntity.class new file mode 100644 index 0000000..850ab7a Binary files /dev/null and b/build/classes/java/main/com/example/demo/types/model/TypesEntity.class differ diff --git a/build/classes/java/main/com/example/demo/types/repository/TypesRepository.class b/build/classes/java/main/com/example/demo/types/repository/TypesRepository.class new file mode 100644 index 0000000..ebe789e Binary files /dev/null and b/build/classes/java/main/com/example/demo/types/repository/TypesRepository.class differ diff --git a/build/classes/java/main/com/example/demo/types/service/TypesService.class b/build/classes/java/main/com/example/demo/types/service/TypesService.class new file mode 100644 index 0000000..734656d Binary files /dev/null and b/build/classes/java/main/com/example/demo/types/service/TypesService.class differ diff --git a/build/classes/java/main/com/example/demo/users/api/UsersController.class b/build/classes/java/main/com/example/demo/users/api/UsersController.class new file mode 100644 index 0000000..dfe404b Binary files /dev/null and b/build/classes/java/main/com/example/demo/users/api/UsersController.class differ diff --git a/build/classes/java/main/com/example/demo/users/api/UsersDto.class b/build/classes/java/main/com/example/demo/users/api/UsersDto.class new file mode 100644 index 0000000..5a69e7d Binary files /dev/null and b/build/classes/java/main/com/example/demo/users/api/UsersDto.class differ diff --git a/build/classes/java/main/com/example/demo/users/model/UsersEntity.class b/build/classes/java/main/com/example/demo/users/model/UsersEntity.class new file mode 100644 index 0000000..dd24515 Binary files /dev/null and b/build/classes/java/main/com/example/demo/users/model/UsersEntity.class differ diff --git a/build/classes/java/main/com/example/demo/users/repository/UsersRepository.class b/build/classes/java/main/com/example/demo/users/repository/UsersRepository.class new file mode 100644 index 0000000..b25c4fd Binary files /dev/null and b/build/classes/java/main/com/example/demo/users/repository/UsersRepository.class differ diff --git a/build/classes/java/main/com/example/demo/users/service/UsersService.class b/build/classes/java/main/com/example/demo/users/service/UsersService.class new file mode 100644 index 0000000..eb72982 Binary files /dev/null and b/build/classes/java/main/com/example/demo/users/service/UsersService.class differ diff --git a/build/resolvedMainClassName b/build/resolvedMainClassName new file mode 100644 index 0000000..b481589 --- /dev/null +++ b/build/resolvedMainClassName @@ -0,0 +1 @@ +com.example.demo.DemoApplication \ No newline at end of file diff --git a/build/resources/main/application.properties b/build/resources/main/application.properties new file mode 100644 index 0000000..62ab433 --- /dev/null +++ b/build/resources/main/application.properties @@ -0,0 +1,20 @@ +# Server +spring.main.banner-mode=off +server.port=8080 + +# Logger settings +# Available levels are: TRACE, DEBUG, INFO, WARN, ERROR, FATAL, OFF +logging.level.com.example.demo=DEBUG + +# JPA Settings +spring.datasource.url=jdbc:h2:file:./data +spring.datasource.username=sa +spring.datasource.password=password +spring.datasource.driver-class-name=org.h2.Driver +spring.jpa.hibernate.ddl-auto=create +spring.jpa.open-in-view=false +# spring.jpa.show-sql=true +# spring.jpa.properties.hibernate.format_sql=true + +# H2 console +spring.h2.console.enabled=true \ No newline at end of file diff --git a/build/tmp/compileJava/previous-compilation-data.bin b/build/tmp/compileJava/previous-compilation-data.bin new file mode 100644 index 0000000..8b8bc55 Binary files /dev/null and b/build/tmp/compileJava/previous-compilation-data.bin differ diff --git a/data.mv.db b/data.mv.db new file mode 100644 index 0000000..410bf5a Binary files /dev/null and b/data.mv.db differ diff --git a/data.trace.db b/data.trace.db new file mode 100644 index 0000000..a058b18 --- /dev/null +++ b/data.trace.db @@ -0,0 +1,2285 @@ +2024-04-20 21:36:59.377754+04:00 database: flush +org.h2.message.DbException: Внутренняя ошибка: "org.h2.mvstore.MVStoreException: The file is locked: C:/4 semestr/IP/IP-Labs-4-semestr/data.mv.db [2.2.224/7]" +General error: "org.h2.mvstore.MVStoreException: The file is locked: C:/4 semestr/IP/IP-Labs-4-semestr/data.mv.db [2.2.224/7]" [50000-224] + at org.h2.message.DbException.get(DbException.java:212) + at org.h2.message.DbException.convert(DbException.java:407) + at org.h2.mvstore.db.Store.lambda$new$0(Store.java:122) + at org.h2.mvstore.MVStore.handleException(MVStore.java:1546) + at org.h2.mvstore.MVStore.panic(MVStore.java:371) + at org.h2.mvstore.MVStore.(MVStore.java:291) + at org.h2.mvstore.MVStore$Builder.open(MVStore.java:2035) + at org.h2.mvstore.db.Store.(Store.java:133) + at org.h2.engine.Database.(Database.java:326) + at org.h2.engine.Engine.openSession(Engine.java:92) + at org.h2.engine.Engine.openSession(Engine.java:222) + at org.h2.engine.Engine.createSession(Engine.java:201) + at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:343) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:125) + at org.h2.Driver.connect(Driver.java:59) + at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:138) + at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:359) + at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:201) + at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:470) + at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:561) + at com.zaxxer.hikari.pool.HikariPool.(HikariPool.java:100) + at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:112) + at org.springframework.boot.autoconfigure.h2.H2ConsoleAutoConfiguration.getConnectionUrl(H2ConsoleAutoConfiguration.java:94) + at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) + at java.base/java.util.ArrayList.forEach(ArrayList.java:1596) + at java.base/java.util.stream.SortedOps$RefSortingSink.end(SortedOps.java:395) + at java.base/java.util.stream.Sink$ChainedReference.end(Sink.java:261) + at java.base/java.util.stream.Sink$ChainedReference.end(Sink.java:261) + at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:510) + at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) + at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:575) + at java.base/java.util.stream.AbstractPipeline.evaluateToArrayNode(AbstractPipeline.java:260) + at java.base/java.util.stream.ReferencePipeline.toArray(ReferencePipeline.java:616) + at java.base/java.util.stream.ReferencePipeline.toArray(ReferencePipeline.java:622) + at java.base/java.util.stream.ReferencePipeline.toList(ReferencePipeline.java:627) + at org.springframework.boot.autoconfigure.h2.H2ConsoleAutoConfiguration.logDataSources(H2ConsoleAutoConfiguration.java:86) + at org.springframework.boot.autoconfigure.h2.H2ConsoleAutoConfiguration.lambda$h2Console$0(H2ConsoleAutoConfiguration.java:69) + at org.springframework.boot.autoconfigure.h2.H2ConsoleAutoConfiguration.withThreadContextClassLoader(H2ConsoleAutoConfiguration.java:78) + at org.springframework.boot.autoconfigure.h2.H2ConsoleAutoConfiguration.h2Console(H2ConsoleAutoConfiguration.java:69) + at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) + at java.base/java.lang.reflect.Method.invoke(Method.java:580) + at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:140) + at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:644) + at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:636) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1335) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1165) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:562) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:522) + at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:326) + at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324) + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:205) + at org.springframework.boot.web.servlet.ServletContextInitializerBeans.getOrderedBeansOfType(ServletContextInitializerBeans.java:210) + at org.springframework.boot.web.servlet.ServletContextInitializerBeans.getOrderedBeansOfType(ServletContextInitializerBeans.java:201) + at org.springframework.boot.web.servlet.ServletContextInitializerBeans.addServletContextInitializerBeans(ServletContextInitializerBeans.java:96) + at org.springframework.boot.web.servlet.ServletContextInitializerBeans.(ServletContextInitializerBeans.java:85) + at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.getServletContextInitializerBeans(ServletWebServerApplicationContext.java:266) + at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.selfInitialize(ServletWebServerApplicationContext.java:240) + at org.springframework.boot.web.embedded.tomcat.TomcatStarter.onStartup(TomcatStarter.java:52) + at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4880) + at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:171) + at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1332) + at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1322) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317) + at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) + at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:145) + at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:866) + at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:845) + at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:171) + at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1332) + at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1322) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317) + at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) + at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:145) + at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:866) + at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:240) + at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:171) + at org.apache.catalina.core.StandardService.startInternal(StandardService.java:433) + at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:171) + at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:921) + at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:171) + at org.apache.catalina.startup.Tomcat.start(Tomcat.java:437) + at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.initialize(TomcatWebServer.java:126) + at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.(TomcatWebServer.java:105) + at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getTomcatWebServer(TomcatServletWebServerFactory.java:499) + at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getWebServer(TomcatServletWebServerFactory.java:218) + at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer(ServletWebServerApplicationContext.java:188) + at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:162) + at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:618) + at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146) + at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754) + at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:456) + at org.springframework.boot.SpringApplication.run(SpringApplication.java:334) + at org.springframework.boot.SpringApplication.run(SpringApplication.java:1354) + at org.springframework.boot.SpringApplication.run(SpringApplication.java:1343) + at com.example.demo.DemoApplication.main(DemoApplication.java:39) +Caused by: org.h2.jdbc.JdbcSQLNonTransientException: Внутренняя ошибка: "org.h2.mvstore.MVStoreException: The file is locked: C:/4 semestr/IP/IP-Labs-4-semestr/data.mv.db [2.2.224/7]" +General error: "org.h2.mvstore.MVStoreException: The file is locked: C:/4 semestr/IP/IP-Labs-4-semestr/data.mv.db [2.2.224/7]" [50000-224] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:566) + at org.h2.message.DbException.getJdbcSQLException(DbException.java:489) + ... 96 more +Caused by: org.h2.mvstore.MVStoreException: The file is locked: C:/4 semestr/IP/IP-Labs-4-semestr/data.mv.db [2.2.224/7] + at org.h2.mvstore.DataUtils.newMVStoreException(DataUtils.java:996) + at org.h2.mvstore.SingleFileStore.lockFileChannel(SingleFileStore.java:143) + at org.h2.mvstore.SingleFileStore.open(SingleFileStore.java:117) + at org.h2.mvstore.SingleFileStore.open(SingleFileStore.java:81) + at org.h2.mvstore.MVStore.(MVStore.java:286) + ... 90 more +2024-04-20 21:37:00.680147+04:00 database: flush +org.h2.message.DbException: Внутренняя ошибка: "org.h2.mvstore.MVStoreException: The file is locked: C:/4 semestr/IP/IP-Labs-4-semestr/data.mv.db [2.2.224/7]" +General error: "org.h2.mvstore.MVStoreException: The file is locked: C:/4 semestr/IP/IP-Labs-4-semestr/data.mv.db [2.2.224/7]" [50000-224] + at org.h2.message.DbException.get(DbException.java:212) + at org.h2.message.DbException.convert(DbException.java:407) + at org.h2.mvstore.db.Store.lambda$new$0(Store.java:122) + at org.h2.mvstore.MVStore.handleException(MVStore.java:1546) + at org.h2.mvstore.MVStore.panic(MVStore.java:371) + at org.h2.mvstore.MVStore.(MVStore.java:291) + at org.h2.mvstore.MVStore$Builder.open(MVStore.java:2035) + at org.h2.mvstore.db.Store.(Store.java:133) + at org.h2.engine.Database.(Database.java:326) + at org.h2.engine.Engine.openSession(Engine.java:92) + at org.h2.engine.Engine.openSession(Engine.java:222) + at org.h2.engine.Engine.createSession(Engine.java:201) + at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:343) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:125) + at org.h2.Driver.connect(Driver.java:59) + at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:138) + at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:359) + at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:201) + at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:470) + at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:561) + at com.zaxxer.hikari.pool.HikariPool.(HikariPool.java:100) + at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:112) + at org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl.getConnection(DatasourceConnectionProviderImpl.java:122) + at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator$ConnectionProviderJdbcConnectionAccess.obtainConnection(JdbcEnvironmentInitiator.java:428) + at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcIsolationDelegate.delegateWork(JdbcIsolationDelegate.java:61) + at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.getJdbcEnvironmentUsingJdbcMetadata(JdbcEnvironmentInitiator.java:276) + at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:107) + at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:68) + at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:130) + at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:263) + at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:238) + at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:215) + at org.hibernate.boot.model.relational.Database.(Database.java:45) + at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.getDatabase(InFlightMetadataCollectorImpl.java:223) + at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.(InFlightMetadataCollectorImpl.java:191) + at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:170) + at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.metadata(EntityManagerFactoryBuilderImpl.java:1432) + at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:1503) + at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateJpaPersistenceProvider.java:75) + at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:390) + at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:409) + at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:396) + at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.afterPropertiesSet(LocalContainerEntityManagerFactoryBean.java:366) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1833) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1782) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:600) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:522) + at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:326) + at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324) + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200) + at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1234) + at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:952) + at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:624) + at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146) + at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754) + at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:456) + at org.springframework.boot.SpringApplication.run(SpringApplication.java:334) + at org.springframework.boot.SpringApplication.run(SpringApplication.java:1354) + at org.springframework.boot.SpringApplication.run(SpringApplication.java:1343) + at com.example.demo.DemoApplication.main(DemoApplication.java:39) +Caused by: org.h2.jdbc.JdbcSQLNonTransientException: Внутренняя ошибка: "org.h2.mvstore.MVStoreException: The file is locked: C:/4 semestr/IP/IP-Labs-4-semestr/data.mv.db [2.2.224/7]" +General error: "org.h2.mvstore.MVStoreException: The file is locked: C:/4 semestr/IP/IP-Labs-4-semestr/data.mv.db [2.2.224/7]" [50000-224] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:566) + at org.h2.message.DbException.getJdbcSQLException(DbException.java:489) + ... 61 more +Caused by: org.h2.mvstore.MVStoreException: The file is locked: C:/4 semestr/IP/IP-Labs-4-semestr/data.mv.db [2.2.224/7] + at org.h2.mvstore.DataUtils.newMVStoreException(DataUtils.java:996) + at org.h2.mvstore.SingleFileStore.lockFileChannel(SingleFileStore.java:143) + at org.h2.mvstore.SingleFileStore.open(SingleFileStore.java:117) + at org.h2.mvstore.SingleFileStore.open(SingleFileStore.java:81) + at org.h2.mvstore.MVStore.(MVStore.java:286) + ... 55 more +2024-04-20 21:37:35.622227+04:00 database: flush +org.h2.message.DbException: Внутренняя ошибка: "org.h2.mvstore.MVStoreException: The file is locked: C:/4 semestr/IP/IP-Labs-4-semestr/data.mv.db [2.2.224/7]" +General error: "org.h2.mvstore.MVStoreException: The file is locked: C:/4 semestr/IP/IP-Labs-4-semestr/data.mv.db [2.2.224/7]" [50000-224] + at org.h2.message.DbException.get(DbException.java:212) + at org.h2.message.DbException.convert(DbException.java:407) + at org.h2.mvstore.db.Store.lambda$new$0(Store.java:122) + at org.h2.mvstore.MVStore.handleException(MVStore.java:1546) + at org.h2.mvstore.MVStore.panic(MVStore.java:371) + at org.h2.mvstore.MVStore.(MVStore.java:291) + at org.h2.mvstore.MVStore$Builder.open(MVStore.java:2035) + at org.h2.mvstore.db.Store.(Store.java:133) + at org.h2.engine.Database.(Database.java:326) + at org.h2.engine.Engine.openSession(Engine.java:92) + at org.h2.engine.Engine.openSession(Engine.java:222) + at org.h2.engine.Engine.createSession(Engine.java:201) + at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:343) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:125) + at org.h2.Driver.connect(Driver.java:59) + at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:138) + at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:359) + at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:201) + at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:470) + at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:561) + at com.zaxxer.hikari.pool.HikariPool.(HikariPool.java:100) + at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:112) + at org.springframework.boot.autoconfigure.h2.H2ConsoleAutoConfiguration.getConnectionUrl(H2ConsoleAutoConfiguration.java:94) + at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) + at java.base/java.util.ArrayList.forEach(ArrayList.java:1596) + at java.base/java.util.stream.SortedOps$RefSortingSink.end(SortedOps.java:395) + at java.base/java.util.stream.Sink$ChainedReference.end(Sink.java:261) + at java.base/java.util.stream.Sink$ChainedReference.end(Sink.java:261) + at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:510) + at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) + at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:575) + at java.base/java.util.stream.AbstractPipeline.evaluateToArrayNode(AbstractPipeline.java:260) + at java.base/java.util.stream.ReferencePipeline.toArray(ReferencePipeline.java:616) + at java.base/java.util.stream.ReferencePipeline.toArray(ReferencePipeline.java:622) + at java.base/java.util.stream.ReferencePipeline.toList(ReferencePipeline.java:627) + at org.springframework.boot.autoconfigure.h2.H2ConsoleAutoConfiguration.logDataSources(H2ConsoleAutoConfiguration.java:86) + at org.springframework.boot.autoconfigure.h2.H2ConsoleAutoConfiguration.lambda$h2Console$0(H2ConsoleAutoConfiguration.java:69) + at org.springframework.boot.autoconfigure.h2.H2ConsoleAutoConfiguration.withThreadContextClassLoader(H2ConsoleAutoConfiguration.java:78) + at org.springframework.boot.autoconfigure.h2.H2ConsoleAutoConfiguration.h2Console(H2ConsoleAutoConfiguration.java:69) + at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) + at java.base/java.lang.reflect.Method.invoke(Method.java:580) + at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:140) + at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:644) + at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:636) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1335) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1165) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:562) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:522) + at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:326) + at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324) + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:205) + at org.springframework.boot.web.servlet.ServletContextInitializerBeans.getOrderedBeansOfType(ServletContextInitializerBeans.java:210) + at org.springframework.boot.web.servlet.ServletContextInitializerBeans.getOrderedBeansOfType(ServletContextInitializerBeans.java:201) + at org.springframework.boot.web.servlet.ServletContextInitializerBeans.addServletContextInitializerBeans(ServletContextInitializerBeans.java:96) + at org.springframework.boot.web.servlet.ServletContextInitializerBeans.(ServletContextInitializerBeans.java:85) + at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.getServletContextInitializerBeans(ServletWebServerApplicationContext.java:266) + at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.selfInitialize(ServletWebServerApplicationContext.java:240) + at org.springframework.boot.web.embedded.tomcat.TomcatStarter.onStartup(TomcatStarter.java:52) + at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4880) + at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:171) + at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1332) + at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1322) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317) + at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) + at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:145) + at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:866) + at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:845) + at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:171) + at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1332) + at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1322) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317) + at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) + at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:145) + at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:866) + at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:240) + at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:171) + at org.apache.catalina.core.StandardService.startInternal(StandardService.java:433) + at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:171) + at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:921) + at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:171) + at org.apache.catalina.startup.Tomcat.start(Tomcat.java:437) + at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.initialize(TomcatWebServer.java:126) + at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.(TomcatWebServer.java:105) + at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getTomcatWebServer(TomcatServletWebServerFactory.java:499) + at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getWebServer(TomcatServletWebServerFactory.java:218) + at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer(ServletWebServerApplicationContext.java:188) + at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:162) + at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:618) + at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146) + at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754) + at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:456) + at org.springframework.boot.SpringApplication.run(SpringApplication.java:334) + at org.springframework.boot.SpringApplication.run(SpringApplication.java:1354) + at org.springframework.boot.SpringApplication.run(SpringApplication.java:1343) + at com.example.demo.DemoApplication.main(DemoApplication.java:39) +Caused by: org.h2.jdbc.JdbcSQLNonTransientException: Внутренняя ошибка: "org.h2.mvstore.MVStoreException: The file is locked: C:/4 semestr/IP/IP-Labs-4-semestr/data.mv.db [2.2.224/7]" +General error: "org.h2.mvstore.MVStoreException: The file is locked: C:/4 semestr/IP/IP-Labs-4-semestr/data.mv.db [2.2.224/7]" [50000-224] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:566) + at org.h2.message.DbException.getJdbcSQLException(DbException.java:489) + ... 96 more +Caused by: org.h2.mvstore.MVStoreException: The file is locked: C:/4 semestr/IP/IP-Labs-4-semestr/data.mv.db [2.2.224/7] + at org.h2.mvstore.DataUtils.newMVStoreException(DataUtils.java:996) + at org.h2.mvstore.SingleFileStore.lockFileChannel(SingleFileStore.java:143) + at org.h2.mvstore.SingleFileStore.open(SingleFileStore.java:117) + at org.h2.mvstore.SingleFileStore.open(SingleFileStore.java:81) + at org.h2.mvstore.MVStore.(MVStore.java:286) + ... 90 more +2024-04-20 21:37:36.939049+04:00 database: flush +org.h2.message.DbException: Внутренняя ошибка: "org.h2.mvstore.MVStoreException: The file is locked: C:/4 semestr/IP/IP-Labs-4-semestr/data.mv.db [2.2.224/7]" +General error: "org.h2.mvstore.MVStoreException: The file is locked: C:/4 semestr/IP/IP-Labs-4-semestr/data.mv.db [2.2.224/7]" [50000-224] + at org.h2.message.DbException.get(DbException.java:212) + at org.h2.message.DbException.convert(DbException.java:407) + at org.h2.mvstore.db.Store.lambda$new$0(Store.java:122) + at org.h2.mvstore.MVStore.handleException(MVStore.java:1546) + at org.h2.mvstore.MVStore.panic(MVStore.java:371) + at org.h2.mvstore.MVStore.(MVStore.java:291) + at org.h2.mvstore.MVStore$Builder.open(MVStore.java:2035) + at org.h2.mvstore.db.Store.(Store.java:133) + at org.h2.engine.Database.(Database.java:326) + at org.h2.engine.Engine.openSession(Engine.java:92) + at org.h2.engine.Engine.openSession(Engine.java:222) + at org.h2.engine.Engine.createSession(Engine.java:201) + at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:343) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:125) + at org.h2.Driver.connect(Driver.java:59) + at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:138) + at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:359) + at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:201) + at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:470) + at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:561) + at com.zaxxer.hikari.pool.HikariPool.(HikariPool.java:100) + at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:112) + at org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl.getConnection(DatasourceConnectionProviderImpl.java:122) + at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator$ConnectionProviderJdbcConnectionAccess.obtainConnection(JdbcEnvironmentInitiator.java:428) + at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcIsolationDelegate.delegateWork(JdbcIsolationDelegate.java:61) + at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.getJdbcEnvironmentUsingJdbcMetadata(JdbcEnvironmentInitiator.java:276) + at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:107) + at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:68) + at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:130) + at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:263) + at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:238) + at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:215) + at org.hibernate.boot.model.relational.Database.(Database.java:45) + at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.getDatabase(InFlightMetadataCollectorImpl.java:223) + at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.(InFlightMetadataCollectorImpl.java:191) + at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:170) + at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.metadata(EntityManagerFactoryBuilderImpl.java:1432) + at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:1503) + at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateJpaPersistenceProvider.java:75) + at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:390) + at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:409) + at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:396) + at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.afterPropertiesSet(LocalContainerEntityManagerFactoryBean.java:366) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1833) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1782) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:600) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:522) + at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:326) + at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324) + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200) + at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1234) + at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:952) + at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:624) + at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146) + at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754) + at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:456) + at org.springframework.boot.SpringApplication.run(SpringApplication.java:334) + at org.springframework.boot.SpringApplication.run(SpringApplication.java:1354) + at org.springframework.boot.SpringApplication.run(SpringApplication.java:1343) + at com.example.demo.DemoApplication.main(DemoApplication.java:39) +Caused by: org.h2.jdbc.JdbcSQLNonTransientException: Внутренняя ошибка: "org.h2.mvstore.MVStoreException: The file is locked: C:/4 semestr/IP/IP-Labs-4-semestr/data.mv.db [2.2.224/7]" +General error: "org.h2.mvstore.MVStoreException: The file is locked: C:/4 semestr/IP/IP-Labs-4-semestr/data.mv.db [2.2.224/7]" [50000-224] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:566) + at org.h2.message.DbException.getJdbcSQLException(DbException.java:489) + ... 61 more +Caused by: org.h2.mvstore.MVStoreException: The file is locked: C:/4 semestr/IP/IP-Labs-4-semestr/data.mv.db [2.2.224/7] + at org.h2.mvstore.DataUtils.newMVStoreException(DataUtils.java:996) + at org.h2.mvstore.SingleFileStore.lockFileChannel(SingleFileStore.java:143) + at org.h2.mvstore.SingleFileStore.open(SingleFileStore.java:117) + at org.h2.mvstore.SingleFileStore.open(SingleFileStore.java:81) + at org.h2.mvstore.MVStore.(MVStore.java:286) + ... 55 more +2024-05-07 12:00:37.830000+03:00 database: flush +org.h2.message.DbException: Внутренняя ошибка: "org.h2.mvstore.MVStoreException: The file is locked: C:/Users/New/Desktop/studing/IP/LABS/IP-Labs-4-semestr/data.mv.db [2.2.224/7]" +General error: "org.h2.mvstore.MVStoreException: The file is locked: C:/Users/New/Desktop/studing/IP/LABS/IP-Labs-4-semestr/data.mv.db [2.2.224/7]" [50000-224] + at org.h2.message.DbException.get(DbException.java:212) + at org.h2.message.DbException.convert(DbException.java:407) + at org.h2.mvstore.db.Store.lambda$new$0(Store.java:122) + at org.h2.mvstore.MVStore.handleException(MVStore.java:1546) + at org.h2.mvstore.MVStore.panic(MVStore.java:371) + at org.h2.mvstore.MVStore.(MVStore.java:291) + at org.h2.mvstore.MVStore$Builder.open(MVStore.java:2035) + at org.h2.mvstore.db.Store.(Store.java:133) + at org.h2.engine.Database.(Database.java:326) + at org.h2.engine.Engine.openSession(Engine.java:92) + at org.h2.engine.Engine.openSession(Engine.java:222) + at org.h2.engine.Engine.createSession(Engine.java:201) + at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:343) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:125) + at org.h2.Driver.connect(Driver.java:59) + at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:138) + at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:359) + at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:201) + at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:470) + at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:561) + at com.zaxxer.hikari.pool.HikariPool.(HikariPool.java:100) + at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:112) + at org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl.getConnection(DatasourceConnectionProviderImpl.java:122) + at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator$ConnectionProviderJdbcConnectionAccess.obtainConnection(JdbcEnvironmentInitiator.java:428) + at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcIsolationDelegate.delegateWork(JdbcIsolationDelegate.java:61) + at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.getJdbcEnvironmentUsingJdbcMetadata(JdbcEnvironmentInitiator.java:276) + at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:107) + at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:68) + at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:130) + at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:263) + at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:238) + at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:215) + at org.hibernate.boot.model.relational.Database.(Database.java:45) + at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.getDatabase(InFlightMetadataCollectorImpl.java:223) + at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.(InFlightMetadataCollectorImpl.java:191) + at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:170) + at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.metadata(EntityManagerFactoryBuilderImpl.java:1432) + at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:1503) + at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateJpaPersistenceProvider.java:75) + at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:390) + at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:409) + at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:396) + at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.afterPropertiesSet(LocalContainerEntityManagerFactoryBean.java:366) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1833) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1782) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:600) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:522) + at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:326) + at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324) + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200) + at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1234) + at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:952) + at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:624) + at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754) + at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:456) + at org.springframework.boot.SpringApplication.run(SpringApplication.java:334) + at org.springframework.boot.test.context.SpringBootContextLoader.lambda$loadContext$3(SpringBootContextLoader.java:137) + at org.springframework.util.function.ThrowingSupplier.get(ThrowingSupplier.java:58) + at org.springframework.util.function.ThrowingSupplier.get(ThrowingSupplier.java:46) + at org.springframework.boot.SpringApplication.withHook(SpringApplication.java:1454) + at org.springframework.boot.test.context.SpringBootContextLoader$ContextLoaderHook.run(SpringBootContextLoader.java:553) + at org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:137) + at org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:108) + at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:225) + at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:152) + at org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:130) + at org.springframework.test.context.web.ServletTestExecutionListener.setUpRequestContextIfNecessary(ServletTestExecutionListener.java:191) + at org.springframework.test.context.web.ServletTestExecutionListener.prepareTestInstance(ServletTestExecutionListener.java:130) + at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:260) + at org.springframework.test.context.junit.jupiter.SpringExtension.postProcessTestInstance(SpringExtension.java:163) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeTestInstancePostProcessors$10(ClassBasedTestDescriptor.java:378) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.executeAndMaskThrowable(ClassBasedTestDescriptor.java:383) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeTestInstancePostProcessors$11(ClassBasedTestDescriptor.java:378) + at java.base/java.util.stream.ReferencePipeline$3$1.accept(Unknown Source) + at java.base/java.util.stream.ReferencePipeline$2$1.accept(Unknown Source) + at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(Unknown Source) + at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source) + at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source) + at java.base/java.util.stream.StreamSpliterators$WrappingSpliterator.forEachRemaining(Unknown Source) + at java.base/java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Unknown Source) + at java.base/java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Unknown Source) + at java.base/java.util.stream.ReferencePipeline$Head.forEach(Unknown Source) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeTestInstancePostProcessors(ClassBasedTestDescriptor.java:377) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$instantiateAndPostProcessTestInstance$6(ClassBasedTestDescriptor.java:290) + at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.instantiateAndPostProcessTestInstance(ClassBasedTestDescriptor.java:289) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$testInstancesProvider$4(ClassBasedTestDescriptor.java:279) + at java.base/java.util.Optional.orElseGet(Unknown Source) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$testInstancesProvider$5(ClassBasedTestDescriptor.java:278) + at org.junit.jupiter.engine.execution.TestInstancesProvider.getTestInstances(TestInstancesProvider.java:31) + at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$prepare$0(TestMethodTestDescriptor.java:106) + at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) + at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare(TestMethodTestDescriptor.java:105) + at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare(TestMethodTestDescriptor.java:69) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$prepare$2(NodeTestTask.java:123) + at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.prepare(NodeTestTask.java:123) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:90) + at java.base/java.util.ArrayList.forEach(Unknown Source) + at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155) + at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141) + at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139) + at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95) + at java.base/java.util.ArrayList.forEach(Unknown Source) + at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155) + at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141) + at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139) + at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95) + at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35) + at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57) + at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54) + at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:147) + at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:127) + at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:90) + at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:55) + at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:102) + at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:54) + at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114) + at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:95) + at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:91) + at org.junit.platform.launcher.core.SessionPerRequestLauncher.execute(SessionPerRequestLauncher.java:60) + at org.eclipse.jdt.internal.junit5.runner.JUnit5TestReference.run(JUnit5TestReference.java:98) + at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:40) + at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:529) + at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:757) + at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:452) + at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:210) +Caused by: org.h2.jdbc.JdbcSQLNonTransientException: Внутренняя ошибка: "org.h2.mvstore.MVStoreException: The file is locked: C:/Users/New/Desktop/studing/IP/LABS/IP-Labs-4-semestr/data.mv.db [2.2.224/7]" +General error: "org.h2.mvstore.MVStoreException: The file is locked: C:/Users/New/Desktop/studing/IP/LABS/IP-Labs-4-semestr/data.mv.db [2.2.224/7]" [50000-224] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:566) + at org.h2.message.DbException.getJdbcSQLException(DbException.java:489) + ... 138 more +Caused by: org.h2.mvstore.MVStoreException: The file is locked: C:/Users/New/Desktop/studing/IP/LABS/IP-Labs-4-semestr/data.mv.db [2.2.224/7] + at org.h2.mvstore.DataUtils.newMVStoreException(DataUtils.java:996) + at org.h2.mvstore.SingleFileStore.lockFileChannel(SingleFileStore.java:143) + at org.h2.mvstore.SingleFileStore.open(SingleFileStore.java:117) + at org.h2.mvstore.SingleFileStore.open(SingleFileStore.java:81) + at org.h2.mvstore.MVStore.(MVStore.java:286) + ... 132 more +2024-05-07 12:08:02.812883+03:00 database: flush +org.h2.message.DbException: Внутренняя ошибка: "org.h2.mvstore.MVStoreException: The file is locked: C:/Users/New/Desktop/studing/IP/LABS/IP-Labs-4-semestr/data.mv.db [2.2.224/7]" +General error: "org.h2.mvstore.MVStoreException: The file is locked: C:/Users/New/Desktop/studing/IP/LABS/IP-Labs-4-semestr/data.mv.db [2.2.224/7]" [50000-224] + at org.h2.message.DbException.get(DbException.java:212) + at org.h2.message.DbException.convert(DbException.java:407) + at org.h2.mvstore.db.Store.lambda$new$0(Store.java:122) + at org.h2.mvstore.MVStore.handleException(MVStore.java:1546) + at org.h2.mvstore.MVStore.panic(MVStore.java:371) + at org.h2.mvstore.MVStore.(MVStore.java:291) + at org.h2.mvstore.MVStore$Builder.open(MVStore.java:2035) + at org.h2.mvstore.db.Store.(Store.java:133) + at org.h2.engine.Database.(Database.java:326) + at org.h2.engine.Engine.openSession(Engine.java:92) + at org.h2.engine.Engine.openSession(Engine.java:222) + at org.h2.engine.Engine.createSession(Engine.java:201) + at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:343) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:125) + at org.h2.Driver.connect(Driver.java:59) + at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:138) + at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:359) + at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:201) + at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:470) + at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:561) + at com.zaxxer.hikari.pool.HikariPool.(HikariPool.java:100) + at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:112) + at org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl.getConnection(DatasourceConnectionProviderImpl.java:122) + at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator$ConnectionProviderJdbcConnectionAccess.obtainConnection(JdbcEnvironmentInitiator.java:428) + at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcIsolationDelegate.delegateWork(JdbcIsolationDelegate.java:61) + at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.getJdbcEnvironmentUsingJdbcMetadata(JdbcEnvironmentInitiator.java:276) + at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:107) + at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:68) + at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:130) + at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:263) + at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:238) + at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:215) + at org.hibernate.boot.model.relational.Database.(Database.java:45) + at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.getDatabase(InFlightMetadataCollectorImpl.java:223) + at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.(InFlightMetadataCollectorImpl.java:191) + at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:170) + at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.metadata(EntityManagerFactoryBuilderImpl.java:1432) + at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:1503) + at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateJpaPersistenceProvider.java:75) + at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:390) + at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:409) + at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:396) + at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.afterPropertiesSet(LocalContainerEntityManagerFactoryBean.java:366) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1833) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1782) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:600) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:522) + at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:326) + at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324) + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200) + at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1234) + at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:952) + at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:624) + at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754) + at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:456) + at org.springframework.boot.SpringApplication.run(SpringApplication.java:334) + at org.springframework.boot.test.context.SpringBootContextLoader.lambda$loadContext$3(SpringBootContextLoader.java:137) + at org.springframework.util.function.ThrowingSupplier.get(ThrowingSupplier.java:58) + at org.springframework.util.function.ThrowingSupplier.get(ThrowingSupplier.java:46) + at org.springframework.boot.SpringApplication.withHook(SpringApplication.java:1454) + at org.springframework.boot.test.context.SpringBootContextLoader$ContextLoaderHook.run(SpringBootContextLoader.java:553) + at org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:137) + at org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:108) + at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:225) + at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:152) + at org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:130) + at org.springframework.test.context.web.ServletTestExecutionListener.setUpRequestContextIfNecessary(ServletTestExecutionListener.java:191) + at org.springframework.test.context.web.ServletTestExecutionListener.prepareTestInstance(ServletTestExecutionListener.java:130) + at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:260) + at org.springframework.test.context.junit.jupiter.SpringExtension.postProcessTestInstance(SpringExtension.java:163) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeTestInstancePostProcessors$10(ClassBasedTestDescriptor.java:378) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.executeAndMaskThrowable(ClassBasedTestDescriptor.java:383) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeTestInstancePostProcessors$11(ClassBasedTestDescriptor.java:378) + at java.base/java.util.stream.ReferencePipeline$3$1.accept(Unknown Source) + at java.base/java.util.stream.ReferencePipeline$2$1.accept(Unknown Source) + at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(Unknown Source) + at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source) + at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source) + at java.base/java.util.stream.StreamSpliterators$WrappingSpliterator.forEachRemaining(Unknown Source) + at java.base/java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Unknown Source) + at java.base/java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Unknown Source) + at java.base/java.util.stream.ReferencePipeline$Head.forEach(Unknown Source) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeTestInstancePostProcessors(ClassBasedTestDescriptor.java:377) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$instantiateAndPostProcessTestInstance$6(ClassBasedTestDescriptor.java:290) + at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.instantiateAndPostProcessTestInstance(ClassBasedTestDescriptor.java:289) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$testInstancesProvider$4(ClassBasedTestDescriptor.java:279) + at java.base/java.util.Optional.orElseGet(Unknown Source) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$testInstancesProvider$5(ClassBasedTestDescriptor.java:278) + at org.junit.jupiter.engine.execution.TestInstancesProvider.getTestInstances(TestInstancesProvider.java:31) + at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$prepare$0(TestMethodTestDescriptor.java:106) + at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) + at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare(TestMethodTestDescriptor.java:105) + at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare(TestMethodTestDescriptor.java:69) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$prepare$2(NodeTestTask.java:123) + at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.prepare(NodeTestTask.java:123) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:90) + at java.base/java.util.ArrayList.forEach(Unknown Source) + at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155) + at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141) + at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139) + at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95) + at java.base/java.util.ArrayList.forEach(Unknown Source) + at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155) + at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141) + at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139) + at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95) + at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35) + at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57) + at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54) + at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:147) + at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:127) + at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:90) + at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:55) + at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:102) + at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:54) + at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114) + at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:95) + at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:91) + at org.junit.platform.launcher.core.SessionPerRequestLauncher.execute(SessionPerRequestLauncher.java:60) + at org.eclipse.jdt.internal.junit5.runner.JUnit5TestReference.run(JUnit5TestReference.java:98) + at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:40) + at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:529) + at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:757) + at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:452) + at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:210) +Caused by: org.h2.jdbc.JdbcSQLNonTransientException: Внутренняя ошибка: "org.h2.mvstore.MVStoreException: The file is locked: C:/Users/New/Desktop/studing/IP/LABS/IP-Labs-4-semestr/data.mv.db [2.2.224/7]" +General error: "org.h2.mvstore.MVStoreException: The file is locked: C:/Users/New/Desktop/studing/IP/LABS/IP-Labs-4-semestr/data.mv.db [2.2.224/7]" [50000-224] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:566) + at org.h2.message.DbException.getJdbcSQLException(DbException.java:489) + ... 138 more +Caused by: org.h2.mvstore.MVStoreException: The file is locked: C:/Users/New/Desktop/studing/IP/LABS/IP-Labs-4-semestr/data.mv.db [2.2.224/7] + at org.h2.mvstore.DataUtils.newMVStoreException(DataUtils.java:996) + at org.h2.mvstore.SingleFileStore.lockFileChannel(SingleFileStore.java:143) + at org.h2.mvstore.SingleFileStore.open(SingleFileStore.java:117) + at org.h2.mvstore.SingleFileStore.open(SingleFileStore.java:81) + at org.h2.mvstore.MVStore.(MVStore.java:286) + ... 132 more +2024-05-07 12:11:16.128521+03:00 database: flush +org.h2.message.DbException: Внутренняя ошибка: "org.h2.mvstore.MVStoreException: The file is locked: C:/Users/New/Desktop/studing/IP/LABS/IP-Labs-4-semestr/data.mv.db [2.2.224/7]" +General error: "org.h2.mvstore.MVStoreException: The file is locked: C:/Users/New/Desktop/studing/IP/LABS/IP-Labs-4-semestr/data.mv.db [2.2.224/7]" [50000-224] + at org.h2.message.DbException.get(DbException.java:212) + at org.h2.message.DbException.convert(DbException.java:407) + at org.h2.mvstore.db.Store.lambda$new$0(Store.java:122) + at org.h2.mvstore.MVStore.handleException(MVStore.java:1546) + at org.h2.mvstore.MVStore.panic(MVStore.java:371) + at org.h2.mvstore.MVStore.(MVStore.java:291) + at org.h2.mvstore.MVStore$Builder.open(MVStore.java:2035) + at org.h2.mvstore.db.Store.(Store.java:133) + at org.h2.engine.Database.(Database.java:326) + at org.h2.engine.Engine.openSession(Engine.java:92) + at org.h2.engine.Engine.openSession(Engine.java:222) + at org.h2.engine.Engine.createSession(Engine.java:201) + at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:343) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:125) + at org.h2.Driver.connect(Driver.java:59) + at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:138) + at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:359) + at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:201) + at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:470) + at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:561) + at com.zaxxer.hikari.pool.HikariPool.(HikariPool.java:100) + at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:112) + at org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl.getConnection(DatasourceConnectionProviderImpl.java:122) + at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator$ConnectionProviderJdbcConnectionAccess.obtainConnection(JdbcEnvironmentInitiator.java:428) + at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcIsolationDelegate.delegateWork(JdbcIsolationDelegate.java:61) + at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.getJdbcEnvironmentUsingJdbcMetadata(JdbcEnvironmentInitiator.java:276) + at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:107) + at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:68) + at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:130) + at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:263) + at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:238) + at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:215) + at org.hibernate.boot.model.relational.Database.(Database.java:45) + at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.getDatabase(InFlightMetadataCollectorImpl.java:223) + at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.(InFlightMetadataCollectorImpl.java:191) + at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:170) + at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.metadata(EntityManagerFactoryBuilderImpl.java:1432) + at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:1503) + at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateJpaPersistenceProvider.java:75) + at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:390) + at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:409) + at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:396) + at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.afterPropertiesSet(LocalContainerEntityManagerFactoryBean.java:366) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1833) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1782) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:600) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:522) + at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:326) + at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324) + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200) + at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1234) + at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:952) + at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:624) + at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754) + at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:456) + at org.springframework.boot.SpringApplication.run(SpringApplication.java:334) + at org.springframework.boot.test.context.SpringBootContextLoader.lambda$loadContext$3(SpringBootContextLoader.java:137) + at org.springframework.util.function.ThrowingSupplier.get(ThrowingSupplier.java:58) + at org.springframework.util.function.ThrowingSupplier.get(ThrowingSupplier.java:46) + at org.springframework.boot.SpringApplication.withHook(SpringApplication.java:1454) + at org.springframework.boot.test.context.SpringBootContextLoader$ContextLoaderHook.run(SpringBootContextLoader.java:553) + at org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:137) + at org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:108) + at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:225) + at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:152) + at org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:130) + at org.springframework.test.context.web.ServletTestExecutionListener.setUpRequestContextIfNecessary(ServletTestExecutionListener.java:191) + at org.springframework.test.context.web.ServletTestExecutionListener.prepareTestInstance(ServletTestExecutionListener.java:130) + at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:260) + at org.springframework.test.context.junit.jupiter.SpringExtension.postProcessTestInstance(SpringExtension.java:163) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeTestInstancePostProcessors$10(ClassBasedTestDescriptor.java:378) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.executeAndMaskThrowable(ClassBasedTestDescriptor.java:383) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeTestInstancePostProcessors$11(ClassBasedTestDescriptor.java:378) + at java.base/java.util.stream.ReferencePipeline$3$1.accept(Unknown Source) + at java.base/java.util.stream.ReferencePipeline$2$1.accept(Unknown Source) + at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(Unknown Source) + at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source) + at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source) + at java.base/java.util.stream.StreamSpliterators$WrappingSpliterator.forEachRemaining(Unknown Source) + at java.base/java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Unknown Source) + at java.base/java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Unknown Source) + at java.base/java.util.stream.ReferencePipeline$Head.forEach(Unknown Source) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeTestInstancePostProcessors(ClassBasedTestDescriptor.java:377) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$instantiateAndPostProcessTestInstance$6(ClassBasedTestDescriptor.java:290) + at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.instantiateAndPostProcessTestInstance(ClassBasedTestDescriptor.java:289) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$testInstancesProvider$4(ClassBasedTestDescriptor.java:279) + at java.base/java.util.Optional.orElseGet(Unknown Source) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$testInstancesProvider$5(ClassBasedTestDescriptor.java:278) + at org.junit.jupiter.engine.execution.TestInstancesProvider.getTestInstances(TestInstancesProvider.java:31) + at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$prepare$0(TestMethodTestDescriptor.java:106) + at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) + at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare(TestMethodTestDescriptor.java:105) + at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare(TestMethodTestDescriptor.java:69) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$prepare$2(NodeTestTask.java:123) + at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.prepare(NodeTestTask.java:123) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:90) + at java.base/java.util.ArrayList.forEach(Unknown Source) + at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155) + at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141) + at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139) + at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95) + at java.base/java.util.ArrayList.forEach(Unknown Source) + at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155) + at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141) + at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139) + at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95) + at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35) + at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57) + at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54) + at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:147) + at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:127) + at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:90) + at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:55) + at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:102) + at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:54) + at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114) + at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:95) + at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:91) + at org.junit.platform.launcher.core.SessionPerRequestLauncher.execute(SessionPerRequestLauncher.java:60) + at org.eclipse.jdt.internal.junit5.runner.JUnit5TestReference.run(JUnit5TestReference.java:98) + at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:40) + at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:529) + at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:757) + at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:452) + at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:210) +Caused by: org.h2.jdbc.JdbcSQLNonTransientException: Внутренняя ошибка: "org.h2.mvstore.MVStoreException: The file is locked: C:/Users/New/Desktop/studing/IP/LABS/IP-Labs-4-semestr/data.mv.db [2.2.224/7]" +General error: "org.h2.mvstore.MVStoreException: The file is locked: C:/Users/New/Desktop/studing/IP/LABS/IP-Labs-4-semestr/data.mv.db [2.2.224/7]" [50000-224] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:566) + at org.h2.message.DbException.getJdbcSQLException(DbException.java:489) + ... 138 more +Caused by: org.h2.mvstore.MVStoreException: The file is locked: C:/Users/New/Desktop/studing/IP/LABS/IP-Labs-4-semestr/data.mv.db [2.2.224/7] + at org.h2.mvstore.DataUtils.newMVStoreException(DataUtils.java:996) + at org.h2.mvstore.SingleFileStore.lockFileChannel(SingleFileStore.java:143) + at org.h2.mvstore.SingleFileStore.open(SingleFileStore.java:117) + at org.h2.mvstore.SingleFileStore.open(SingleFileStore.java:81) + at org.h2.mvstore.MVStore.(MVStore.java:286) + ... 132 more +2024-05-07 12:24:39.671562+03:00 database: flush +org.h2.message.DbException: Внутренняя ошибка: "org.h2.mvstore.MVStoreException: The file is locked: C:/Users/New/Desktop/studing/IP/LABS/IP-Labs-4-semestr/data.mv.db [2.2.224/7]" +General error: "org.h2.mvstore.MVStoreException: The file is locked: C:/Users/New/Desktop/studing/IP/LABS/IP-Labs-4-semestr/data.mv.db [2.2.224/7]" [50000-224] + at org.h2.message.DbException.get(DbException.java:212) + at org.h2.message.DbException.convert(DbException.java:407) + at org.h2.mvstore.db.Store.lambda$new$0(Store.java:122) + at org.h2.mvstore.MVStore.handleException(MVStore.java:1546) + at org.h2.mvstore.MVStore.panic(MVStore.java:371) + at org.h2.mvstore.MVStore.(MVStore.java:291) + at org.h2.mvstore.MVStore$Builder.open(MVStore.java:2035) + at org.h2.mvstore.db.Store.(Store.java:133) + at org.h2.engine.Database.(Database.java:326) + at org.h2.engine.Engine.openSession(Engine.java:92) + at org.h2.engine.Engine.openSession(Engine.java:222) + at org.h2.engine.Engine.createSession(Engine.java:201) + at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:343) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:125) + at org.h2.Driver.connect(Driver.java:59) + at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:138) + at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:359) + at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:201) + at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:470) + at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:561) + at com.zaxxer.hikari.pool.HikariPool.(HikariPool.java:100) + at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:112) + at org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl.getConnection(DatasourceConnectionProviderImpl.java:122) + at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator$ConnectionProviderJdbcConnectionAccess.obtainConnection(JdbcEnvironmentInitiator.java:428) + at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcIsolationDelegate.delegateWork(JdbcIsolationDelegate.java:61) + at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.getJdbcEnvironmentUsingJdbcMetadata(JdbcEnvironmentInitiator.java:276) + at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:107) + at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:68) + at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:130) + at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:263) + at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:238) + at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:215) + at org.hibernate.boot.model.relational.Database.(Database.java:45) + at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.getDatabase(InFlightMetadataCollectorImpl.java:223) + at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.(InFlightMetadataCollectorImpl.java:191) + at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:170) + at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.metadata(EntityManagerFactoryBuilderImpl.java:1432) + at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:1503) + at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateJpaPersistenceProvider.java:75) + at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:390) + at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:409) + at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:396) + at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.afterPropertiesSet(LocalContainerEntityManagerFactoryBean.java:366) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1833) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1782) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:600) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:522) + at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:326) + at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324) + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200) + at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1234) + at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:952) + at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:624) + at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754) + at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:456) + at org.springframework.boot.SpringApplication.run(SpringApplication.java:334) + at org.springframework.boot.test.context.SpringBootContextLoader.lambda$loadContext$3(SpringBootContextLoader.java:137) + at org.springframework.util.function.ThrowingSupplier.get(ThrowingSupplier.java:58) + at org.springframework.util.function.ThrowingSupplier.get(ThrowingSupplier.java:46) + at org.springframework.boot.SpringApplication.withHook(SpringApplication.java:1454) + at org.springframework.boot.test.context.SpringBootContextLoader$ContextLoaderHook.run(SpringBootContextLoader.java:553) + at org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:137) + at org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:108) + at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:225) + at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:152) + at org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:130) + at org.springframework.test.context.web.ServletTestExecutionListener.setUpRequestContextIfNecessary(ServletTestExecutionListener.java:191) + at org.springframework.test.context.web.ServletTestExecutionListener.prepareTestInstance(ServletTestExecutionListener.java:130) + at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:260) + at org.springframework.test.context.junit.jupiter.SpringExtension.postProcessTestInstance(SpringExtension.java:163) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeTestInstancePostProcessors$10(ClassBasedTestDescriptor.java:378) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.executeAndMaskThrowable(ClassBasedTestDescriptor.java:383) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeTestInstancePostProcessors$11(ClassBasedTestDescriptor.java:378) + at java.base/java.util.stream.ReferencePipeline$3$1.accept(Unknown Source) + at java.base/java.util.stream.ReferencePipeline$2$1.accept(Unknown Source) + at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(Unknown Source) + at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source) + at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source) + at java.base/java.util.stream.StreamSpliterators$WrappingSpliterator.forEachRemaining(Unknown Source) + at java.base/java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Unknown Source) + at java.base/java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Unknown Source) + at java.base/java.util.stream.ReferencePipeline$Head.forEach(Unknown Source) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeTestInstancePostProcessors(ClassBasedTestDescriptor.java:377) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$instantiateAndPostProcessTestInstance$6(ClassBasedTestDescriptor.java:290) + at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.instantiateAndPostProcessTestInstance(ClassBasedTestDescriptor.java:289) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$testInstancesProvider$4(ClassBasedTestDescriptor.java:279) + at java.base/java.util.Optional.orElseGet(Unknown Source) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$testInstancesProvider$5(ClassBasedTestDescriptor.java:278) + at org.junit.jupiter.engine.execution.TestInstancesProvider.getTestInstances(TestInstancesProvider.java:31) + at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$prepare$0(TestMethodTestDescriptor.java:106) + at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) + at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare(TestMethodTestDescriptor.java:105) + at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare(TestMethodTestDescriptor.java:69) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$prepare$2(NodeTestTask.java:123) + at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.prepare(NodeTestTask.java:123) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:90) + at java.base/java.util.ArrayList.forEach(Unknown Source) + at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155) + at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141) + at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139) + at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95) + at java.base/java.util.ArrayList.forEach(Unknown Source) + at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155) + at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141) + at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139) + at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95) + at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35) + at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57) + at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54) + at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:147) + at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:127) + at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:90) + at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:55) + at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:102) + at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:54) + at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114) + at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:95) + at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:91) + at org.junit.platform.launcher.core.SessionPerRequestLauncher.execute(SessionPerRequestLauncher.java:60) + at org.eclipse.jdt.internal.junit5.runner.JUnit5TestReference.run(JUnit5TestReference.java:98) + at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:40) + at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:529) + at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:757) + at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:452) + at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:210) +Caused by: org.h2.jdbc.JdbcSQLNonTransientException: Внутренняя ошибка: "org.h2.mvstore.MVStoreException: The file is locked: C:/Users/New/Desktop/studing/IP/LABS/IP-Labs-4-semestr/data.mv.db [2.2.224/7]" +General error: "org.h2.mvstore.MVStoreException: The file is locked: C:/Users/New/Desktop/studing/IP/LABS/IP-Labs-4-semestr/data.mv.db [2.2.224/7]" [50000-224] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:566) + at org.h2.message.DbException.getJdbcSQLException(DbException.java:489) + ... 138 more +Caused by: org.h2.mvstore.MVStoreException: The file is locked: C:/Users/New/Desktop/studing/IP/LABS/IP-Labs-4-semestr/data.mv.db [2.2.224/7] + at org.h2.mvstore.DataUtils.newMVStoreException(DataUtils.java:996) + at org.h2.mvstore.SingleFileStore.lockFileChannel(SingleFileStore.java:143) + at org.h2.mvstore.SingleFileStore.open(SingleFileStore.java:117) + at org.h2.mvstore.SingleFileStore.open(SingleFileStore.java:81) + at org.h2.mvstore.MVStore.(MVStore.java:286) + ... 132 more +2024-05-07 13:58:21.410653+03:00 database: flush +org.h2.message.DbException: Внутренняя ошибка: "org.h2.mvstore.MVStoreException: The file is locked: C:/Users/New/Desktop/studing/IP/LABS/IP-Labs-4-semestr/data.mv.db [2.2.224/7]" +General error: "org.h2.mvstore.MVStoreException: The file is locked: C:/Users/New/Desktop/studing/IP/LABS/IP-Labs-4-semestr/data.mv.db [2.2.224/7]" [50000-224] + at org.h2.message.DbException.get(DbException.java:212) + at org.h2.message.DbException.convert(DbException.java:407) + at org.h2.mvstore.db.Store.lambda$new$0(Store.java:122) + at org.h2.mvstore.MVStore.handleException(MVStore.java:1546) + at org.h2.mvstore.MVStore.panic(MVStore.java:371) + at org.h2.mvstore.MVStore.(MVStore.java:291) + at org.h2.mvstore.MVStore$Builder.open(MVStore.java:2035) + at org.h2.mvstore.db.Store.(Store.java:133) + at org.h2.engine.Database.(Database.java:326) + at org.h2.engine.Engine.openSession(Engine.java:92) + at org.h2.engine.Engine.openSession(Engine.java:222) + at org.h2.engine.Engine.createSession(Engine.java:201) + at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:343) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:125) + at org.h2.Driver.connect(Driver.java:59) + at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:138) + at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:359) + at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:201) + at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:470) + at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:561) + at com.zaxxer.hikari.pool.HikariPool.(HikariPool.java:100) + at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:112) + at org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl.getConnection(DatasourceConnectionProviderImpl.java:122) + at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator$ConnectionProviderJdbcConnectionAccess.obtainConnection(JdbcEnvironmentInitiator.java:428) + at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcIsolationDelegate.delegateWork(JdbcIsolationDelegate.java:61) + at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.getJdbcEnvironmentUsingJdbcMetadata(JdbcEnvironmentInitiator.java:276) + at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:107) + at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:68) + at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:130) + at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:263) + at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:238) + at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:215) + at org.hibernate.boot.model.relational.Database.(Database.java:45) + at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.getDatabase(InFlightMetadataCollectorImpl.java:223) + at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.(InFlightMetadataCollectorImpl.java:191) + at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:170) + at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.metadata(EntityManagerFactoryBuilderImpl.java:1432) + at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:1503) + at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateJpaPersistenceProvider.java:75) + at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:390) + at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:409) + at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:396) + at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.afterPropertiesSet(LocalContainerEntityManagerFactoryBean.java:366) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1833) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1782) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:600) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:522) + at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:326) + at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324) + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200) + at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1234) + at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:952) + at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:624) + at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754) + at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:456) + at org.springframework.boot.SpringApplication.run(SpringApplication.java:334) + at org.springframework.boot.test.context.SpringBootContextLoader.lambda$loadContext$3(SpringBootContextLoader.java:137) + at org.springframework.util.function.ThrowingSupplier.get(ThrowingSupplier.java:58) + at org.springframework.util.function.ThrowingSupplier.get(ThrowingSupplier.java:46) + at org.springframework.boot.SpringApplication.withHook(SpringApplication.java:1454) + at org.springframework.boot.test.context.SpringBootContextLoader$ContextLoaderHook.run(SpringBootContextLoader.java:553) + at org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:137) + at org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:108) + at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:225) + at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:152) + at org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:130) + at org.springframework.test.context.web.ServletTestExecutionListener.setUpRequestContextIfNecessary(ServletTestExecutionListener.java:191) + at org.springframework.test.context.web.ServletTestExecutionListener.prepareTestInstance(ServletTestExecutionListener.java:130) + at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:260) + at org.springframework.test.context.junit.jupiter.SpringExtension.postProcessTestInstance(SpringExtension.java:163) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeTestInstancePostProcessors$10(ClassBasedTestDescriptor.java:378) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.executeAndMaskThrowable(ClassBasedTestDescriptor.java:383) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeTestInstancePostProcessors$11(ClassBasedTestDescriptor.java:378) + at java.base/java.util.stream.ReferencePipeline$3$1.accept(Unknown Source) + at java.base/java.util.stream.ReferencePipeline$2$1.accept(Unknown Source) + at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(Unknown Source) + at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source) + at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source) + at java.base/java.util.stream.StreamSpliterators$WrappingSpliterator.forEachRemaining(Unknown Source) + at java.base/java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Unknown Source) + at java.base/java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Unknown Source) + at java.base/java.util.stream.ReferencePipeline$Head.forEach(Unknown Source) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeTestInstancePostProcessors(ClassBasedTestDescriptor.java:377) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$instantiateAndPostProcessTestInstance$6(ClassBasedTestDescriptor.java:290) + at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.instantiateAndPostProcessTestInstance(ClassBasedTestDescriptor.java:289) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$testInstancesProvider$4(ClassBasedTestDescriptor.java:279) + at java.base/java.util.Optional.orElseGet(Unknown Source) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$testInstancesProvider$5(ClassBasedTestDescriptor.java:278) + at org.junit.jupiter.engine.execution.TestInstancesProvider.getTestInstances(TestInstancesProvider.java:31) + at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$prepare$0(TestMethodTestDescriptor.java:106) + at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) + at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare(TestMethodTestDescriptor.java:105) + at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare(TestMethodTestDescriptor.java:69) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$prepare$2(NodeTestTask.java:123) + at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.prepare(NodeTestTask.java:123) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:90) + at java.base/java.util.ArrayList.forEach(Unknown Source) + at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155) + at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141) + at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139) + at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95) + at java.base/java.util.ArrayList.forEach(Unknown Source) + at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155) + at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141) + at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139) + at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95) + at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35) + at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57) + at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54) + at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:147) + at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:127) + at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:90) + at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:55) + at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:102) + at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:54) + at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114) + at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:95) + at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:91) + at org.junit.platform.launcher.core.SessionPerRequestLauncher.execute(SessionPerRequestLauncher.java:60) + at org.eclipse.jdt.internal.junit5.runner.JUnit5TestReference.run(JUnit5TestReference.java:98) + at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:40) + at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:529) + at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:757) + at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:452) + at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:210) +Caused by: org.h2.jdbc.JdbcSQLNonTransientException: Внутренняя ошибка: "org.h2.mvstore.MVStoreException: The file is locked: C:/Users/New/Desktop/studing/IP/LABS/IP-Labs-4-semestr/data.mv.db [2.2.224/7]" +General error: "org.h2.mvstore.MVStoreException: The file is locked: C:/Users/New/Desktop/studing/IP/LABS/IP-Labs-4-semestr/data.mv.db [2.2.224/7]" [50000-224] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:566) + at org.h2.message.DbException.getJdbcSQLException(DbException.java:489) + ... 138 more +Caused by: org.h2.mvstore.MVStoreException: The file is locked: C:/Users/New/Desktop/studing/IP/LABS/IP-Labs-4-semestr/data.mv.db [2.2.224/7] + at org.h2.mvstore.DataUtils.newMVStoreException(DataUtils.java:996) + at org.h2.mvstore.SingleFileStore.lockFileChannel(SingleFileStore.java:143) + at org.h2.mvstore.SingleFileStore.open(SingleFileStore.java:117) + at org.h2.mvstore.SingleFileStore.open(SingleFileStore.java:81) + at org.h2.mvstore.MVStore.(MVStore.java:286) + ... 132 more +2024-05-07 13:59:10.965031+03:00 database: flush +org.h2.message.DbException: Внутренняя ошибка: "org.h2.mvstore.MVStoreException: The file is locked: C:/Users/New/Desktop/studing/IP/LABS/IP-Labs-4-semestr/data.mv.db [2.2.224/7]" +General error: "org.h2.mvstore.MVStoreException: The file is locked: C:/Users/New/Desktop/studing/IP/LABS/IP-Labs-4-semestr/data.mv.db [2.2.224/7]" [50000-224] + at org.h2.message.DbException.get(DbException.java:212) + at org.h2.message.DbException.convert(DbException.java:407) + at org.h2.mvstore.db.Store.lambda$new$0(Store.java:122) + at org.h2.mvstore.MVStore.handleException(MVStore.java:1546) + at org.h2.mvstore.MVStore.panic(MVStore.java:371) + at org.h2.mvstore.MVStore.(MVStore.java:291) + at org.h2.mvstore.MVStore$Builder.open(MVStore.java:2035) + at org.h2.mvstore.db.Store.(Store.java:133) + at org.h2.engine.Database.(Database.java:326) + at org.h2.engine.Engine.openSession(Engine.java:92) + at org.h2.engine.Engine.openSession(Engine.java:222) + at org.h2.engine.Engine.createSession(Engine.java:201) + at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:343) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:125) + at org.h2.Driver.connect(Driver.java:59) + at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:138) + at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:359) + at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:201) + at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:470) + at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:561) + at com.zaxxer.hikari.pool.HikariPool.(HikariPool.java:100) + at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:112) + at org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl.getConnection(DatasourceConnectionProviderImpl.java:122) + at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator$ConnectionProviderJdbcConnectionAccess.obtainConnection(JdbcEnvironmentInitiator.java:428) + at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcIsolationDelegate.delegateWork(JdbcIsolationDelegate.java:61) + at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.getJdbcEnvironmentUsingJdbcMetadata(JdbcEnvironmentInitiator.java:276) + at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:107) + at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:68) + at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:130) + at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:263) + at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:238) + at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:215) + at org.hibernate.boot.model.relational.Database.(Database.java:45) + at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.getDatabase(InFlightMetadataCollectorImpl.java:223) + at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.(InFlightMetadataCollectorImpl.java:191) + at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:170) + at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.metadata(EntityManagerFactoryBuilderImpl.java:1432) + at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:1503) + at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateJpaPersistenceProvider.java:75) + at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:390) + at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:409) + at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:396) + at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.afterPropertiesSet(LocalContainerEntityManagerFactoryBean.java:366) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1833) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1782) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:600) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:522) + at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:326) + at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324) + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200) + at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1234) + at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:952) + at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:624) + at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754) + at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:456) + at org.springframework.boot.SpringApplication.run(SpringApplication.java:334) + at org.springframework.boot.test.context.SpringBootContextLoader.lambda$loadContext$3(SpringBootContextLoader.java:137) + at org.springframework.util.function.ThrowingSupplier.get(ThrowingSupplier.java:58) + at org.springframework.util.function.ThrowingSupplier.get(ThrowingSupplier.java:46) + at org.springframework.boot.SpringApplication.withHook(SpringApplication.java:1454) + at org.springframework.boot.test.context.SpringBootContextLoader$ContextLoaderHook.run(SpringBootContextLoader.java:553) + at org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:137) + at org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:108) + at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:225) + at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:152) + at org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:130) + at org.springframework.test.context.web.ServletTestExecutionListener.setUpRequestContextIfNecessary(ServletTestExecutionListener.java:191) + at org.springframework.test.context.web.ServletTestExecutionListener.prepareTestInstance(ServletTestExecutionListener.java:130) + at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:260) + at org.springframework.test.context.junit.jupiter.SpringExtension.postProcessTestInstance(SpringExtension.java:163) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeTestInstancePostProcessors$10(ClassBasedTestDescriptor.java:378) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.executeAndMaskThrowable(ClassBasedTestDescriptor.java:383) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeTestInstancePostProcessors$11(ClassBasedTestDescriptor.java:378) + at java.base/java.util.stream.ReferencePipeline$3$1.accept(Unknown Source) + at java.base/java.util.stream.ReferencePipeline$2$1.accept(Unknown Source) + at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(Unknown Source) + at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source) + at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source) + at java.base/java.util.stream.StreamSpliterators$WrappingSpliterator.forEachRemaining(Unknown Source) + at java.base/java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Unknown Source) + at java.base/java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Unknown Source) + at java.base/java.util.stream.ReferencePipeline$Head.forEach(Unknown Source) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeTestInstancePostProcessors(ClassBasedTestDescriptor.java:377) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$instantiateAndPostProcessTestInstance$6(ClassBasedTestDescriptor.java:290) + at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.instantiateAndPostProcessTestInstance(ClassBasedTestDescriptor.java:289) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$testInstancesProvider$4(ClassBasedTestDescriptor.java:279) + at java.base/java.util.Optional.orElseGet(Unknown Source) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$testInstancesProvider$5(ClassBasedTestDescriptor.java:278) + at org.junit.jupiter.engine.execution.TestInstancesProvider.getTestInstances(TestInstancesProvider.java:31) + at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$prepare$0(TestMethodTestDescriptor.java:106) + at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) + at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare(TestMethodTestDescriptor.java:105) + at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare(TestMethodTestDescriptor.java:69) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$prepare$2(NodeTestTask.java:123) + at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.prepare(NodeTestTask.java:123) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:90) + at java.base/java.util.ArrayList.forEach(Unknown Source) + at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155) + at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141) + at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139) + at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95) + at java.base/java.util.ArrayList.forEach(Unknown Source) + at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155) + at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141) + at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139) + at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95) + at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35) + at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57) + at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54) + at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:147) + at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:127) + at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:90) + at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:55) + at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:102) + at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:54) + at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114) + at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:95) + at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:91) + at org.junit.platform.launcher.core.SessionPerRequestLauncher.execute(SessionPerRequestLauncher.java:60) + at org.eclipse.jdt.internal.junit5.runner.JUnit5TestReference.run(JUnit5TestReference.java:98) + at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:40) + at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:529) + at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:757) + at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:452) + at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:210) +Caused by: org.h2.jdbc.JdbcSQLNonTransientException: Внутренняя ошибка: "org.h2.mvstore.MVStoreException: The file is locked: C:/Users/New/Desktop/studing/IP/LABS/IP-Labs-4-semestr/data.mv.db [2.2.224/7]" +General error: "org.h2.mvstore.MVStoreException: The file is locked: C:/Users/New/Desktop/studing/IP/LABS/IP-Labs-4-semestr/data.mv.db [2.2.224/7]" [50000-224] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:566) + at org.h2.message.DbException.getJdbcSQLException(DbException.java:489) + ... 138 more +Caused by: org.h2.mvstore.MVStoreException: The file is locked: C:/Users/New/Desktop/studing/IP/LABS/IP-Labs-4-semestr/data.mv.db [2.2.224/7] + at org.h2.mvstore.DataUtils.newMVStoreException(DataUtils.java:996) + at org.h2.mvstore.SingleFileStore.lockFileChannel(SingleFileStore.java:143) + at org.h2.mvstore.SingleFileStore.open(SingleFileStore.java:117) + at org.h2.mvstore.SingleFileStore.open(SingleFileStore.java:81) + at org.h2.mvstore.MVStore.(MVStore.java:286) + ... 132 more +2024-05-07 15:01:00.622650+03:00 database: flush +org.h2.message.DbException: Внутренняя ошибка: "org.h2.mvstore.MVStoreException: The file is locked: C:/Users/New/Desktop/studing/IP/LABS/IP-Labs-4-semestr/data.mv.db [2.2.224/7]" +General error: "org.h2.mvstore.MVStoreException: The file is locked: C:/Users/New/Desktop/studing/IP/LABS/IP-Labs-4-semestr/data.mv.db [2.2.224/7]" [50000-224] + at org.h2.message.DbException.get(DbException.java:212) + at org.h2.message.DbException.convert(DbException.java:407) + at org.h2.mvstore.db.Store.lambda$new$0(Store.java:122) + at org.h2.mvstore.MVStore.handleException(MVStore.java:1546) + at org.h2.mvstore.MVStore.panic(MVStore.java:371) + at org.h2.mvstore.MVStore.(MVStore.java:291) + at org.h2.mvstore.MVStore$Builder.open(MVStore.java:2035) + at org.h2.mvstore.db.Store.(Store.java:133) + at org.h2.engine.Database.(Database.java:326) + at org.h2.engine.Engine.openSession(Engine.java:92) + at org.h2.engine.Engine.openSession(Engine.java:222) + at org.h2.engine.Engine.createSession(Engine.java:201) + at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:343) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:125) + at org.h2.Driver.connect(Driver.java:59) + at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:138) + at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:359) + at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:201) + at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:470) + at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:561) + at com.zaxxer.hikari.pool.HikariPool.(HikariPool.java:100) + at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:112) + at org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl.getConnection(DatasourceConnectionProviderImpl.java:122) + at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator$ConnectionProviderJdbcConnectionAccess.obtainConnection(JdbcEnvironmentInitiator.java:428) + at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcIsolationDelegate.delegateWork(JdbcIsolationDelegate.java:61) + at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.getJdbcEnvironmentUsingJdbcMetadata(JdbcEnvironmentInitiator.java:276) + at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:107) + at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:68) + at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:130) + at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:263) + at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:238) + at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:215) + at org.hibernate.boot.model.relational.Database.(Database.java:45) + at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.getDatabase(InFlightMetadataCollectorImpl.java:223) + at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.(InFlightMetadataCollectorImpl.java:191) + at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:170) + at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.metadata(EntityManagerFactoryBuilderImpl.java:1432) + at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:1503) + at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateJpaPersistenceProvider.java:75) + at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:390) + at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:409) + at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:396) + at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.afterPropertiesSet(LocalContainerEntityManagerFactoryBean.java:366) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1833) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1782) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:600) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:522) + at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:326) + at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324) + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200) + at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1234) + at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:952) + at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:624) + at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754) + at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:456) + at org.springframework.boot.SpringApplication.run(SpringApplication.java:334) + at org.springframework.boot.test.context.SpringBootContextLoader.lambda$loadContext$3(SpringBootContextLoader.java:137) + at org.springframework.util.function.ThrowingSupplier.get(ThrowingSupplier.java:58) + at org.springframework.util.function.ThrowingSupplier.get(ThrowingSupplier.java:46) + at org.springframework.boot.SpringApplication.withHook(SpringApplication.java:1454) + at org.springframework.boot.test.context.SpringBootContextLoader$ContextLoaderHook.run(SpringBootContextLoader.java:553) + at org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:137) + at org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:108) + at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:225) + at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:152) + at org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:130) + at org.springframework.test.context.web.ServletTestExecutionListener.setUpRequestContextIfNecessary(ServletTestExecutionListener.java:191) + at org.springframework.test.context.web.ServletTestExecutionListener.prepareTestInstance(ServletTestExecutionListener.java:130) + at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:260) + at org.springframework.test.context.junit.jupiter.SpringExtension.postProcessTestInstance(SpringExtension.java:163) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeTestInstancePostProcessors$10(ClassBasedTestDescriptor.java:378) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.executeAndMaskThrowable(ClassBasedTestDescriptor.java:383) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeTestInstancePostProcessors$11(ClassBasedTestDescriptor.java:378) + at java.base/java.util.stream.ReferencePipeline$3$1.accept(Unknown Source) + at java.base/java.util.stream.ReferencePipeline$2$1.accept(Unknown Source) + at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(Unknown Source) + at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source) + at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source) + at java.base/java.util.stream.StreamSpliterators$WrappingSpliterator.forEachRemaining(Unknown Source) + at java.base/java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Unknown Source) + at java.base/java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Unknown Source) + at java.base/java.util.stream.ReferencePipeline$Head.forEach(Unknown Source) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeTestInstancePostProcessors(ClassBasedTestDescriptor.java:377) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$instantiateAndPostProcessTestInstance$6(ClassBasedTestDescriptor.java:290) + at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.instantiateAndPostProcessTestInstance(ClassBasedTestDescriptor.java:289) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$testInstancesProvider$4(ClassBasedTestDescriptor.java:279) + at java.base/java.util.Optional.orElseGet(Unknown Source) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$testInstancesProvider$5(ClassBasedTestDescriptor.java:278) + at org.junit.jupiter.engine.execution.TestInstancesProvider.getTestInstances(TestInstancesProvider.java:31) + at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$prepare$0(TestMethodTestDescriptor.java:106) + at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) + at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare(TestMethodTestDescriptor.java:105) + at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare(TestMethodTestDescriptor.java:69) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$prepare$2(NodeTestTask.java:123) + at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.prepare(NodeTestTask.java:123) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:90) + at java.base/java.util.ArrayList.forEach(Unknown Source) + at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155) + at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141) + at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139) + at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95) + at java.base/java.util.ArrayList.forEach(Unknown Source) + at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155) + at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141) + at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139) + at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95) + at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35) + at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57) + at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54) + at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:147) + at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:127) + at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:90) + at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:55) + at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:102) + at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:54) + at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114) + at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:95) + at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:91) + at org.junit.platform.launcher.core.SessionPerRequestLauncher.execute(SessionPerRequestLauncher.java:60) + at org.eclipse.jdt.internal.junit5.runner.JUnit5TestReference.run(JUnit5TestReference.java:98) + at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:40) + at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:529) + at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:757) + at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:452) + at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:210) +Caused by: org.h2.jdbc.JdbcSQLNonTransientException: Внутренняя ошибка: "org.h2.mvstore.MVStoreException: The file is locked: C:/Users/New/Desktop/studing/IP/LABS/IP-Labs-4-semestr/data.mv.db [2.2.224/7]" +General error: "org.h2.mvstore.MVStoreException: The file is locked: C:/Users/New/Desktop/studing/IP/LABS/IP-Labs-4-semestr/data.mv.db [2.2.224/7]" [50000-224] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:566) + at org.h2.message.DbException.getJdbcSQLException(DbException.java:489) + ... 138 more +Caused by: org.h2.mvstore.MVStoreException: The file is locked: C:/Users/New/Desktop/studing/IP/LABS/IP-Labs-4-semestr/data.mv.db [2.2.224/7] + at org.h2.mvstore.DataUtils.newMVStoreException(DataUtils.java:996) + at org.h2.mvstore.SingleFileStore.lockFileChannel(SingleFileStore.java:143) + at org.h2.mvstore.SingleFileStore.open(SingleFileStore.java:117) + at org.h2.mvstore.SingleFileStore.open(SingleFileStore.java:81) + at org.h2.mvstore.MVStore.(MVStore.java:286) + ... 132 more +2024-05-07 15:01:22.964891+03:00 database: flush +org.h2.message.DbException: Внутренняя ошибка: "org.h2.mvstore.MVStoreException: The file is locked: C:/Users/New/Desktop/studing/IP/LABS/IP-Labs-4-semestr/data.mv.db [2.2.224/7]" +General error: "org.h2.mvstore.MVStoreException: The file is locked: C:/Users/New/Desktop/studing/IP/LABS/IP-Labs-4-semestr/data.mv.db [2.2.224/7]" [50000-224] + at org.h2.message.DbException.get(DbException.java:212) + at org.h2.message.DbException.convert(DbException.java:407) + at org.h2.mvstore.db.Store.lambda$new$0(Store.java:122) + at org.h2.mvstore.MVStore.handleException(MVStore.java:1546) + at org.h2.mvstore.MVStore.panic(MVStore.java:371) + at org.h2.mvstore.MVStore.(MVStore.java:291) + at org.h2.mvstore.MVStore$Builder.open(MVStore.java:2035) + at org.h2.mvstore.db.Store.(Store.java:133) + at org.h2.engine.Database.(Database.java:326) + at org.h2.engine.Engine.openSession(Engine.java:92) + at org.h2.engine.Engine.openSession(Engine.java:222) + at org.h2.engine.Engine.createSession(Engine.java:201) + at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:343) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:125) + at org.h2.Driver.connect(Driver.java:59) + at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:138) + at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:359) + at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:201) + at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:470) + at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:561) + at com.zaxxer.hikari.pool.HikariPool.(HikariPool.java:100) + at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:112) + at org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl.getConnection(DatasourceConnectionProviderImpl.java:122) + at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator$ConnectionProviderJdbcConnectionAccess.obtainConnection(JdbcEnvironmentInitiator.java:428) + at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcIsolationDelegate.delegateWork(JdbcIsolationDelegate.java:61) + at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.getJdbcEnvironmentUsingJdbcMetadata(JdbcEnvironmentInitiator.java:276) + at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:107) + at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:68) + at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:130) + at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:263) + at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:238) + at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:215) + at org.hibernate.boot.model.relational.Database.(Database.java:45) + at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.getDatabase(InFlightMetadataCollectorImpl.java:223) + at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.(InFlightMetadataCollectorImpl.java:191) + at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:170) + at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.metadata(EntityManagerFactoryBuilderImpl.java:1432) + at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:1503) + at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateJpaPersistenceProvider.java:75) + at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:390) + at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:409) + at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:396) + at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.afterPropertiesSet(LocalContainerEntityManagerFactoryBean.java:366) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1833) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1782) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:600) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:522) + at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:326) + at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324) + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200) + at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1234) + at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:952) + at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:624) + at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754) + at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:456) + at org.springframework.boot.SpringApplication.run(SpringApplication.java:334) + at org.springframework.boot.test.context.SpringBootContextLoader.lambda$loadContext$3(SpringBootContextLoader.java:137) + at org.springframework.util.function.ThrowingSupplier.get(ThrowingSupplier.java:58) + at org.springframework.util.function.ThrowingSupplier.get(ThrowingSupplier.java:46) + at org.springframework.boot.SpringApplication.withHook(SpringApplication.java:1454) + at org.springframework.boot.test.context.SpringBootContextLoader$ContextLoaderHook.run(SpringBootContextLoader.java:553) + at org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:137) + at org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:108) + at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:225) + at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:152) + at org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:130) + at org.springframework.test.context.web.ServletTestExecutionListener.setUpRequestContextIfNecessary(ServletTestExecutionListener.java:191) + at org.springframework.test.context.web.ServletTestExecutionListener.prepareTestInstance(ServletTestExecutionListener.java:130) + at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:260) + at org.springframework.test.context.junit.jupiter.SpringExtension.postProcessTestInstance(SpringExtension.java:163) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeTestInstancePostProcessors$10(ClassBasedTestDescriptor.java:378) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.executeAndMaskThrowable(ClassBasedTestDescriptor.java:383) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeTestInstancePostProcessors$11(ClassBasedTestDescriptor.java:378) + at java.base/java.util.stream.ReferencePipeline$3$1.accept(Unknown Source) + at java.base/java.util.stream.ReferencePipeline$2$1.accept(Unknown Source) + at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(Unknown Source) + at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source) + at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source) + at java.base/java.util.stream.StreamSpliterators$WrappingSpliterator.forEachRemaining(Unknown Source) + at java.base/java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Unknown Source) + at java.base/java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Unknown Source) + at java.base/java.util.stream.ReferencePipeline$Head.forEach(Unknown Source) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeTestInstancePostProcessors(ClassBasedTestDescriptor.java:377) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$instantiateAndPostProcessTestInstance$6(ClassBasedTestDescriptor.java:290) + at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.instantiateAndPostProcessTestInstance(ClassBasedTestDescriptor.java:289) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$testInstancesProvider$4(ClassBasedTestDescriptor.java:279) + at java.base/java.util.Optional.orElseGet(Unknown Source) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$testInstancesProvider$5(ClassBasedTestDescriptor.java:278) + at org.junit.jupiter.engine.execution.TestInstancesProvider.getTestInstances(TestInstancesProvider.java:31) + at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$prepare$0(TestMethodTestDescriptor.java:106) + at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) + at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare(TestMethodTestDescriptor.java:105) + at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare(TestMethodTestDescriptor.java:69) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$prepare$2(NodeTestTask.java:123) + at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.prepare(NodeTestTask.java:123) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:90) + at java.base/java.util.ArrayList.forEach(Unknown Source) + at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155) + at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141) + at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139) + at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95) + at java.base/java.util.ArrayList.forEach(Unknown Source) + at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155) + at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141) + at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139) + at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95) + at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35) + at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57) + at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54) + at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:147) + at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:127) + at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:90) + at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:55) + at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:102) + at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:54) + at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114) + at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:95) + at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:91) + at org.junit.platform.launcher.core.SessionPerRequestLauncher.execute(SessionPerRequestLauncher.java:60) + at org.eclipse.jdt.internal.junit5.runner.JUnit5TestReference.run(JUnit5TestReference.java:98) + at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:40) + at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:529) + at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:757) + at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:452) + at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:210) +Caused by: org.h2.jdbc.JdbcSQLNonTransientException: Внутренняя ошибка: "org.h2.mvstore.MVStoreException: The file is locked: C:/Users/New/Desktop/studing/IP/LABS/IP-Labs-4-semestr/data.mv.db [2.2.224/7]" +General error: "org.h2.mvstore.MVStoreException: The file is locked: C:/Users/New/Desktop/studing/IP/LABS/IP-Labs-4-semestr/data.mv.db [2.2.224/7]" [50000-224] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:566) + at org.h2.message.DbException.getJdbcSQLException(DbException.java:489) + ... 138 more +Caused by: org.h2.mvstore.MVStoreException: The file is locked: C:/Users/New/Desktop/studing/IP/LABS/IP-Labs-4-semestr/data.mv.db [2.2.224/7] + at org.h2.mvstore.DataUtils.newMVStoreException(DataUtils.java:996) + at org.h2.mvstore.SingleFileStore.lockFileChannel(SingleFileStore.java:143) + at org.h2.mvstore.SingleFileStore.open(SingleFileStore.java:117) + at org.h2.mvstore.SingleFileStore.open(SingleFileStore.java:81) + at org.h2.mvstore.MVStore.(MVStore.java:286) + ... 132 more +2024-05-17 14:55:42.726304+03:00 jdbc[13]: exception +org.h2.jdbc.JdbcSQLSyntaxErrorException: Синтаксическая ошибка в выражении SQL "[*]USER_ID SELECT * FROM USER_ID"; ожидалось "UPDATE" +Syntax error in SQL statement "[*]USER_ID SELECT * FROM USER_ID"; expected "UPDATE"; SQL statement: +USER_ID SELECT * FROM USER_ID [42001-224] +2024-05-17 14:55:48.732316+03:00 jdbc[13]: exception +org.h2.jdbc.JdbcSQLSyntaxErrorException: Таблица "USER_ID" не найдена +Table "USER_ID" not found; SQL statement: +SELECT * FROM USER_ID [42102-224] +2024-05-17 15:09:27.889512+03:00 jdbc[14]: exception +org.h2.jdbc.JdbcSQLSyntaxErrorException: Синтаксическая ошибка в выражении SQL "SELECT o.USER_ID, SUM(o.SUM) AS TOTAL_SUM\000d\000aFROM orders AS o\000d\000a[*]from TypeEntity t left join UsersEntity u on o.type = t and o.user.id = ?1\000d\000aGROUP BY USER_ID\000d\000aORDER BY TOTAL_SUM DESC\000d\000aLIMIT 5" +Syntax error in SQL statement "SELECT o.USER_ID, SUM(o.SUM) AS TOTAL_SUM\000d\000aFROM orders AS o\000d\000a[*]from TypeEntity t left join UsersEntity u on o.type = t and o.user.id = ?1\000d\000aGROUP BY USER_ID\000d\000aORDER BY TOTAL_SUM DESC\000d\000aLIMIT 5"; SQL statement: +SELECT o.USER_ID, SUM(o.SUM) AS TOTAL_SUM +FROM orders AS o +from TypeEntity t left join UsersEntity u on o.type = t and o.user.id = ?1 +GROUP BY USER_ID +ORDER BY TOTAL_SUM DESC +LIMIT 5 [42000-224] +2024-05-17 15:52:29.562546+03:00 jdbc[25]: null +org.h2.message.DbException: Незакрытое приложением соединение уничтожено сборщиком мусора +The connection was not closed by the application and is garbage collected [90018-224] + at org.h2.message.DbException.get(DbException.java:223) + at org.h2.message.DbException.get(DbException.java:199) + at org.h2.message.DbException.get(DbException.java:188) + at org.h2.jdbc.JdbcConnection.closeOld(JdbcConnection.java:218) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:135) + at org.h2.Driver.connect(Driver.java:59) + at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:138) + at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:359) + at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:201) + at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:470) + at com.zaxxer.hikari.pool.HikariPool$PoolEntryCreator.call(HikariPool.java:733) + at com.zaxxer.hikari.pool.HikariPool$PoolEntryCreator.call(HikariPool.java:712) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317) + at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) + at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) + at java.base/java.lang.Thread.run(Thread.java:1583) +Caused by: org.h2.jdbc.JdbcSQLNonTransientConnectionException: Незакрытое приложением соединение уничтожено сборщиком мусора +The connection was not closed by the application and is garbage collected [90018-224] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:690) + at org.h2.message.DbException.getJdbcSQLException(DbException.java:489) + ... 16 more +2024-05-17 17:49:11.274896+03:00 database: flush +org.h2.message.DbException: Внутренняя ошибка: "org.h2.mvstore.MVStoreException: The file is locked: C:/Users/New/Desktop/studing/IP/LABS/IP-Labs-4-semestr/data.mv.db [2.2.224/7]" +General error: "org.h2.mvstore.MVStoreException: The file is locked: C:/Users/New/Desktop/studing/IP/LABS/IP-Labs-4-semestr/data.mv.db [2.2.224/7]" [50000-224] + at org.h2.message.DbException.get(DbException.java:212) + at org.h2.message.DbException.convert(DbException.java:407) + at org.h2.mvstore.db.Store.lambda$new$0(Store.java:122) + at org.h2.mvstore.MVStore.handleException(MVStore.java:1546) + at org.h2.mvstore.MVStore.panic(MVStore.java:371) + at org.h2.mvstore.MVStore.(MVStore.java:291) + at org.h2.mvstore.MVStore$Builder.open(MVStore.java:2035) + at org.h2.mvstore.db.Store.(Store.java:133) + at org.h2.engine.Database.(Database.java:326) + at org.h2.engine.Engine.openSession(Engine.java:92) + at org.h2.engine.Engine.openSession(Engine.java:222) + at org.h2.engine.Engine.createSession(Engine.java:201) + at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:343) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:125) + at org.h2.Driver.connect(Driver.java:59) + at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:138) + at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:359) + at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:201) + at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:470) + at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:561) + at com.zaxxer.hikari.pool.HikariPool.(HikariPool.java:100) + at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:112) + at org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl.getConnection(DatasourceConnectionProviderImpl.java:122) + at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator$ConnectionProviderJdbcConnectionAccess.obtainConnection(JdbcEnvironmentInitiator.java:428) + at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcIsolationDelegate.delegateWork(JdbcIsolationDelegate.java:61) + at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.getJdbcEnvironmentUsingJdbcMetadata(JdbcEnvironmentInitiator.java:276) + at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:107) + at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:68) + at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:130) + at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:263) + at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:238) + at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:215) + at org.hibernate.boot.model.relational.Database.(Database.java:45) + at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.getDatabase(InFlightMetadataCollectorImpl.java:223) + at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.(InFlightMetadataCollectorImpl.java:191) + at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:170) + at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.metadata(EntityManagerFactoryBuilderImpl.java:1432) + at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:1503) + at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateJpaPersistenceProvider.java:75) + at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:390) + at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:409) + at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:396) + at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.afterPropertiesSet(LocalContainerEntityManagerFactoryBean.java:366) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1833) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1782) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:600) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:522) + at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:326) + at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324) + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200) + at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1234) + at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:952) + at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:624) + at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754) + at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:456) + at org.springframework.boot.SpringApplication.run(SpringApplication.java:334) + at org.springframework.boot.test.context.SpringBootContextLoader.lambda$loadContext$3(SpringBootContextLoader.java:137) + at org.springframework.util.function.ThrowingSupplier.get(ThrowingSupplier.java:58) + at org.springframework.util.function.ThrowingSupplier.get(ThrowingSupplier.java:46) + at org.springframework.boot.SpringApplication.withHook(SpringApplication.java:1454) + at org.springframework.boot.test.context.SpringBootContextLoader$ContextLoaderHook.run(SpringBootContextLoader.java:553) + at org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:137) + at org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:108) + at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:225) + at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:152) + at org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:130) + at org.springframework.test.context.web.ServletTestExecutionListener.setUpRequestContextIfNecessary(ServletTestExecutionListener.java:191) + at org.springframework.test.context.web.ServletTestExecutionListener.prepareTestInstance(ServletTestExecutionListener.java:130) + at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:260) + at org.springframework.test.context.junit.jupiter.SpringExtension.postProcessTestInstance(SpringExtension.java:163) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeTestInstancePostProcessors$10(ClassBasedTestDescriptor.java:378) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.executeAndMaskThrowable(ClassBasedTestDescriptor.java:383) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeTestInstancePostProcessors$11(ClassBasedTestDescriptor.java:378) + at java.base/java.util.stream.ReferencePipeline$3$1.accept(Unknown Source) + at java.base/java.util.stream.ReferencePipeline$2$1.accept(Unknown Source) + at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(Unknown Source) + at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source) + at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source) + at java.base/java.util.stream.StreamSpliterators$WrappingSpliterator.forEachRemaining(Unknown Source) + at java.base/java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Unknown Source) + at java.base/java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Unknown Source) + at java.base/java.util.stream.ReferencePipeline$Head.forEach(Unknown Source) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeTestInstancePostProcessors(ClassBasedTestDescriptor.java:377) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$instantiateAndPostProcessTestInstance$6(ClassBasedTestDescriptor.java:290) + at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.instantiateAndPostProcessTestInstance(ClassBasedTestDescriptor.java:289) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$testInstancesProvider$4(ClassBasedTestDescriptor.java:279) + at java.base/java.util.Optional.orElseGet(Unknown Source) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$testInstancesProvider$5(ClassBasedTestDescriptor.java:278) + at org.junit.jupiter.engine.execution.TestInstancesProvider.getTestInstances(TestInstancesProvider.java:31) + at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$prepare$0(TestMethodTestDescriptor.java:106) + at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) + at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare(TestMethodTestDescriptor.java:105) + at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare(TestMethodTestDescriptor.java:69) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$prepare$2(NodeTestTask.java:123) + at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.prepare(NodeTestTask.java:123) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:90) + at java.base/java.util.ArrayList.forEach(Unknown Source) + at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155) + at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141) + at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139) + at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95) + at java.base/java.util.ArrayList.forEach(Unknown Source) + at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155) + at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141) + at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139) + at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95) + at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35) + at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57) + at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54) + at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:147) + at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:127) + at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:90) + at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:55) + at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:102) + at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:54) + at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114) + at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:95) + at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:91) + at org.junit.platform.launcher.core.SessionPerRequestLauncher.execute(SessionPerRequestLauncher.java:60) + at org.eclipse.jdt.internal.junit5.runner.JUnit5TestReference.run(JUnit5TestReference.java:98) + at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:40) + at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:529) + at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:757) + at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:452) + at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:210) +Caused by: org.h2.jdbc.JdbcSQLNonTransientException: Внутренняя ошибка: "org.h2.mvstore.MVStoreException: The file is locked: C:/Users/New/Desktop/studing/IP/LABS/IP-Labs-4-semestr/data.mv.db [2.2.224/7]" +General error: "org.h2.mvstore.MVStoreException: The file is locked: C:/Users/New/Desktop/studing/IP/LABS/IP-Labs-4-semestr/data.mv.db [2.2.224/7]" [50000-224] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:566) + at org.h2.message.DbException.getJdbcSQLException(DbException.java:489) + ... 138 more +Caused by: org.h2.mvstore.MVStoreException: The file is locked: C:/Users/New/Desktop/studing/IP/LABS/IP-Labs-4-semestr/data.mv.db [2.2.224/7] + at org.h2.mvstore.DataUtils.newMVStoreException(DataUtils.java:996) + at org.h2.mvstore.SingleFileStore.lockFileChannel(SingleFileStore.java:143) + at org.h2.mvstore.SingleFileStore.open(SingleFileStore.java:117) + at org.h2.mvstore.SingleFileStore.open(SingleFileStore.java:81) + at org.h2.mvstore.MVStore.(MVStore.java:286) + ... 132 more +2024-05-23 13:46:43.238222+03:00 database: flush +org.h2.message.DbException: Внутренняя ошибка: "org.h2.mvstore.MVStoreException: The file is locked: D:/studing/IP/LABS/ip laba smirnov/data.mv.db [2.2.224/7]" +General error: "org.h2.mvstore.MVStoreException: The file is locked: D:/studing/IP/LABS/ip laba smirnov/data.mv.db [2.2.224/7]" [50000-224] + at org.h2.message.DbException.get(DbException.java:212) + at org.h2.message.DbException.convert(DbException.java:407) + at org.h2.mvstore.db.Store.lambda$new$0(Store.java:122) + at org.h2.mvstore.MVStore.handleException(MVStore.java:1546) + at org.h2.mvstore.MVStore.panic(MVStore.java:371) + at org.h2.mvstore.MVStore.(MVStore.java:291) + at org.h2.mvstore.MVStore$Builder.open(MVStore.java:2035) + at org.h2.mvstore.db.Store.(Store.java:133) + at org.h2.engine.Database.(Database.java:326) + at org.h2.engine.Engine.openSession(Engine.java:92) + at org.h2.engine.Engine.openSession(Engine.java:222) + at org.h2.engine.Engine.createSession(Engine.java:201) + at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:343) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:125) + at org.h2.Driver.connect(Driver.java:59) + at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:138) + at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:359) + at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:201) + at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:470) + at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:561) + at com.zaxxer.hikari.pool.HikariPool.(HikariPool.java:100) + at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:112) + at org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl.getConnection(DatasourceConnectionProviderImpl.java:122) + at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator$ConnectionProviderJdbcConnectionAccess.obtainConnection(JdbcEnvironmentInitiator.java:428) + at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcIsolationDelegate.delegateWork(JdbcIsolationDelegate.java:61) + at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.getJdbcEnvironmentUsingJdbcMetadata(JdbcEnvironmentInitiator.java:276) + at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:107) + at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:68) + at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:130) + at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:263) + at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:238) + at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:215) + at org.hibernate.boot.model.relational.Database.(Database.java:45) + at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.getDatabase(InFlightMetadataCollectorImpl.java:223) + at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.(InFlightMetadataCollectorImpl.java:191) + at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:170) + at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.metadata(EntityManagerFactoryBuilderImpl.java:1432) + at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:1503) + at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateJpaPersistenceProvider.java:75) + at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:390) + at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:409) + at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:396) + at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.afterPropertiesSet(LocalContainerEntityManagerFactoryBean.java:366) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1833) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1782) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:600) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:522) + at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:326) + at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324) + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200) + at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1234) + at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:952) + at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:624) + at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754) + at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:456) + at org.springframework.boot.SpringApplication.run(SpringApplication.java:334) + at org.springframework.boot.test.context.SpringBootContextLoader.lambda$loadContext$3(SpringBootContextLoader.java:137) + at org.springframework.util.function.ThrowingSupplier.get(ThrowingSupplier.java:58) + at org.springframework.util.function.ThrowingSupplier.get(ThrowingSupplier.java:46) + at org.springframework.boot.SpringApplication.withHook(SpringApplication.java:1454) + at org.springframework.boot.test.context.SpringBootContextLoader$ContextLoaderHook.run(SpringBootContextLoader.java:553) + at org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:137) + at org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:108) + at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:225) + at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:152) + at org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:130) + at org.springframework.test.context.web.ServletTestExecutionListener.setUpRequestContextIfNecessary(ServletTestExecutionListener.java:191) + at org.springframework.test.context.web.ServletTestExecutionListener.prepareTestInstance(ServletTestExecutionListener.java:130) + at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:260) + at org.springframework.test.context.junit.jupiter.SpringExtension.postProcessTestInstance(SpringExtension.java:163) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeTestInstancePostProcessors$10(ClassBasedTestDescriptor.java:378) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.executeAndMaskThrowable(ClassBasedTestDescriptor.java:383) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeTestInstancePostProcessors$11(ClassBasedTestDescriptor.java:378) + at java.base/java.util.stream.ReferencePipeline$3$1.accept(Unknown Source) + at java.base/java.util.stream.ReferencePipeline$2$1.accept(Unknown Source) + at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(Unknown Source) + at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source) + at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source) + at java.base/java.util.stream.StreamSpliterators$WrappingSpliterator.forEachRemaining(Unknown Source) + at java.base/java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Unknown Source) + at java.base/java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Unknown Source) + at java.base/java.util.stream.ReferencePipeline$Head.forEach(Unknown Source) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeTestInstancePostProcessors(ClassBasedTestDescriptor.java:377) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$instantiateAndPostProcessTestInstance$6(ClassBasedTestDescriptor.java:290) + at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.instantiateAndPostProcessTestInstance(ClassBasedTestDescriptor.java:289) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$testInstancesProvider$4(ClassBasedTestDescriptor.java:279) + at java.base/java.util.Optional.orElseGet(Unknown Source) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$testInstancesProvider$5(ClassBasedTestDescriptor.java:278) + at org.junit.jupiter.engine.execution.TestInstancesProvider.getTestInstances(TestInstancesProvider.java:31) + at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$prepare$0(TestMethodTestDescriptor.java:106) + at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) + at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare(TestMethodTestDescriptor.java:105) + at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare(TestMethodTestDescriptor.java:69) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$prepare$2(NodeTestTask.java:123) + at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.prepare(NodeTestTask.java:123) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:90) + at java.base/java.util.ArrayList.forEach(Unknown Source) + at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155) + at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141) + at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139) + at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95) + at java.base/java.util.ArrayList.forEach(Unknown Source) + at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155) + at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141) + at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139) + at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95) + at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35) + at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57) + at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54) + at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:147) + at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:127) + at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:90) + at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:55) + at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:102) + at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:54) + at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114) + at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:95) + at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:91) + at org.junit.platform.launcher.core.SessionPerRequestLauncher.execute(SessionPerRequestLauncher.java:60) + at org.eclipse.jdt.internal.junit5.runner.JUnit5TestReference.run(JUnit5TestReference.java:98) + at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:40) + at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:529) + at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:757) + at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:452) + at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:210) +Caused by: org.h2.jdbc.JdbcSQLNonTransientException: Внутренняя ошибка: "org.h2.mvstore.MVStoreException: The file is locked: D:/studing/IP/LABS/ip laba smirnov/data.mv.db [2.2.224/7]" +General error: "org.h2.mvstore.MVStoreException: The file is locked: D:/studing/IP/LABS/ip laba smirnov/data.mv.db [2.2.224/7]" [50000-224] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:566) + at org.h2.message.DbException.getJdbcSQLException(DbException.java:489) + ... 138 more +Caused by: org.h2.mvstore.MVStoreException: The file is locked: D:/studing/IP/LABS/ip laba smirnov/data.mv.db [2.2.224/7] + at org.h2.mvstore.DataUtils.newMVStoreException(DataUtils.java:996) + at org.h2.mvstore.SingleFileStore.lockFileChannel(SingleFileStore.java:143) + at org.h2.mvstore.SingleFileStore.open(SingleFileStore.java:117) + at org.h2.mvstore.SingleFileStore.open(SingleFileStore.java:81) + at org.h2.mvstore.MVStore.(MVStore.java:286) + ... 132 more +2024-05-23 13:47:40.723097+03:00 database: flush +org.h2.message.DbException: Внутренняя ошибка: "org.h2.mvstore.MVStoreException: The file is locked: D:/studing/IP/LABS/ip laba smirnov/data.mv.db [2.2.224/7]" +General error: "org.h2.mvstore.MVStoreException: The file is locked: D:/studing/IP/LABS/ip laba smirnov/data.mv.db [2.2.224/7]" [50000-224] + at org.h2.message.DbException.get(DbException.java:212) + at org.h2.message.DbException.convert(DbException.java:407) + at org.h2.mvstore.db.Store.lambda$new$0(Store.java:122) + at org.h2.mvstore.MVStore.handleException(MVStore.java:1546) + at org.h2.mvstore.MVStore.panic(MVStore.java:371) + at org.h2.mvstore.MVStore.(MVStore.java:291) + at org.h2.mvstore.MVStore$Builder.open(MVStore.java:2035) + at org.h2.mvstore.db.Store.(Store.java:133) + at org.h2.engine.Database.(Database.java:326) + at org.h2.engine.Engine.openSession(Engine.java:92) + at org.h2.engine.Engine.openSession(Engine.java:222) + at org.h2.engine.Engine.createSession(Engine.java:201) + at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:343) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:125) + at org.h2.Driver.connect(Driver.java:59) + at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:138) + at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:359) + at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:201) + at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:470) + at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:561) + at com.zaxxer.hikari.pool.HikariPool.(HikariPool.java:100) + at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:112) + at org.springframework.boot.autoconfigure.h2.H2ConsoleAutoConfiguration.getConnectionUrl(H2ConsoleAutoConfiguration.java:94) + at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) + at java.base/java.util.ArrayList.forEach(ArrayList.java:1596) + at java.base/java.util.stream.SortedOps$RefSortingSink.end(SortedOps.java:395) + at java.base/java.util.stream.Sink$ChainedReference.end(Sink.java:261) + at java.base/java.util.stream.Sink$ChainedReference.end(Sink.java:261) + at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:510) + at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) + at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:575) + at java.base/java.util.stream.AbstractPipeline.evaluateToArrayNode(AbstractPipeline.java:260) + at java.base/java.util.stream.ReferencePipeline.toArray(ReferencePipeline.java:616) + at java.base/java.util.stream.ReferencePipeline.toArray(ReferencePipeline.java:622) + at java.base/java.util.stream.ReferencePipeline.toList(ReferencePipeline.java:627) + at org.springframework.boot.autoconfigure.h2.H2ConsoleAutoConfiguration.logDataSources(H2ConsoleAutoConfiguration.java:86) + at org.springframework.boot.autoconfigure.h2.H2ConsoleAutoConfiguration.lambda$h2Console$0(H2ConsoleAutoConfiguration.java:69) + at org.springframework.boot.autoconfigure.h2.H2ConsoleAutoConfiguration.withThreadContextClassLoader(H2ConsoleAutoConfiguration.java:78) + at org.springframework.boot.autoconfigure.h2.H2ConsoleAutoConfiguration.h2Console(H2ConsoleAutoConfiguration.java:69) + at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) + at java.base/java.lang.reflect.Method.invoke(Method.java:580) + at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:140) + at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:644) + at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:636) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1335) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1165) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:562) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:522) + at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:326) + at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324) + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:205) + at org.springframework.boot.web.servlet.ServletContextInitializerBeans.getOrderedBeansOfType(ServletContextInitializerBeans.java:210) + at org.springframework.boot.web.servlet.ServletContextInitializerBeans.getOrderedBeansOfType(ServletContextInitializerBeans.java:201) + at org.springframework.boot.web.servlet.ServletContextInitializerBeans.addServletContextInitializerBeans(ServletContextInitializerBeans.java:96) + at org.springframework.boot.web.servlet.ServletContextInitializerBeans.(ServletContextInitializerBeans.java:85) + at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.getServletContextInitializerBeans(ServletWebServerApplicationContext.java:266) + at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.selfInitialize(ServletWebServerApplicationContext.java:240) + at org.springframework.boot.web.embedded.tomcat.TomcatStarter.onStartup(TomcatStarter.java:52) + at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4880) + at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:171) + at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1332) + at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1322) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317) + at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) + at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:145) + at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:866) + at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:845) + at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:171) + at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1332) + at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1322) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317) + at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) + at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:145) + at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:866) + at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:240) + at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:171) + at org.apache.catalina.core.StandardService.startInternal(StandardService.java:433) + at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:171) + at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:921) + at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:171) + at org.apache.catalina.startup.Tomcat.start(Tomcat.java:437) + at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.initialize(TomcatWebServer.java:126) + at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.(TomcatWebServer.java:105) + at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getTomcatWebServer(TomcatServletWebServerFactory.java:499) + at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getWebServer(TomcatServletWebServerFactory.java:218) + at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer(ServletWebServerApplicationContext.java:188) + at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:162) + at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:618) + at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146) + at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754) + at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:456) + at org.springframework.boot.SpringApplication.run(SpringApplication.java:334) + at org.springframework.boot.SpringApplication.run(SpringApplication.java:1354) + at org.springframework.boot.SpringApplication.run(SpringApplication.java:1343) + at com.example.demo.DemoApplication.main(DemoApplication.java:41) +Caused by: org.h2.jdbc.JdbcSQLNonTransientException: Внутренняя ошибка: "org.h2.mvstore.MVStoreException: The file is locked: D:/studing/IP/LABS/ip laba smirnov/data.mv.db [2.2.224/7]" +General error: "org.h2.mvstore.MVStoreException: The file is locked: D:/studing/IP/LABS/ip laba smirnov/data.mv.db [2.2.224/7]" [50000-224] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:566) + at org.h2.message.DbException.getJdbcSQLException(DbException.java:489) + ... 96 more +Caused by: org.h2.mvstore.MVStoreException: The file is locked: D:/studing/IP/LABS/ip laba smirnov/data.mv.db [2.2.224/7] + at org.h2.mvstore.DataUtils.newMVStoreException(DataUtils.java:996) + at org.h2.mvstore.SingleFileStore.lockFileChannel(SingleFileStore.java:143) + at org.h2.mvstore.SingleFileStore.open(SingleFileStore.java:117) + at org.h2.mvstore.SingleFileStore.open(SingleFileStore.java:81) + at org.h2.mvstore.MVStore.(MVStore.java:286) + ... 90 more +2024-05-23 13:47:42.590742+03:00 database: flush +org.h2.message.DbException: Внутренняя ошибка: "org.h2.mvstore.MVStoreException: The file is locked: D:/studing/IP/LABS/ip laba smirnov/data.mv.db [2.2.224/7]" +General error: "org.h2.mvstore.MVStoreException: The file is locked: D:/studing/IP/LABS/ip laba smirnov/data.mv.db [2.2.224/7]" [50000-224] + at org.h2.message.DbException.get(DbException.java:212) + at org.h2.message.DbException.convert(DbException.java:407) + at org.h2.mvstore.db.Store.lambda$new$0(Store.java:122) + at org.h2.mvstore.MVStore.handleException(MVStore.java:1546) + at org.h2.mvstore.MVStore.panic(MVStore.java:371) + at org.h2.mvstore.MVStore.(MVStore.java:291) + at org.h2.mvstore.MVStore$Builder.open(MVStore.java:2035) + at org.h2.mvstore.db.Store.(Store.java:133) + at org.h2.engine.Database.(Database.java:326) + at org.h2.engine.Engine.openSession(Engine.java:92) + at org.h2.engine.Engine.openSession(Engine.java:222) + at org.h2.engine.Engine.createSession(Engine.java:201) + at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:343) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:125) + at org.h2.Driver.connect(Driver.java:59) + at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:138) + at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:359) + at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:201) + at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:470) + at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:561) + at com.zaxxer.hikari.pool.HikariPool.(HikariPool.java:100) + at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:112) + at org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl.getConnection(DatasourceConnectionProviderImpl.java:122) + at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator$ConnectionProviderJdbcConnectionAccess.obtainConnection(JdbcEnvironmentInitiator.java:428) + at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcIsolationDelegate.delegateWork(JdbcIsolationDelegate.java:61) + at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.getJdbcEnvironmentUsingJdbcMetadata(JdbcEnvironmentInitiator.java:276) + at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:107) + at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:68) + at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:130) + at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:263) + at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:238) + at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:215) + at org.hibernate.boot.model.relational.Database.(Database.java:45) + at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.getDatabase(InFlightMetadataCollectorImpl.java:223) + at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.(InFlightMetadataCollectorImpl.java:191) + at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:170) + at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.metadata(EntityManagerFactoryBuilderImpl.java:1432) + at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:1503) + at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateJpaPersistenceProvider.java:75) + at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:390) + at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:409) + at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:396) + at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.afterPropertiesSet(LocalContainerEntityManagerFactoryBean.java:366) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1833) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1782) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:600) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:522) + at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:326) + at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324) + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200) + at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1234) + at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:952) + at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:624) + at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146) + at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754) + at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:456) + at org.springframework.boot.SpringApplication.run(SpringApplication.java:334) + at org.springframework.boot.SpringApplication.run(SpringApplication.java:1354) + at org.springframework.boot.SpringApplication.run(SpringApplication.java:1343) + at com.example.demo.DemoApplication.main(DemoApplication.java:41) +Caused by: org.h2.jdbc.JdbcSQLNonTransientException: Внутренняя ошибка: "org.h2.mvstore.MVStoreException: The file is locked: D:/studing/IP/LABS/ip laba smirnov/data.mv.db [2.2.224/7]" +General error: "org.h2.mvstore.MVStoreException: The file is locked: D:/studing/IP/LABS/ip laba smirnov/data.mv.db [2.2.224/7]" [50000-224] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:566) + at org.h2.message.DbException.getJdbcSQLException(DbException.java:489) + ... 61 more +Caused by: org.h2.mvstore.MVStoreException: The file is locked: D:/studing/IP/LABS/ip laba smirnov/data.mv.db [2.2.224/7] + at org.h2.mvstore.DataUtils.newMVStoreException(DataUtils.java:996) + at org.h2.mvstore.SingleFileStore.lockFileChannel(SingleFileStore.java:143) + at org.h2.mvstore.SingleFileStore.open(SingleFileStore.java:117) + at org.h2.mvstore.SingleFileStore.open(SingleFileStore.java:81) + at org.h2.mvstore.MVStore.(MVStore.java:286) + ... 55 more +2024-05-23 14:07:35.174865+03:00 database: flush +org.h2.message.DbException: Внутренняя ошибка: "org.h2.mvstore.MVStoreException: The file is locked: D:/studing/IP/LABS/ip laba smirnov/data.mv.db [2.2.224/7]" +General error: "org.h2.mvstore.MVStoreException: The file is locked: D:/studing/IP/LABS/ip laba smirnov/data.mv.db [2.2.224/7]" [50000-224] + at org.h2.message.DbException.get(DbException.java:212) + at org.h2.message.DbException.convert(DbException.java:407) + at org.h2.mvstore.db.Store.lambda$new$0(Store.java:122) + at org.h2.mvstore.MVStore.handleException(MVStore.java:1546) + at org.h2.mvstore.MVStore.panic(MVStore.java:371) + at org.h2.mvstore.MVStore.(MVStore.java:291) + at org.h2.mvstore.MVStore$Builder.open(MVStore.java:2035) + at org.h2.mvstore.db.Store.(Store.java:133) + at org.h2.engine.Database.(Database.java:326) + at org.h2.engine.Engine.openSession(Engine.java:92) + at org.h2.engine.Engine.openSession(Engine.java:222) + at org.h2.engine.Engine.createSession(Engine.java:201) + at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:343) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:125) + at org.h2.Driver.connect(Driver.java:59) + at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:138) + at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:359) + at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:201) + at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:470) + at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:561) + at com.zaxxer.hikari.pool.HikariPool.(HikariPool.java:100) + at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:112) + at org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl.getConnection(DatasourceConnectionProviderImpl.java:122) + at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator$ConnectionProviderJdbcConnectionAccess.obtainConnection(JdbcEnvironmentInitiator.java:428) + at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcIsolationDelegate.delegateWork(JdbcIsolationDelegate.java:61) + at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.getJdbcEnvironmentUsingJdbcMetadata(JdbcEnvironmentInitiator.java:276) + at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:107) + at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:68) + at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:130) + at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:263) + at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:238) + at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:215) + at org.hibernate.boot.model.relational.Database.(Database.java:45) + at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.getDatabase(InFlightMetadataCollectorImpl.java:223) + at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.(InFlightMetadataCollectorImpl.java:191) + at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:170) + at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.metadata(EntityManagerFactoryBuilderImpl.java:1432) + at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:1503) + at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateJpaPersistenceProvider.java:75) + at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:390) + at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:409) + at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:396) + at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.afterPropertiesSet(LocalContainerEntityManagerFactoryBean.java:366) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1833) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1782) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:600) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:522) + at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:326) + at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324) + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200) + at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1234) + at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:952) + at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:624) + at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754) + at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:456) + at org.springframework.boot.SpringApplication.run(SpringApplication.java:334) + at org.springframework.boot.test.context.SpringBootContextLoader.lambda$loadContext$3(SpringBootContextLoader.java:137) + at org.springframework.util.function.ThrowingSupplier.get(ThrowingSupplier.java:58) + at org.springframework.util.function.ThrowingSupplier.get(ThrowingSupplier.java:46) + at org.springframework.boot.SpringApplication.withHook(SpringApplication.java:1454) + at org.springframework.boot.test.context.SpringBootContextLoader$ContextLoaderHook.run(SpringBootContextLoader.java:553) + at org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:137) + at org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:108) + at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:225) + at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:152) + at org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:130) + at org.springframework.test.context.web.ServletTestExecutionListener.setUpRequestContextIfNecessary(ServletTestExecutionListener.java:191) + at org.springframework.test.context.web.ServletTestExecutionListener.prepareTestInstance(ServletTestExecutionListener.java:130) + at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:260) + at org.springframework.test.context.junit.jupiter.SpringExtension.postProcessTestInstance(SpringExtension.java:163) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeTestInstancePostProcessors$10(ClassBasedTestDescriptor.java:378) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.executeAndMaskThrowable(ClassBasedTestDescriptor.java:383) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeTestInstancePostProcessors$11(ClassBasedTestDescriptor.java:378) + at java.base/java.util.stream.ReferencePipeline$3$1.accept(Unknown Source) + at java.base/java.util.stream.ReferencePipeline$2$1.accept(Unknown Source) + at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(Unknown Source) + at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source) + at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source) + at java.base/java.util.stream.StreamSpliterators$WrappingSpliterator.forEachRemaining(Unknown Source) + at java.base/java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Unknown Source) + at java.base/java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Unknown Source) + at java.base/java.util.stream.ReferencePipeline$Head.forEach(Unknown Source) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeTestInstancePostProcessors(ClassBasedTestDescriptor.java:377) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$instantiateAndPostProcessTestInstance$6(ClassBasedTestDescriptor.java:290) + at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.instantiateAndPostProcessTestInstance(ClassBasedTestDescriptor.java:289) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$testInstancesProvider$4(ClassBasedTestDescriptor.java:279) + at java.base/java.util.Optional.orElseGet(Unknown Source) + at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$testInstancesProvider$5(ClassBasedTestDescriptor.java:278) + at org.junit.jupiter.engine.execution.TestInstancesProvider.getTestInstances(TestInstancesProvider.java:31) + at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$prepare$0(TestMethodTestDescriptor.java:106) + at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) + at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare(TestMethodTestDescriptor.java:105) + at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare(TestMethodTestDescriptor.java:69) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$prepare$2(NodeTestTask.java:123) + at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.prepare(NodeTestTask.java:123) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:90) + at java.base/java.util.ArrayList.forEach(Unknown Source) + at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155) + at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141) + at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139) + at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95) + at java.base/java.util.ArrayList.forEach(Unknown Source) + at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155) + at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141) + at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139) + at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95) + at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35) + at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57) + at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54) + at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:147) + at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:127) + at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:90) + at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:55) + at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:102) + at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:54) + at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114) + at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:95) + at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:91) + at org.junit.platform.launcher.core.SessionPerRequestLauncher.execute(SessionPerRequestLauncher.java:60) + at org.eclipse.jdt.internal.junit5.runner.JUnit5TestReference.run(JUnit5TestReference.java:98) + at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:40) + at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:529) + at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:757) + at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:452) + at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:210) +Caused by: org.h2.jdbc.JdbcSQLNonTransientException: Внутренняя ошибка: "org.h2.mvstore.MVStoreException: The file is locked: D:/studing/IP/LABS/ip laba smirnov/data.mv.db [2.2.224/7]" +General error: "org.h2.mvstore.MVStoreException: The file is locked: D:/studing/IP/LABS/ip laba smirnov/data.mv.db [2.2.224/7]" [50000-224] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:566) + at org.h2.message.DbException.getJdbcSQLException(DbException.java:489) + ... 138 more +Caused by: org.h2.mvstore.MVStoreException: The file is locked: D:/studing/IP/LABS/ip laba smirnov/data.mv.db [2.2.224/7] + at org.h2.mvstore.DataUtils.newMVStoreException(DataUtils.java:996) + at org.h2.mvstore.SingleFileStore.lockFileChannel(SingleFileStore.java:143) + at org.h2.mvstore.SingleFileStore.open(SingleFileStore.java:117) + at org.h2.mvstore.SingleFileStore.open(SingleFileStore.java:81) + at org.h2.mvstore.MVStore.(MVStore.java:286) + ... 132 more diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000..d64cd49 Binary files /dev/null and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..97f9ad6 --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,23 @@ +# +# Copyright 2012-2024 the original author or authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip +networkTimeout=10000 +validateDistributionUrl=true +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew new file mode 100644 index 0000000..1aa94a4 --- /dev/null +++ b/gradlew @@ -0,0 +1,249 @@ +#!/bin/sh + +# +# Copyright © 2015-2021 the original authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# +############################################################################## + +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +# This is normally unused +# shellcheck disable=SC2034 +APP_BASE_NAME=${0##*/} +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { + echo "$*" +} >&2 + +die () { + echo + echo "$*" + echo + exit 1 +} >&2 + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD=$JAVA_HOME/jre/sh/java + else + JAVACMD=$JAVA_HOME/bin/java + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD=java + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat new file mode 100644 index 0000000..93e3f59 --- /dev/null +++ b/gradlew.bat @@ -0,0 +1,92 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%"=="" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if %ERRORLEVEL% equ 0 goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if %ERRORLEVEL% equ 0 goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/settings.gradle b/settings.gradle new file mode 100644 index 0000000..0a383dd --- /dev/null +++ b/settings.gradle @@ -0,0 +1 @@ +rootProject.name = 'demo' diff --git a/src/main/java/com/example/demo/DemoApplication.java b/src/main/java/com/example/demo/DemoApplication.java new file mode 100644 index 0000000..55d4c41 --- /dev/null +++ b/src/main/java/com/example/demo/DemoApplication.java @@ -0,0 +1,71 @@ +package com.example.demo; + +import java.util.Date; +import java.util.List; +import java.util.Objects; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.boot.CommandLineRunner; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +import com.example.demo.orders.model.OrdersEntity; +import com.example.demo.orders.service.OrdersService; +import com.example.demo.products.model.ProductsEntity; +import com.example.demo.products.service.ProductsService; +import com.example.demo.types.model.TypesEntity; +import com.example.demo.types.service.TypesService; +import com.example.demo.users.model.UsersEntity; +import com.example.demo.users.service.UsersService; + +@SpringBootApplication +public class DemoApplication implements CommandLineRunner { + private final Logger log = LoggerFactory.getLogger(DemoApplication.class); + + private final UsersService userService; + private final TypesService typesService; + private final ProductsService productsService; + private final OrdersService ordersService; + + public DemoApplication(TypesService typesService, ProductsService productsService, + UsersService userService, OrdersService ordersService) { + + this.userService = userService; + this.typesService = typesService; + this.productsService = productsService; + this.ordersService = ordersService; + } + + public static void main(String[] args) { + SpringApplication.run(DemoApplication.class, args); + } + + @Override + public void run(String... args) throws Exception { + if (args.length > 0 && Objects.equals("--populate", args[0])) { + + log.info("Создание пользователей"); + final var user1 = userService.create(new UsersEntity("Anton", "1234")); + userService.create(new UsersEntity("Dasha", "4567")); + + log.info("Создание категорий"); + final var type1 = typesService.create(new TypesEntity("Компьютера")); + final var type2 = typesService.create(new TypesEntity("Приставки")); + + log.info("Создание продуктов"); + final var product1 = productsService.create(new ProductsEntity(type1, "Компьютер 1", 55232.00)); + final var product2 = productsService.create(new ProductsEntity(type1, "Компьютер 2", 70300.00)); + final var product3 = productsService.create(new ProductsEntity(type2, "Компьютер 3", 150000.00)); + + log.info("Создание заказов"); + + final var orders = List.of( + new OrdersEntity(product1, 3, new Date()), + new OrdersEntity(product2, 2, new Date()), + new OrdersEntity(product3, 1, new Date()), + new OrdersEntity(product1, 4, new Date())); + orders.forEach(order -> ordersService.create(user1.getId(), order)); + } + } +} diff --git a/src/main/java/com/example/demo/core/api/PageDto.java b/src/main/java/com/example/demo/core/api/PageDto.java new file mode 100644 index 0000000..88f4dd2 --- /dev/null +++ b/src/main/java/com/example/demo/core/api/PageDto.java @@ -0,0 +1,97 @@ +package com.example.demo.core.api; + +import java.util.ArrayList; +import java.util.List; + +public class PageDto { + private List items = new ArrayList<>(); + private int itemsCount; + private int currentPage; + private int currentSize; + private int totalPages; + private long totalItems; + private boolean isFirst; + private boolean isLast; + private boolean hasNext; + private boolean hasPrevious; + + public List getItems() { + return items; + } + + public void setItems(List items) { + this.items = items; + } + + public int getItemsCount() { + return itemsCount; + } + + public void setItemsCount(int itemsCount) { + this.itemsCount = itemsCount; + } + + public int getCurrentPage() { + return currentPage; + } + + public void setCurrentPage(int currentPage) { + this.currentPage = currentPage; + } + + public int getCurrentSize() { + return currentSize; + } + + public void setCurrentSize(int currentSize) { + this.currentSize = currentSize; + } + + public int getTotalPages() { + return totalPages; + } + + public void setTotalPages(int totalPages) { + this.totalPages = totalPages; + } + + public long getTotalItems() { + return totalItems; + } + + public void setTotalItems(long totalItems) { + this.totalItems = totalItems; + } + + public boolean isFirst() { + return isFirst; + } + + public void setFirst(boolean isFirst) { + this.isFirst = isFirst; + } + + public boolean isLast() { + return isLast; + } + + public void setLast(boolean isLast) { + this.isLast = isLast; + } + + public boolean isHasNext() { + return hasNext; + } + + public void setHasNext(boolean hasNext) { + this.hasNext = hasNext; + } + + public boolean isHasPrevious() { + return hasPrevious; + } + + public void setHasPrevious(boolean hasPrevious) { + this.hasPrevious = hasPrevious; + } +} \ No newline at end of file diff --git a/src/main/java/com/example/demo/core/api/PageDtoMapper.java b/src/main/java/com/example/demo/core/api/PageDtoMapper.java new file mode 100644 index 0000000..e8d3dd0 --- /dev/null +++ b/src/main/java/com/example/demo/core/api/PageDtoMapper.java @@ -0,0 +1,25 @@ +package com.example.demo.core.api; + +import java.util.function.Function; + +import org.springframework.data.domain.Page; + +public class PageDtoMapper { + private PageDtoMapper() { + } + + public static PageDto toDto(Page page, Function mapper) { + final PageDto dto = new PageDto<>(); + dto.setItems(page.getContent().stream().map(mapper::apply).toList()); + dto.setItemsCount(page.getNumberOfElements()); + dto.setCurrentPage(page.getNumber()); + dto.setCurrentSize(page.getSize()); + dto.setTotalPages(page.getTotalPages()); + dto.setTotalItems(page.getTotalElements()); + dto.setFirst(page.isFirst()); + dto.setLast(page.isLast()); + dto.setHasNext(page.hasNext()); + dto.setHasPrevious(page.hasPrevious()); + return dto; + } +} diff --git a/src/main/java/com/example/demo/core/configuration/Constants.java b/src/main/java/com/example/demo/core/configuration/Constants.java new file mode 100644 index 0000000..4bd6a8d --- /dev/null +++ b/src/main/java/com/example/demo/core/configuration/Constants.java @@ -0,0 +1,12 @@ +package com.example.demo.core.configuration; + +public class Constants { + public static final String SEQUENCE_NAME = "hibernate_sequence"; + + public static final String API_URL = "/api/1.0"; + + public static final String DEFAULT_PAGE_SIZE = "5"; + + private Constants() { + } +} diff --git a/src/main/java/com/example/demo/core/configuration/MapperConfiguration.java b/src/main/java/com/example/demo/core/configuration/MapperConfiguration.java new file mode 100644 index 0000000..a5ad6f3 --- /dev/null +++ b/src/main/java/com/example/demo/core/configuration/MapperConfiguration.java @@ -0,0 +1,13 @@ +package com.example.demo.core.configuration; + +import org.modelmapper.ModelMapper; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +@Configuration +public class MapperConfiguration { + @Bean + ModelMapper modelMapper() { + return new ModelMapper(); + } +} diff --git a/src/main/java/com/example/demo/core/configuration/WebConfiguration.java b/src/main/java/com/example/demo/core/configuration/WebConfiguration.java new file mode 100644 index 0000000..762e85a --- /dev/null +++ b/src/main/java/com/example/demo/core/configuration/WebConfiguration.java @@ -0,0 +1,15 @@ +package com.example.demo.core.configuration; + +import org.springframework.context.annotation.Configuration; +import org.springframework.lang.NonNull; +import org.springframework.web.servlet.config.annotation.CorsRegistry; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; + +@Configuration +public class WebConfiguration implements WebMvcConfigurer { + @Override + public void addCorsMappings(@NonNull CorsRegistry registry) { + registry.addMapping("/**") + .allowedMethods("GET", "POST", "PUT", "DELETE"); + } +} diff --git a/src/main/java/com/example/demo/core/error/NotFoundException.java b/src/main/java/com/example/demo/core/error/NotFoundException.java new file mode 100644 index 0000000..a61d118 --- /dev/null +++ b/src/main/java/com/example/demo/core/error/NotFoundException.java @@ -0,0 +1,7 @@ +package com.example.demo.core.error; + +public class NotFoundException extends RuntimeException { + public NotFoundException(Class clazz, Long id) { + super(String.format("%s with id [%s] is not found or not exists", clazz.getSimpleName(), id)); + } +} diff --git a/src/main/java/com/example/demo/core/model/BaseEntity.java b/src/main/java/com/example/demo/core/model/BaseEntity.java new file mode 100644 index 0000000..68b584e --- /dev/null +++ b/src/main/java/com/example/demo/core/model/BaseEntity.java @@ -0,0 +1,32 @@ +package com.example.demo.core.model; +import com.example.demo.core.configuration.Constants; + +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.MappedSuperclass; +import jakarta.persistence.SequenceGenerator; + +@MappedSuperclass +public abstract class BaseEntity { + + @Id + @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = Constants.SEQUENCE_NAME) + @SequenceGenerator(name = Constants.SEQUENCE_NAME, sequenceName = Constants.SEQUENCE_NAME, allocationSize = 1) + protected Long id; + + protected BaseEntity() { + } + + protected BaseEntity(Long id) { + this.id = id; + } + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } +} diff --git a/src/main/java/com/example/demo/orders/api/OrdersController.java b/src/main/java/com/example/demo/orders/api/OrdersController.java new file mode 100644 index 0000000..b02b87b --- /dev/null +++ b/src/main/java/com/example/demo/orders/api/OrdersController.java @@ -0,0 +1,93 @@ +package com.example.demo.orders.api; + +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.List; + +import org.modelmapper.ModelMapper; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import com.example.demo.core.configuration.Constants; +import com.example.demo.orders.model.OrdersEntity; +import com.example.demo.orders.service.OrdersService; +import com.example.demo.products.model.ProductsEntity; +import com.example.demo.products.service.ProductsService; + +import jakarta.validation.Valid; + +@RestController +@RequestMapping(Constants.API_URL + "/user/{user}/order") +public class OrdersController { + private final OrdersService ordersService; + private final ProductsService productsService; + private final ModelMapper modelMapper; + private SimpleDateFormat formater = new SimpleDateFormat("dd.MM.yyyy"); + + public OrdersController(OrdersService ordersService, ProductsService productsService, ModelMapper modelMapper) { + this.ordersService = ordersService; + this.productsService = productsService; + this.modelMapper = modelMapper; + } + + public Date StringConvertDate(String date) { + + try { + return formater.parse(date); + } catch (ParseException e) { + e.printStackTrace(); + return null; + } + } + + public String DateConvertString(Date date) { + return formater.format(date); + } + + private OrdersDto toDto(OrdersEntity entity) { + // String dateEntity = DateConvertString(entity.getDate()); + // entity.setDate(dateEntity); + return modelMapper.map(entity, OrdersDto.class); + } + + private OrdersEntity toEntity(OrdersDto dto) { + final OrdersEntity entity = modelMapper.map(dto, OrdersEntity.class); + entity.setProduct(productsService.get(dto.getProductId())); + return entity; + } + + @GetMapping + public List getAll(@PathVariable(name = "user") Long userId, + @RequestParam(name = "productId", defaultValue = "0") ProductsEntity product) { + return ordersService.getAll(userId).stream().map(this::toDto).toList(); + } + + @GetMapping("/{id}") + public OrdersDto get(@PathVariable(name = "user") Long userId, @PathVariable(name = "id") Long id) { + return toDto(ordersService.get(userId, id)); + } + + @PostMapping + public OrdersDto create(@PathVariable(name = "user") Long userId, @RequestBody @Valid OrdersDto dto) { + return toDto(ordersService.create(userId, toEntity(dto))); + } + + @PutMapping("/{id}") + public OrdersDto update(@PathVariable(name = "user") Long userId, @PathVariable(name = "id") Long id, + @RequestBody OrdersDto dto) { + return toDto(ordersService.update(userId, id, toEntity(dto))); + } + + @DeleteMapping("/{id}") + public OrdersDto delete(@PathVariable(name = "user") Long userId, @PathVariable(name = "id") Long id) { + return toDto(ordersService.delete(userId, id)); + } +} diff --git a/src/main/java/com/example/demo/orders/api/OrdersDto.java b/src/main/java/com/example/demo/orders/api/OrdersDto.java new file mode 100644 index 0000000..da10b61 --- /dev/null +++ b/src/main/java/com/example/demo/orders/api/OrdersDto.java @@ -0,0 +1,67 @@ +package com.example.demo.orders.api; + +import java.util.Date; + +import com.example.demo.products.model.ProductsEntity; +import com.fasterxml.jackson.annotation.JsonProperty; + +import jakarta.validation.constraints.Min; +import jakarta.validation.constraints.NotNull; + +public class OrdersDto { + @JsonProperty(access = JsonProperty.Access.READ_ONLY) + private Long id; + @NotNull + private ProductsEntity product; + @NotNull + @Min(1) + private Integer count; + @NotNull + private Date date; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public ProductsEntity getProduct() { + return product; + } + + public void setProduct(ProductsEntity product) { + this.product = product; + } + + public Long getProductId() { + return product.getId(); + } + + public void setProductId(Long productId) { + productId = product.getId(); + } + + public Integer getCount() { + return count; + } + + public void setCount(Integer count) { + this.count = count; + } + + public Date getDate() { + return date; + } + + public void setDate(Date date) { + this.date = date; + } + + @JsonProperty(access = JsonProperty.Access.READ_ONLY) + public Double getSum() { + return count * product.getPrice(); + } + +} diff --git a/src/main/java/com/example/demo/orders/model/OrdersEntity.java b/src/main/java/com/example/demo/orders/model/OrdersEntity.java new file mode 100644 index 0000000..a6cfd91 --- /dev/null +++ b/src/main/java/com/example/demo/orders/model/OrdersEntity.java @@ -0,0 +1,105 @@ +package com.example.demo.orders.model; + +import java.util.Date; +import java.util.Objects; + +import com.example.demo.core.model.BaseEntity; +import com.example.demo.products.model.ProductsEntity; +import com.example.demo.users.model.UsersEntity; + +import jakarta.persistence.Temporal; +import jakarta.persistence.TemporalType; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.Table; + +@Entity +@Table(name = "orders") +public class OrdersEntity extends BaseEntity { + @ManyToOne + @JoinColumn(name = "productId", nullable = false) + private ProductsEntity product; + + @ManyToOne + @JoinColumn(name = "userId", nullable = false) + private UsersEntity user; + + @Column(nullable = false) + private Integer count; + + private Double sum; + + @Temporal(TemporalType.DATE) + private Date date; + + public OrdersEntity() { + } + + public OrdersEntity(ProductsEntity product, Integer count, Date date) { + this.product = product; + this.count = count; + this.sum = getSum(); + this.date = date; + } + + public ProductsEntity getProduct() { + return product; + } + + public void setProduct(ProductsEntity product) { + this.product = product; + } + + public UsersEntity getUser() { + return user; + } + + public void setUser(UsersEntity user) { + this.user = user; + if (!user.getOrders().contains(this)) { + user.getOrders().add(this); + } + } + + public Double getSum() { + sum = count * product.getPrice(); + return sum; + } + + public Integer getCount() { + return count; + } + + public void setCount(Integer count) { + this.count = count; + } + + public Date getDate() { + return date; + } + + public void setDate(Date date) { + this.date = date; + } + + @Override + public int hashCode() { + return Objects.hash(id, product, count); + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null || getClass() != obj.getClass()) + return false; + final OrdersEntity other = (OrdersEntity) obj; + return Objects.equals(other.getId(), id) + && Objects.equals(other.getProduct(), product) + && Objects.equals(other.getUser().getId(), user.getId()) + && Objects.equals(other.getCount(), count) + && Objects.equals(other.getDate(), date); + } +} diff --git a/src/main/java/com/example/demo/orders/repository/OrdersRepository.java b/src/main/java/com/example/demo/orders/repository/OrdersRepository.java new file mode 100644 index 0000000..1f374db --- /dev/null +++ b/src/main/java/com/example/demo/orders/repository/OrdersRepository.java @@ -0,0 +1,14 @@ +package com.example.demo.orders.repository; + +import java.util.List; +import java.util.Optional; + +import org.springframework.data.repository.CrudRepository; + +import com.example.demo.orders.model.OrdersEntity; + +public interface OrdersRepository extends CrudRepository { + Optional findOneByUserIdAndId(long userId, long id); + + List findByUserId(long userId); +} diff --git a/src/main/java/com/example/demo/orders/service/OrdersService.java b/src/main/java/com/example/demo/orders/service/OrdersService.java new file mode 100644 index 0000000..9b17efc --- /dev/null +++ b/src/main/java/com/example/demo/orders/service/OrdersService.java @@ -0,0 +1,71 @@ +package com.example.demo.orders.service; + +import java.util.List; + +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import com.example.demo.core.error.NotFoundException; +import com.example.demo.orders.model.OrdersEntity; +import com.example.demo.orders.repository.OrdersRepository; +import com.example.demo.users.model.UsersEntity; +import com.example.demo.users.service.UsersService; + +@Service +public class OrdersService { + private final OrdersRepository repository; + private final UsersService userService; + + public OrdersService(OrdersRepository repository, UsersService userService) { + this.repository = repository; + this.userService = userService; + } + + @Transactional(readOnly = true) + public List getAll(long userId) { + userService.get(userId); + return repository.findByUserId(userId); + } + + @Transactional(readOnly = true) + public OrdersEntity get(long userId, Long id) { + userService.get(userId); + return repository.findOneByUserIdAndId(userId, id) + .orElseThrow(() -> new NotFoundException(OrdersEntity.class, id)); + } + + @Transactional + public OrdersEntity create(long userId, OrdersEntity entity) { + if (entity == null) { + throw new IllegalArgumentException("Entity is null"); + } + final UsersEntity existsUser = userService.get(userId); + entity.setUser(existsUser); + return repository.save(entity); + } + + @Transactional + public OrdersEntity update(long userId, Long id, OrdersEntity entity) { + userService.get(userId); + final OrdersEntity existsEntity = get(userId, id); + existsEntity.setProduct(entity.getProduct()); + existsEntity.setCount(entity.getCount()); + existsEntity.setDate(entity.getDate()); + return repository.save(existsEntity); + } + + @Transactional + public OrdersEntity delete(long userId, Long id) { + userService.get(userId); + final OrdersEntity existsEntity = get(userId, id); + repository.delete(existsEntity); + return existsEntity; + } + + // @Transactional(readOnly = true) + // public List getTotal(long userId) { + // //userService.get(userId); + // return repository.getOrdersTotalByUser(userId); + // } + +} diff --git a/src/main/java/com/example/demo/products/api/ProductsController.java b/src/main/java/com/example/demo/products/api/ProductsController.java new file mode 100644 index 0000000..0f393bb --- /dev/null +++ b/src/main/java/com/example/demo/products/api/ProductsController.java @@ -0,0 +1,81 @@ +package com.example.demo.products.api; + +import java.util.List; + +import org.modelmapper.ModelMapper; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import com.example.demo.core.configuration.Constants; +import com.example.demo.products.model.ProductsEntity; +import com.example.demo.products.model.ProductsGrouped; +import com.example.demo.products.service.ProductsService; +import com.example.demo.types.service.TypesService; + +import jakarta.validation.Valid; + +@RestController +@RequestMapping(Constants.API_URL + "/Products") +public class ProductsController { + private final ProductsService productsService; + private final TypesService typesService; + private final ModelMapper modelMapper; + + public ProductsController(ProductsService productsService, TypesService typesService, + ModelMapper modelMapper) { + this.productsService = productsService; + this.typesService = typesService; + this.modelMapper = modelMapper; + } + + private ProductsDto toDto(ProductsEntity entity) { + return modelMapper.map(entity, ProductsDto.class); + } + + private ProductsGroupedDto toGroupedDto(ProductsGrouped entity) { + return (ProductsGroupedDto) this.modelMapper.map(entity, ProductsGroupedDto.class); + } + + private ProductsEntity toEntity(ProductsDto dto) { + final ProductsEntity entity = modelMapper.map(dto, ProductsEntity.class); + entity.setType(typesService.get(dto.getTypeId())); + return entity; + } + + @GetMapping + public List getAll(@RequestParam(name = "typeId", defaultValue = "0") Long typeId) { + return productsService.getAll().stream().map(this::toDto).toList(); + } + + @GetMapping("/{id}") + public ProductsDto get(@PathVariable(name = "id") Long id) { + return toDto(productsService.get(id)); + } + + @PostMapping + public ProductsDto create(@RequestBody @Valid ProductsDto dto) { + return toDto(productsService.create(toEntity(dto))); + } + + @PutMapping("/{id}") + public ProductsDto update(@PathVariable(name = "id") Long id, @RequestBody ProductsDto dto) { + return toDto(productsService.update(id, toEntity(dto))); + } + + @DeleteMapping("/{id}") + public ProductsDto delete(@PathVariable(name = "id") Long id) { + return toDto(productsService.delete(id)); + } + + @GetMapping({ "/total" }) + public List getMethodName() { + return this.productsService.getExpensiveProducts().stream().map(this::toGroupedDto).toList(); + } +} diff --git a/src/main/java/com/example/demo/products/api/ProductsDto.java b/src/main/java/com/example/demo/products/api/ProductsDto.java new file mode 100644 index 0000000..ab28e04 --- /dev/null +++ b/src/main/java/com/example/demo/products/api/ProductsDto.java @@ -0,0 +1,53 @@ +package com.example.demo.products.api; + +import com.fasterxml.jackson.annotation.JsonProperty; + +import jakarta.validation.constraints.Min; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; + +public class ProductsDto { + @JsonProperty(access = JsonProperty.Access.READ_ONLY) + private Long id; + @NotBlank + private String name; + @NotNull + @Min(1) + private Long typeId; + @NotNull + @Min(1) + private Double price; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getTypeId() { + return typeId; + } + + public void setTypeId(Long typeId) { + this.typeId = typeId; + } + + public Double getPrice() { + return price; + } + + public void setPrice(Double price) { + this.price = price; + } + + public void setName(String name) { + this.name = name; + } + + public String getName() { + return name; + } + +} diff --git a/src/main/java/com/example/demo/products/api/ProductsGroupedDto.java b/src/main/java/com/example/demo/products/api/ProductsGroupedDto.java new file mode 100644 index 0000000..defe8cc --- /dev/null +++ b/src/main/java/com/example/demo/products/api/ProductsGroupedDto.java @@ -0,0 +1,26 @@ +package com.example.demo.products.api; + +public class ProductsGroupedDto { + private Long productId; + private Double price; + + public ProductsGroupedDto() { + } + + public Long getProductId() { + return this.productId; + } + + public void setProductId(Long productId) { + this.productId = productId; + } + + public Double getPrice() { + return this.price; + } + + public void setPrice(Double price) { + this.price = price; + } + +} \ No newline at end of file diff --git a/src/main/java/com/example/demo/products/model/ProductsEntity.java b/src/main/java/com/example/demo/products/model/ProductsEntity.java new file mode 100644 index 0000000..0639439 --- /dev/null +++ b/src/main/java/com/example/demo/products/model/ProductsEntity.java @@ -0,0 +1,75 @@ +package com.example.demo.products.model; + +import java.util.Objects; + +import com.example.demo.core.model.BaseEntity; +import com.example.demo.types.model.TypesEntity; + +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.Table; + +@Entity +@Table(name = "products") +public class ProductsEntity extends BaseEntity { + @ManyToOne + @JoinColumn(name = "typeId", nullable = false) + private TypesEntity type; + @Column(nullable = false) + private String name; + @Column(nullable = false) + private Double price; + + public ProductsEntity() { + } + + public ProductsEntity(TypesEntity type, String name, Double price) { + this.type = type; + this.name = name; + this.price = price; + } + + public TypesEntity getType() { + return type; + } + + public void setType(TypesEntity type) { + this.type = type; + } + + public Double getPrice() { + return price; + } + + public void setPrice(Double price) { + this.price = price; + } + + public void setName(String name) { + this.name = name; + } + + public String getName() { + return name; + } + + @Override + public int hashCode() { + return Objects.hash(id, type, name, price); + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null || getClass() != obj.getClass()) + return false; + final ProductsEntity other = (ProductsEntity) obj; + return Objects.equals(other.getId(), id) + && Objects.equals(other.getType(), type) + && Objects.equals(other.getName(), name) + && Objects.equals(other.getPrice(), price); + } +} diff --git a/src/main/java/com/example/demo/products/model/ProductsGrouped.java b/src/main/java/com/example/demo/products/model/ProductsGrouped.java new file mode 100644 index 0000000..1e6cb47 --- /dev/null +++ b/src/main/java/com/example/demo/products/model/ProductsGrouped.java @@ -0,0 +1,9 @@ +package com.example.demo.products.model; + +import com.example.demo.users.model.UsersEntity; + +public interface ProductsGrouped { + UsersEntity getProduct(); + + Double getPrice(); +} diff --git a/src/main/java/com/example/demo/products/repository/ProductsRepository.java b/src/main/java/com/example/demo/products/repository/ProductsRepository.java new file mode 100644 index 0000000..06556cd --- /dev/null +++ b/src/main/java/com/example/demo/products/repository/ProductsRepository.java @@ -0,0 +1,20 @@ +package com.example.demo.products.repository; + +import java.util.List; + +import org.springframework.data.jpa.repository.Query; +import org.springframework.data.repository.CrudRepository; + +import com.example.demo.products.model.ProductsEntity; +import com.example.demo.products.model.ProductsGrouped; + +public interface ProductsRepository extends CrudRepository { + + @Query("SELECT product, price" + + "FROM ProductsEntity" + + "WHERE price > 1000 " + + "GROUP BY product " + + "ORDER BY price DESC") + List getExpensiveProducts(); + // продукты, цена которых больше 1000 +} diff --git a/src/main/java/com/example/demo/products/service/ProductsService.java b/src/main/java/com/example/demo/products/service/ProductsService.java new file mode 100644 index 0000000..d7aa16d --- /dev/null +++ b/src/main/java/com/example/demo/products/service/ProductsService.java @@ -0,0 +1,60 @@ +package com.example.demo.products.service; + +import java.util.List; +import java.util.stream.StreamSupport; + +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import com.example.demo.core.error.NotFoundException; +import com.example.demo.products.model.ProductsEntity; +import com.example.demo.products.model.ProductsGrouped; +import com.example.demo.products.repository.ProductsRepository; + +@Service +public class ProductsService { + private final ProductsRepository repository; + + public ProductsService(ProductsRepository repository) { + this.repository = repository; + } + + @Transactional(readOnly = true) + public List getAll() { + return StreamSupport.stream(repository.findAll().spliterator(), false).toList(); + } + + @Transactional(readOnly = true) + public ProductsEntity get(Long id) { + return repository.findById(id).orElseThrow(() -> new NotFoundException(ProductsEntity.class, id)); + } + + @Transactional + public ProductsEntity create(ProductsEntity entity) { + if (entity == null) { + throw new IllegalArgumentException("Entity is null"); + } + return repository.save(entity); + } + + @Transactional + public ProductsEntity update(Long id, ProductsEntity entity) { + final ProductsEntity existsEntity = get(id); + existsEntity.setType(entity.getType()); + existsEntity.setName(entity.getName()); + existsEntity.setPrice(entity.getPrice()); + return repository.save(existsEntity); + } + + @Transactional + public ProductsEntity delete(Long id) { + final ProductsEntity existsEntity = get(id); + repository.delete(existsEntity); + return existsEntity; + } + + @Transactional(readOnly = true) + public List getExpensiveProducts() { + return this.repository.getExpensiveProducts(); + } +} diff --git a/src/main/java/com/example/demo/types/api/TypesController.java b/src/main/java/com/example/demo/types/api/TypesController.java new file mode 100644 index 0000000..9980380 --- /dev/null +++ b/src/main/java/com/example/demo/types/api/TypesController.java @@ -0,0 +1,64 @@ +package com.example.demo.types.api; + +import java.util.List; + +import org.modelmapper.ModelMapper; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import com.example.demo.core.configuration.Constants; +import com.example.demo.types.model.TypesEntity; +import com.example.demo.types.service.TypesService; + +import jakarta.validation.Valid; + +@RestController +@RequestMapping(Constants.API_URL + "/types") +public class TypesController { + private final TypesService typesService; + private final ModelMapper modelMapper; + + public TypesController(TypesService typesService, ModelMapper modelMapper) { + this.typesService = typesService; + this.modelMapper = modelMapper; + } + + private TypesDto toDto(TypesEntity entity) { + return modelMapper.map(entity, TypesDto.class); + } + + private TypesEntity toEntity(TypesDto dto) { + return modelMapper.map(dto, TypesEntity.class); + } + + @GetMapping + public List getAll() { + return typesService.getAll().stream().map(this::toDto).toList(); + } + + @GetMapping("/{id}") + public TypesDto get(@PathVariable(name = "id") Long id) { + return toDto(typesService.get(id)); + } + + @PostMapping + public TypesDto create(@RequestBody @Valid TypesDto dto) { + return toDto(typesService.create(toEntity(dto))); + } + + @PutMapping("/{id}") + public TypesDto update(@PathVariable(name = "id") Long id, @RequestBody TypesDto dto) { + return toDto(typesService.update(id, toEntity(dto))); + } + + @DeleteMapping("/{id}") + public TypesDto delete(@PathVariable(name = "id") Long id) { + return toDto(typesService.delete(id)); + } +} diff --git a/src/main/java/com/example/demo/types/api/TypesDto.java b/src/main/java/com/example/demo/types/api/TypesDto.java new file mode 100644 index 0000000..03d2236 --- /dev/null +++ b/src/main/java/com/example/demo/types/api/TypesDto.java @@ -0,0 +1,28 @@ +package com.example.demo.types.api; + +import com.fasterxml.jackson.annotation.JsonProperty; + +import jakarta.validation.constraints.NotBlank; + +public class TypesDto { + @JsonProperty(access = JsonProperty.Access.READ_ONLY) + private Long id; + @NotBlank + private String name; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } +} diff --git a/src/main/java/com/example/demo/types/model/TypesEntity.java b/src/main/java/com/example/demo/types/model/TypesEntity.java new file mode 100644 index 0000000..af897b6 --- /dev/null +++ b/src/main/java/com/example/demo/types/model/TypesEntity.java @@ -0,0 +1,47 @@ +package com.example.demo.types.model; + +import java.util.Objects; +import com.example.demo.core.model.BaseEntity; + +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.Table; + +@Entity +@Table(name = "types") +public class TypesEntity extends BaseEntity { + @Column(nullable = false, unique = true, length = 50) + private String name; + + public TypesEntity() { + super(); + } + + public TypesEntity(String name) { + this.name = name; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + @Override + public int hashCode() { + return Objects.hash(id, name); + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null || getClass() != obj.getClass()) + return false; + final TypesEntity other = (TypesEntity) obj; + return Objects.equals(other.getId(), id) + && Objects.equals(other.getName(), name); + } +} diff --git a/src/main/java/com/example/demo/types/repository/TypesRepository.java b/src/main/java/com/example/demo/types/repository/TypesRepository.java new file mode 100644 index 0000000..c745171 --- /dev/null +++ b/src/main/java/com/example/demo/types/repository/TypesRepository.java @@ -0,0 +1,8 @@ +package com.example.demo.types.repository; + +import org.springframework.data.repository.CrudRepository; + +import com.example.demo.types.model.TypesEntity; + +public interface TypesRepository extends CrudRepository { +} diff --git a/src/main/java/com/example/demo/types/service/TypesService.java b/src/main/java/com/example/demo/types/service/TypesService.java new file mode 100644 index 0000000..5a68ecd --- /dev/null +++ b/src/main/java/com/example/demo/types/service/TypesService.java @@ -0,0 +1,52 @@ +package com.example.demo.types.service; + +import java.util.List; +import java.util.stream.StreamSupport; + +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import com.example.demo.core.error.NotFoundException; +import com.example.demo.types.model.TypesEntity; +import com.example.demo.types.repository.TypesRepository; + +@Service +public class TypesService { + private final TypesRepository repository; + + public TypesService(TypesRepository repository) { + this.repository = repository; + } + + @Transactional(readOnly = true) + public List getAll() { + return StreamSupport.stream(repository.findAll().spliterator(), false).toList(); + } + + @Transactional(readOnly = true) + public TypesEntity get(Long id) { + return repository.findById(id).orElseThrow(() -> new NotFoundException(TypesEntity.class, id)); + } + + @Transactional + public TypesEntity create(TypesEntity entity) { + if (entity == null) { + throw new IllegalArgumentException("Entity is null"); + } + return repository.save(entity); + } + + @Transactional + public TypesEntity update(Long id, TypesEntity entity) { + final TypesEntity existsEntity = get(id); + existsEntity.setName(entity.getName()); + return repository.save(existsEntity); + } + + @Transactional + public TypesEntity delete(Long id) { + final TypesEntity existsEntity = get(id); + repository.delete(existsEntity); + return existsEntity; + } +} diff --git a/src/main/java/com/example/demo/users/api/UsersController.java b/src/main/java/com/example/demo/users/api/UsersController.java new file mode 100644 index 0000000..106602b --- /dev/null +++ b/src/main/java/com/example/demo/users/api/UsersController.java @@ -0,0 +1,68 @@ +package com.example.demo.users.api; + +import org.modelmapper.ModelMapper; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import com.example.demo.core.api.PageDto; +import com.example.demo.core.api.PageDtoMapper; +import com.example.demo.core.configuration.Constants; +import com.example.demo.users.model.UsersEntity; +import com.example.demo.users.service.UsersService; + +import jakarta.validation.Valid; + +@RestController +@RequestMapping(Constants.API_URL + "/Users") +public class UsersController { + private final UsersService usersService; + private final ModelMapper modelMapper; + + public UsersController(UsersService usersService, ModelMapper modelMapper) { + this.usersService = usersService; + this.modelMapper = modelMapper; + } + + private UsersDto toDto(UsersEntity entity) { + return modelMapper.map(entity, UsersDto.class); + } + + private UsersEntity toEntity(UsersDto dto) { + return modelMapper.map(dto, UsersEntity.class); + } + + @GetMapping + public PageDto getAll( + @RequestParam(name = "page", defaultValue = "0") int page, + @RequestParam(name = "size", defaultValue = Constants.DEFAULT_PAGE_SIZE) int size) { + return PageDtoMapper.toDto(usersService.getAll(page, size), this::toDto); + } + + @GetMapping("/{id}") + public UsersDto get(@PathVariable(name = "id") Long id) { + return toDto(usersService.get(id)); + } + + @PostMapping + public UsersDto create(@RequestBody @Valid UsersDto dto) { + return toDto(usersService.create(toEntity(dto))); + } + + @PutMapping("/{id}") + public UsersDto update(@PathVariable(name = "id") Long id, @RequestBody UsersDto dto) { + return toDto(usersService.update(id, toEntity(dto))); + } + + @DeleteMapping("/{id}") + public UsersDto delete(@PathVariable(name = "id") Long id) { + return toDto(usersService.delete(id)); + } + +} diff --git a/src/main/java/com/example/demo/users/api/UsersDto.java b/src/main/java/com/example/demo/users/api/UsersDto.java new file mode 100644 index 0000000..2862b84 --- /dev/null +++ b/src/main/java/com/example/demo/users/api/UsersDto.java @@ -0,0 +1,37 @@ +package com.example.demo.users.api; + +import com.fasterxml.jackson.annotation.JsonProperty; + +import jakarta.validation.constraints.NotBlank; + +public class UsersDto { + @JsonProperty(access = JsonProperty.Access.READ_ONLY) + private Long id; + @NotBlank + private String login; + private String password; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getLogin() { + return login; + } + + public void setLogin(String login) { + this.login = login; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } +} diff --git a/src/main/java/com/example/demo/users/model/UsersEntity.java b/src/main/java/com/example/demo/users/model/UsersEntity.java new file mode 100644 index 0000000..095bc71 --- /dev/null +++ b/src/main/java/com/example/demo/users/model/UsersEntity.java @@ -0,0 +1,80 @@ +package com.example.demo.users.model; + +import java.util.Objects; +import java.util.Set; +import java.util.HashSet; +import com.example.demo.core.model.BaseEntity; +import com.example.demo.orders.model.OrdersEntity; + +import jakarta.persistence.CascadeType; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.OneToMany; +import jakarta.persistence.OrderBy; +import jakarta.persistence.Table; + +@Entity +@Table(name = "users") +public class UsersEntity extends BaseEntity { + @Column(nullable = false, unique = true, length = 20) + private String login; + + @Column(nullable = false, length = 20) + private String password; + + @OneToMany(mappedBy = "user", cascade = CascadeType.ALL) + @OrderBy("id ASC") + private Set orders = new HashSet<>(); + + public UsersEntity() { + } + + public UsersEntity(String login, String password) { + this.login = login; + this.password = password; + } + + public Set getOrders() { + return orders; + } + + public void setOrder(OrdersEntity order) { + if (order.getUser() != this) { + order.setUser(this); + } + orders.add(order); + } + + public String getLogin() { + return login; + } + + public void setLogin(String login) { + this.login = login; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + @Override + public int hashCode() { + return Objects.hash(id, login, password); + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null || getClass() != obj.getClass()) + return false; + final UsersEntity other = (UsersEntity) obj; + return Objects.equals(other.getId(), id) + && Objects.equals(other.getLogin(), login) + && Objects.equals(other.getPassword(), password); + } +} diff --git a/src/main/java/com/example/demo/users/repository/UsersRepository.java b/src/main/java/com/example/demo/users/repository/UsersRepository.java new file mode 100644 index 0000000..c54a7f4 --- /dev/null +++ b/src/main/java/com/example/demo/users/repository/UsersRepository.java @@ -0,0 +1,11 @@ +package com.example.demo.users.repository; + +import org.springframework.data.repository.CrudRepository; +import org.springframework.data.repository.PagingAndSortingRepository; + +import com.example.demo.users.model.UsersEntity; + +public interface UsersRepository + extends CrudRepository, PagingAndSortingRepository { + +} \ No newline at end of file diff --git a/src/main/java/com/example/demo/users/service/UsersService.java b/src/main/java/com/example/demo/users/service/UsersService.java new file mode 100644 index 0000000..e77f285 --- /dev/null +++ b/src/main/java/com/example/demo/users/service/UsersService.java @@ -0,0 +1,61 @@ +package com.example.demo.users.service; + +import java.util.List; +import java.util.stream.StreamSupport; + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.PageRequest; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import com.example.demo.core.error.NotFoundException; +import com.example.demo.users.model.UsersEntity; +import com.example.demo.users.repository.UsersRepository; + +@Service +public class UsersService { + private final UsersRepository repository; + + public UsersService(UsersRepository repository) { + this.repository = repository; + } + + @Transactional(readOnly = true) + public List getAll() { + return StreamSupport.stream(repository.findAll().spliterator(), false).toList(); + } + + @Transactional(readOnly = true) + public Page getAll(int page, int size) { + return repository.findAll(PageRequest.of(page, size)); + } + + @Transactional(readOnly = true) + public UsersEntity get(Long id) { + return repository.findById(id).orElseThrow(() -> new NotFoundException(UsersEntity.class, id)); + } + + @Transactional + public UsersEntity create(UsersEntity entity) { + if (entity == null) { + throw new IllegalArgumentException("Entity is null"); + } + return repository.save(entity); + } + + @Transactional + public UsersEntity update(Long id, UsersEntity entity) { + final UsersEntity existsEntity = get(id); + existsEntity.setLogin(entity.getLogin()); + existsEntity.setPassword(entity.getPassword()); + repository.save(existsEntity); + return existsEntity; + } + + @Transactional + public UsersEntity delete(Long id) { + final UsersEntity existsEntity = get(id); + repository.delete(existsEntity); + return existsEntity; + } +} diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties new file mode 100644 index 0000000..62ab433 --- /dev/null +++ b/src/main/resources/application.properties @@ -0,0 +1,20 @@ +# Server +spring.main.banner-mode=off +server.port=8080 + +# Logger settings +# Available levels are: TRACE, DEBUG, INFO, WARN, ERROR, FATAL, OFF +logging.level.com.example.demo=DEBUG + +# JPA Settings +spring.datasource.url=jdbc:h2:file:./data +spring.datasource.username=sa +spring.datasource.password=password +spring.datasource.driver-class-name=org.h2.Driver +spring.jpa.hibernate.ddl-auto=create +spring.jpa.open-in-view=false +# spring.jpa.show-sql=true +# spring.jpa.properties.hibernate.format_sql=true + +# H2 console +spring.h2.console.enabled=true \ No newline at end of file diff --git a/src/test/java/com/example/demo/ProductsServiceTests.java b/src/test/java/com/example/demo/ProductsServiceTests.java new file mode 100644 index 0000000..97b0271 --- /dev/null +++ b/src/test/java/com/example/demo/ProductsServiceTests.java @@ -0,0 +1,86 @@ +package com.example.demo; + +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.MethodOrderer.OrderAnnotation; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestMethodOrder; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.context.SpringBootTest; + +import com.example.demo.core.error.NotFoundException; +import com.example.demo.products.model.ProductsEntity; +import com.example.demo.products.service.ProductsService; +import com.example.demo.types.model.TypesEntity; +import com.example.demo.types.service.TypesService; + +@SpringBootTest +@TestMethodOrder(OrderAnnotation.class) +class ProductsServiceTests { + @Autowired + private ProductsService productsService; + @Autowired + private TypesService typesService; + + private ProductsEntity product; + + private TypesEntity type1; + private TypesEntity type2; + + @BeforeEach + void createData() { + removeData(); + type1 = typesService.create(new TypesEntity("Телефон")); + type2 = typesService.create(new TypesEntity("Наушники")); + product = productsService.create(new ProductsEntity(type1, "Iphone", 155232.00)); + productsService.create(new ProductsEntity(type1, "Samsung", 200300.00)); + productsService.create(new ProductsEntity(type2, "JBL", 300.00)); + } + + @AfterEach + void removeData() { + productsService.getAll().forEach(item -> productsService.delete(item.getId())); + typesService.getAll().forEach(item -> typesService.delete(item.getId())); + } + + @Test + void getTest() { + Assertions.assertThrows(NotFoundException.class, () -> productsService.get(0L)); + } + + @Test + void createTest() { + Assertions.assertEquals(3, productsService.getAll().size()); + Assertions.assertEquals(product, productsService.get(product.getId())); + } + + @Test + void updateTest() { + final Double newPrice = 20000.00; + final ProductsEntity entity = productsService.get(product.getId()); + final Double oldPrice = entity.getPrice(); + final ProductsEntity newEntity = productsService.update(product.getId(), + new ProductsEntity(type1, "Iphone 11", newPrice)); + Assertions.assertEquals(3, productsService.getAll().size()); + Assertions.assertEquals(newEntity, productsService.get(newEntity.getId())); + Assertions.assertEquals(newPrice, newEntity.getPrice()); + Assertions.assertNotEquals(oldPrice, newEntity.getPrice()); + } + + @Test + void deleteTest() { + productsService.delete(product.getId()); + Assertions.assertEquals(2, productsService.getAll().size()); + + final ProductsEntity newEntity = productsService + .create(new ProductsEntity(type1, "Iphone 11", 15232.00)); + Assertions.assertEquals(3, productsService.getAll().size()); + Assertions.assertNotEquals(product.getId(), newEntity.getId()); + } + + @Test + void getExpensiveProducts() { + Assertions.assertEquals(2, productsService.getExpensiveProducts().size()); + } +} diff --git a/src/test/java/com/example/demo/TypesServiceTests.java b/src/test/java/com/example/demo/TypesServiceTests.java new file mode 100644 index 0000000..5143237 --- /dev/null +++ b/src/test/java/com/example/demo/TypesServiceTests.java @@ -0,0 +1,63 @@ +package com.example.demo; + +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.MethodOrderer.OrderAnnotation; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestMethodOrder; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.context.SpringBootTest; + +import com.example.demo.types.model.TypesEntity; +import com.example.demo.types.service.TypesService; + +@SpringBootTest +@TestMethodOrder(OrderAnnotation.class) +class TypesServiceTests { + @Autowired + private TypesService typesService; + + private TypesEntity type; + + @BeforeEach + void createData() { + removeData(); + type = typesService.create(new TypesEntity("Компьютер")); + typesService.create(new TypesEntity("Телефон")); + typesService.create(new TypesEntity("Приставка")); + } + + @AfterEach + void removeData() { + typesService.getAll().forEach(item -> typesService.delete(item.getId())); + } + + @Test + void createTest() { + Assertions.assertEquals(3, typesService.getAll().size()); + Assertions.assertEquals(type, typesService.get(type.getId())); + } + + @Test + void updateTest() { + final String test = "TEST"; + final TypesEntity entity = typesService.get(type.getId()); + final String oldName = entity.getName(); + final TypesEntity newEntity = typesService.update(type.getId(), new TypesEntity(test)); + Assertions.assertEquals(3, typesService.getAll().size()); + Assertions.assertEquals(newEntity, typesService.get(newEntity.getId())); + Assertions.assertEquals(test, newEntity.getName()); + Assertions.assertNotEquals(oldName, newEntity.getName()); + } + + @Test + void deleteTest() { + typesService.delete(type.getId()); + Assertions.assertEquals(2, typesService.getAll().size()); + + final TypesEntity newEntity = typesService.create(new TypesEntity("Компьютер")); + Assertions.assertEquals(3, typesService.getAll().size()); + Assertions.assertNotEquals(type.getId(), newEntity.getId()); + } +} diff --git a/src/test/java/com/example/demo/UsersOrdersServiceTests.java b/src/test/java/com/example/demo/UsersOrdersServiceTests.java new file mode 100644 index 0000000..0284c38 --- /dev/null +++ b/src/test/java/com/example/demo/UsersOrdersServiceTests.java @@ -0,0 +1,141 @@ +package com.example.demo; + +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.List; + +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.MethodOrderer.OrderAnnotation; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestMethodOrder; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.context.SpringBootTest; + +import com.example.demo.orders.model.OrdersEntity; +import com.example.demo.orders.service.OrdersService; +import com.example.demo.products.model.ProductsEntity; +import com.example.demo.products.service.ProductsService; +import com.example.demo.types.model.TypesEntity; +import com.example.demo.types.service.TypesService; +import com.example.demo.users.model.UsersEntity; +import com.example.demo.users.service.UsersService; + +@SpringBootTest +@TestMethodOrder(OrderAnnotation.class) +class UsersOrdersServiceTests { + @Autowired + private UsersService usersService; + @Autowired + private OrdersService ordersService; + @Autowired + private ProductsService productsService; + @Autowired + private TypesService typesService; + + private UsersEntity user1; + private UsersEntity user2; + + private ProductsEntity product; + private TypesEntity type; + private OrdersEntity order; + private SimpleDateFormat formater = new SimpleDateFormat("dd.MM.yyyy"); + + public String DateConvertString(Date date) { + return formater.format(date); + } + + @BeforeEach + void createData() { + removeData(); + + type = typesService.create(new TypesEntity("Телефон")); + + product = productsService.create(new ProductsEntity(type, "Nokia 2000", 1000.00)); + + user1 = usersService.create(new UsersEntity("Anton", "1234")); + user2 = usersService.create(new UsersEntity("Daria", "4567")); + + final var orders = List.of( + new OrdersEntity(product, 3, new Date()), + new OrdersEntity(product, 2, new Date()), + new OrdersEntity(product, 1, new Date()), + new OrdersEntity(product, 4, new Date())); + orders.forEach(order -> ordersService.create(user1.getId(), order)); + final var orders2 = List.of( + new OrdersEntity(product, 1, new Date()), + new OrdersEntity(product, 1, new Date()), + new OrdersEntity(product, 1, new Date()), + new OrdersEntity(product, 1, new Date()), + new OrdersEntity(product, 1, new Date())); + orders2.forEach(order -> ordersService.create(user2.getId(), order)); + // order = ordersService.get(user1.getId(), 1); + order = orders.get(0); + } + + @AfterEach + void removeData() { + usersService.getAll().forEach(item -> usersService.delete(item.getId())); + productsService.getAll().forEach(item -> productsService.delete(item.getId())); + typesService.getAll().forEach(item -> typesService.delete(item.getId())); + } + + @Test + void getOrderTest() { + Assertions.assertEquals(4, ordersService.getAll(user1.getId()).size()); + Assertions.assertEquals(5, ordersService.getAll(user2.getId()).size()); + } + + @Test + void getUserTest() { + Assertions.assertEquals(2, usersService.getAll().size()); + } + + @Test + void updateOrderTest() { + final Integer newCount = 5; + final OrdersEntity entity = ordersService.get(user1.getId(), order.getId()); + final Integer oldCount = entity.getCount(); + final OrdersEntity newEntity = ordersService.update(user1.getId(), order.getId(), + new OrdersEntity(product, newCount, new Date())); + Assertions.assertEquals(4, ordersService.getAll(user1.getId()).size()); + Assertions.assertEquals(newCount, newEntity.getCount()); + Assertions.assertNotEquals(oldCount, newEntity.getCount()); + } + + @Test + void updateUserTest() { + final String newPassword = "0000"; + final UsersEntity entity = usersService.get(user1.getId()); + final String login = entity.getLogin(); + final String oldPassword = entity.getPassword(); + final UsersEntity newEntity = usersService.update(user1.getId(), new UsersEntity(login, newPassword)); + Assertions.assertEquals(2, usersService.getAll().size()); + Assertions.assertEquals(newEntity, usersService.get(newEntity.getId())); + Assertions.assertEquals(newPassword, newEntity.getPassword()); + Assertions.assertNotEquals(oldPassword, newEntity.getPassword()); + } + + @Test + void deleteOrderTest() { + ordersService.delete(user1.getId(), order.getId()); + Assertions.assertEquals(3, ordersService.getAll(user1.getId()).size()); + + final OrdersEntity newEntity = ordersService.create(user1.getId(), new OrdersEntity(product, 3, new Date())); + Assertions.assertEquals(4, ordersService.getAll(user1.getId()).size()); + Assertions.assertNotEquals(order.getId(), newEntity.getId()); + } + + @Test + void deleteUserTest() { + usersService.delete(user1.getId()); + Assertions.assertEquals(1, usersService.getAll().size()); + + final UsersEntity newEntity = usersService.create(new UsersEntity("Anton", + "1234")); + Assertions.assertEquals(2, usersService.getAll().size()); + Assertions.assertNotEquals(user1.getId(), newEntity.getId()); + } + +} diff --git a/src/test/resources/application.properties b/src/test/resources/application.properties new file mode 100644 index 0000000..d5f355c --- /dev/null +++ b/src/test/resources/application.properties @@ -0,0 +1,14 @@ +# Server +spring.main.banner-mode=off + +# Logger settings +# Available levels are: TRACE, DEBUG, INFO, WARN, ERROR, FATAL, OFF +logging.level.com.example.demo=DEBUG + +# JPA Settings +spring.datasource.url=jdbc:h2:mem:testdb +spring.datasource.username=sa +spring.datasource.password=password +spring.datasource.driver-class-name=org.h2.Driver +spring.jpa.hibernate.ddl-auto=create +spring.jpa.open-in-view=false \ No newline at end of file