Добрый день!
Jmix version: 1.5.4
Jmix Studio plugin version: 2.0.4-232
IntelliJ version: IntelliJ IDEA 2023.2.1 (Community Edition)
Основной датастор - PostgreSql
Дополнительный датастор - Oracle
В основном датасторе имеем сущность Branch.resourceRole
→ ассоциация с io.jmix.securitydata.entity.ResourceRoleEntity
Все прекрасно работало, пока не добавил дополнительный датастор. Приложение запускаться перестало. Выдает ошибки:
Спойлер
2023-11-07 19:01:20.262 WARN 21872 — [ main] i.j.d.i.JmixBaseEntityManagerFactoryBean : Cannot find persistence.xml for ‘nfs’ store. Falling back to classpath scan for entity classes.
2023-11-07 19:01:20.264 INFO 21872 — [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-2 - Starting…
2023-11-07 19:01:21.133 INFO 21872 — [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-2 - Start completed.
2023-11-07 19:01:22.256 ERROR 21872 — [ main] i.j.d.impl.JmixEntityManagerFactoryBean : Failed to initialize JPA EntityManagerFactory: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.7.9.6-jmix): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Predeployment of PersistenceUnit [nfs] failed.
Internal Exception: Exception [EclipseLink-7250] (Eclipse Persistence Services - 2.7.9.6-jmix): org.eclipse.persistence.exceptions.ValidationException
Exception Description: [class ru.company.spm.entity.Branch] uses a non-entity [class io.jmix.securitydata.entity.ResourceRoleEntity] as target entity in the relationship attribute [field resourceRole].
2023-11-07 19:01:22.258 WARN 21872 — [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘nfsEntityManagerFactory’ defined in class path resource [ru/company/spm/NfsStoreConfiguration.class]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.7.9.6-jmix): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Predeployment of PersistenceUnit [nfs] failed.
Internal Exception: Exception [EclipseLink-7250] (Eclipse Persistence Services - 2.7.9.6-jmix): org.eclipse.persistence.exceptions.ValidationException
Exception Description: [class ru.company.spm.entity.Branch] uses a non-entity [class io.jmix.securitydata.entity.ResourceRoleEntity] as target entity in the relationship attribute [field resourceRole].
2023-11-07 19:01:22.261 INFO 21872 — [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-2 - Shutdown initiated…
2023-11-07 19:01:22.869 INFO 21872 — [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-2 - Shutdown completed.
2023-11-07 19:01:22.871 INFO 21872 — [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated…
2023-11-07 19:01:22.876 INFO 21872 — [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed.
2023-11-07 19:01:22.883 INFO 21872 — [ main] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
2023-11-07 19:01:22.909 INFO 21872 — [ main] ConditionEvaluationReportLoggingListener :
Error starting ApplicationContext. To display the conditions report re-run your application with ‘debug’ enabled.
2023-11-07 19:01:22.954 ERROR 21872 — [ main] o.s.boot.SpringApplication : Application run failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘nfsEntityManagerFactory’ defined in class path resource [ru/company/spm/NfsStoreConfiguration.class]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.7.9.6-jmix): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Predeployment of PersistenceUnit [nfs] failed.
Internal Exception: Exception [EclipseLink-7250] (Eclipse Persistence Services - 2.7.9.6-jmix): org.eclipse.persistence.exceptions.ValidationException
Exception Description: [class ru.company.spm.entity.Branch] uses a non-entity [class io.jmix.securitydata.entity.ResourceRoleEntity] as target entity in the relationship attribute [field resourceRole].
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1804) ~[spring-beans-5.3.29.jar:5.3.29]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:620) ~[spring-beans-5.3.29.jar:5.3.29]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[spring-beans-5.3.29.jar:5.3.29]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.29.jar:5.3.29]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.29.jar:5.3.29]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.29.jar:5.3.29]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.29.jar:5.3.29]
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1157) ~[spring-context-5.3.29.jar:5.3.29]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:911) ~[spring-context-5.3.29.jar:5.3.29]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583) ~[spring-context-5.3.29.jar:5.3.29]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:147) ~[spring-boot-2.7.15.jar:2.7.15]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:731) ~[spring-boot-2.7.15.jar:2.7.15]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:408) ~[spring-boot-2.7.15.jar:2.7.15]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:307) ~[spring-boot-2.7.15.jar:2.7.15]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1303) ~[spring-boot-2.7.15.jar:2.7.15]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1292) ~[spring-boot-2.7.15.jar:2.7.15]
at ru.company.spm.SpmApplication.main(SpmApplication.java:29) ~[main/:na]
Пробовал на новом проекте воспроизвести ошибку - не получилось. Все запускается.
Подскажите, что можно сделать?