Actions
Defect #2108
closedUnchecking "Main definition" check box in Form definition causes IdM doesn't start
Start date:
03/09/2020
Due date:
% Done:
100%
Estimated time:
Affected versions:
Owner:
Description
It is possible to uncheck "Main definition" check box in Form definition causing IdM doesn't start.
An exception is thrown during app initialization. Detected for IdmRole entity, but some other entities may be affected too.
The source of the exception is probably:
/idm-core-impl/src/main/java/eu/bcvsolutions/idm/InitApplicationData.java - lines 122-132, where intializations of particular default entities are invoked.
Detected in version 10.1
org.springframework.dao.DataIntegrityViolationException: could not execute statement; SQL [n/a]; constraint [null]; nested exception is org.hibernate.exception.ConstraintViolationException: could not execute statement
at org.springframework.orm.jpa.vendor.HibernateJpaDialect.convertHibernateAccessException(HibernateJpaDialect.java:296)
at org.springframework.orm.jpa.vendor.HibernateJpaDialect.translateExceptionIfPossible(HibernateJpaDialect.java:253)
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.translateExceptionIfPossible(AbstractEntityManagerFactoryBean.java:527)
at org.springframework.dao.support.ChainedPersistenceExceptionTranslator.translateExceptionIfPossible(ChainedPersistenceExceptionTranslator.java:61)
at org.springframework.dao.support.DataAccessUtils.translateIfNecessary(DataAccessUtils.java:242)
at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:153)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.data.jpa.repository.support.CrudMethodMetadataPostProcessor$CrudMethodMetadataPopulatingMethodInterceptor.invoke(CrudMethodMetadataPostProcessor.java:144)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.data.jpa.repository.support.CrudMethodMetadataPostProcessor$ExposeRepositoryInvocationInterceptor.invoke(CrudMethodMetadataPostProcessor.java:364)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:93)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.data.repository.core.support.SurroundingTransactionDetectorMethodInterceptor.invoke(SurroundingTransactionDetectorMethodInterceptor.java:61)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)
at com.sun.proxy.$Proxy209.saveAndFlush(Unknown Source)
at eu.bcvsolutions.idm.core.api.service.AbstractReadWriteDtoService.saveInternal(AbstractReadWriteDtoService.java:98)
at eu.bcvsolutions.idm.core.eav.service.impl.DefaultIdmFormDefinitionService.saveInternal(DefaultIdmFormDefinitionService.java:103)
at eu.bcvsolutions.idm.core.eav.service.impl.DefaultIdmFormDefinitionService.saveInternal(DefaultIdmFormDefinitionService.java:1)
at eu.bcvsolutions.idm.core.eav.service.impl.DefaultIdmFormDefinitionService$$FastClassBySpringCGLIB$$59971ef4.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:749)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:295)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:98)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:688)
at eu.bcvsolutions.idm.core.eav.service.impl.DefaultIdmFormDefinitionService$$EnhancerBySpringCGLIB$$5afcdf33.saveInternal(<generated>)
at eu.bcvsolutions.idm.core.eav.processor.FormDefinitionSaveProcessor.process(FormDefinitionSaveProcessor.java:44)
at eu.bcvsolutions.idm.core.api.event.AbstractEntityEventProcessor.onApplicationEvent(AbstractEntityEventProcessor.java:238)
at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:402)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:372)
at eu.bcvsolutions.idm.core.model.service.impl.DefaultEntityEventManager.process(DefaultEntityEventManager.java:228)
at eu.bcvsolutions.idm.core.model.service.impl.DefaultEntityEventManager$$FastClassBySpringCGLIB$$1694e58f.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:749)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:295)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:98)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:688)
at eu.bcvsolutions.idm.core.model.service.impl.DefaultEntityEventManager$$EnhancerBySpringCGLIB$$42edabe4.process(<generated>)
at eu.bcvsolutions.idm.core.api.service.AbstractEventableDtoService.publish(AbstractEventableDtoService.java:62)
at eu.bcvsolutions.idm.core.api.service.AbstractEventableDtoService.publish(AbstractEventableDtoService.java:51)
at eu.bcvsolutions.idm.core.api.service.AbstractEventableDtoService.save(AbstractEventableDtoService.java:77)
at eu.bcvsolutions.idm.core.api.service.AbstractEventableDtoService$$FastClassBySpringCGLIB$$28b457d3.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:749)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:295)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:98)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:688)
at eu.bcvsolutions.idm.core.eav.service.impl.DefaultIdmFormDefinitionService$$EnhancerBySpringCGLIB$$5afcdf33.save(<generated>)
at eu.bcvsolutions.idm.core.eav.service.impl.DefaultFormService.createDefinition(DefaultFormService.java:311)
at eu.bcvsolutions.idm.core.eav.service.impl.DefaultFormService.createDefinition(DefaultFormService.java:348)
at eu.bcvsolutions.idm.core.eav.service.impl.DefaultFormService.createDefinition(DefaultFormService.java:336)
at eu.bcvsolutions.idm.core.eav.service.impl.DefaultFormService$$FastClassBySpringCGLIB$$f7e12749.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:749)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:295)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:98)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:688)
at eu.bcvsolutions.idm.core.eav.service.impl.DefaultFormService$$EnhancerBySpringCGLIB$$d3045552.createDefinition(<generated>)
at eu.bcvsolutions.idm.InitApplicationData.init(InitApplicationData.java:126)
at eu.bcvsolutions.idm.InitApplicationData.onApplicationEvent(InitApplicationData.java:105)
at eu.bcvsolutions.idm.InitApplicationData.onApplicationEvent(InitApplicationData.java:1)
Files
Related issues
Actions