ERROR 12-28 10:32:42.382 o.a.w.DefaultExceptionMapper:170 [io-5443-exec-10] - Unexpected error occurred
org.springframework.dao.InvalidDataAccessApiUsageException: Encountered unmanaged object "org.apache.openmeetings.db.entity.user.User@12b47276" in life cycle state unmanaged while cascading persistence via field "org.apache.openmeetings.db.entity.calendar.OmCalendar.owner" during flush. However, this field does not allow cascade persist. You cannot flush unmanaged objects or graphs that have persistent associations to unmanaged objects.
Suggested actions: a) Set the cascade attribute for this field to CascadeType.PERSIST or CascadeType.ALL (JPA annotations) or "persist" or "all" (JPA orm.xml),
b) enable cascade-persist globally,
c) manually persist the related field value prior to flushing.
d) if the reference belongs to another context, allow reference to it by setting StoreContext.setAllowReferenceToSiblingContext().; nested exception is <openjpa-3.1.2-r66d2a72 nonfatal user error> org.apache.openjpa.persistence.InvalidStateException: Encountered unmanaged object "org.apache.openmeetings.db.entity.user.User@12b47276" in life cycle state unmanaged while cascading persistence via field "org.apache.openmeetings.db.entity.calendar.OmCalendar.owner" during flush. However, this field does not allow cascade persist. You cannot flush unmanaged objects or graphs that have persistent associations to unmanaged objects.
Suggested actions: a) Set the cascade attribute for this field to CascadeType.PERSIST or CascadeType.ALL (JPA annotations) or "persist" or "all" (JPA orm.xml),
b) enable cascade-persist globally,
c) manually persist the related field value prior to flushing.
d) if the reference belongs to another context, allow reference to it by setting StoreContext.setAllowReferenceToSiblingContext().
FailedObject: org.apache.openmeetings.db.entity.user.User@12b47276
at org.springframework.orm.jpa.EntityManagerFactoryUtils.convertJpaAccessExceptionIfPossible(EntityManagerFactoryUtils.java:371)
at org.springframework.orm.jpa.DefaultJpaDialect.translateExceptionIfPossible(DefaultJpaDialect.java:128)
at org.springframework.dao.support.DataAccessUtils.translateIfNecessary(DataAccessUtils.java:242)
at org.springframework.orm.jpa.JpaTransactionManager.doCommit(JpaTransactionManager.java:575)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:743)