Текущие версии:< /p>
- Maven: 3.9.4
- Java: 21.0.3
- H2 : 2.3.232
- maven-compiler-plugin: 3.11.0
Код: Выделить всё
spring.datasource.url=jdbc:h2:mem:some
spring.datasource.driverClassName=org.h2.Driver
spring.datasource.username=sa
spring.datasource.password=password
spring.datasource.generate-unique-name=false
spring.datasource.name=some-db
spring.jpa.defer-datasource-initialization=true
spring.jpa.hibernate.ddl-auto=create
Код: Выделить всё
org.springframework.boot
spring-boot-starter-data-jpa
3.3.4
com.h2database
h2
runtime
2.3.232
Невозможно сделать приватным последний байт поля java.lang.String.coder
доступным : модуль java.base не «открывает java.lang» для безымянного
модуля
Полная ошибка:
Код: Выделить всё
2024-09-30 14:16:31 ERROR - Failed to initialize JPA EntityManagerFactory: [PersistenceUnit: default] Unable to build Hibernate SessionFactory; nested exception is java.lang.IllegalStateException: PostInitCallback queue could not be processed...
- PostInitCallbackEntry - EmbeddableMappingType(com.xxx.ExecutedCommand.commandParameters.parameters#{element})#finishInitialization
- PostInitCallbackEntry - EmbeddableMappingType(com.xxx.ExecutedCommand.response.data#{element})#finishInitialization
2024-09-30 14:16:31 WARN - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: [PersistenceUnit: default] Unable to build Hibernate SessionFactory; nested exception is java.lang.IllegalStateException: PostInitCallback queue could not be processed...
- PostInitCallbackEntry - EmbeddableMappingType(com.xxx.ExecutedCommand.commandParameters.parameters#{element})#finishInitialization
- PostInitCallbackEntry - EmbeddableMappingType(com.xxx.ExecutedCommand.response.data#{element})#finishInitialization
2024-09-30 14:16:31 INFO - some-db - Shutdown initiated...
2024-09-30 14:16:31 INFO - some-db - Shutdown completed.
Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled.
2024-09-30 14:16:31 ERROR- Application run failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: [PersistenceUnit: default] Unable to build Hibernate SessionFactory; nested exception is java.lang.IllegalStateException: PostInitCallback queue could not be processed...
- PostInitCallbackEntry - EmbeddableMappingType(com.xxx.ExecutedCommand.commandParameters.parameters#{element})#finishInitialization
- PostInitCallbackEntry - EmbeddableMappingType(com.xxx.ExecutedCommand.response.data#{element})#finishInitialization
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1806) ~[spring-beans-6.1.13.jar:6.1.13]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:600) ~[spring-beans-6.1.13.jar:6.1.13]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:522) ~[spring-beans-6.1.13.jar:6.1.13]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:337) ~[spring-beans-6.1.13.jar:6.1.13]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-6.1.13.jar:6.1.13]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:335) ~[spring-beans-6.1.13.jar:6.1.13]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:205) ~[spring-beans-6.1.13.jar:6.1.13]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:954) ~[spring-context-6.1.13.jar:6.1.13]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:625) ~[spring-context-6.1.13.jar:6.1.13]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146) ~[spring-boot-3.3.3.jar:3.3.3]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754) [spring-boot-3.3.3.jar:3.3.3]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:456) [spring-boot-3.3.3.jar:3.3.3]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:335) [spring-boot-3.3.3.jar:3.3.3]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1363) [spring-boot-3.3.3.jar:3.3.3]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1352) [spring-boot-3.3.3.jar:3.3.3]
at com.xxx.Application.main(Application.java:14) [classes/:?]
Caused by: jakarta.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory; nested exception is java.lang.IllegalStateException: PostInitCallback queue could not be processed...
- PostInitCallbackEntry - EmbeddableMappingType(com.xxx.ExecutedCommand.commandParameters.parameters#{element})#finishInitialization
- PostInitCallbackEntry - EmbeddableMappingType(com.xxx.ExecutedCommand.response.data#{element})#finishInitialization
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:421) ~[spring-orm-6.1.13.jar:6.1.13]
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:396) ~[spring-orm-6.1.13.jar:6.1.13]
at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.afterPropertiesSet(LocalContainerEntityManagerFactoryBean.java:366) ~[spring-orm-6.1.13.jar:6.1.13]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1853) ~[spring-beans-6.1.13.jar:6.1.13]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1802) ~[spring-beans-6.1.13.jar:6.1.13]
Suppressed: java.lang.reflect.InaccessibleObjectException: Unable to make field private final byte java.lang.String.coder accessible: module java.base does not "opens java.lang" to unnamed module @3c72f59f
- https://github.com/gantsign/ktlint- maven-plugin/issues/392#issuecomment-1114657552
- https://github.com/gantsign/ktlint-mave ... 1141975388
- https://stackoverflow.com/a/75878055/22034674
Есть предложения по устранению этой ошибки?
Подробнее здесь: https://stackoverflow.com/questions/790 ... accessible