Project

General

Profile

Actions

bug #8075

closed

multiple cascade all-delete-orphan exceptions related to DefinedTermBase.representations

Added by Andreas Kohlbecker almost 4 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
New
Category:
cdm-vaadin
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
(Total: 0:00 h)
Severity:
normal
Found in Version:
Tags:

Description

In the Registration UI there are a couple of
org.hibernate.HibernateException: A collection with cascade="all-delete-orphan" ...
errors all related to eu.etaxonomy.cdm.model.common.DefinedTermBase.representations:

The according tickets groupes by the commonalities:

FilterablePagingProvider

TaxonNameStringFilterablePagingProvider

All these problems related to the TaxonNameStringFilterablePagingProvider` have most probably been fixed by the changes made in the context of #7559

#7945 "TaxonNamePopupEditor: missing genus causes exception when updating name parts visibility":

org.hibernate.HibernateException: A collection with cascade="all-delete-orphan" was no longer referenced by the owning entity instance: eu.etaxonomy.cdm.model.common.DefinedTermBase.representations
               at org.hibernate.engine.internal.Collections.processDereferencedCollection(Collections.java:99)
...               at org.hibernate.event.internal.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:44)
               at org.hibernate.internal.SessionImpl.autoFlushIfRequired(SessionImpl.java:1251)
...
               at com.sun.proxy.$Proxy611.findTaxonNameParts(Unknown Source)
               at eu.etaxonomy.cdm.service.TaxonNameStringFilterablePagingProvider.size(TaxonNameStringFilterablePagingProvider.java:196)
...               at eu.etaxonomy.vaadin.component.WeaklyRelatedEntityCombobox.setValue(WeaklyRelatedEntityCombobox.java:199)
               at eu.etaxonomy.cdm.vaadin.view.name.TaxonNameEditorPresenter.onFieldReplaceEvent(TaxonNameEditorPresenter.java:379)
...
               at eu.etaxonomy.vaadin.mvp.AbstractPopupEditor.replaceComponent(AbstractPopupEditor.java:928)
               at eu.etaxonomy.cdm.vaadin.view.name.TaxonNamePopupEditor.updateFieldVisibility(TaxonNamePopupEditor.java:730)
               at eu.etaxonomy.cdm.vaadin.view.name.TaxonNamePopupEditor.updateAuthorshipFields(TaxonNamePopupEditor.java:628)
               at eu.etaxonomy.cdm.vaadin.view.name.TaxonNamePopupEditor.afterItemDataSourceSet(TaxonNamePopupEditor.java:556)
               at eu.etaxonomy.vaadin.mvp.AbstractPopupEditor.loadInEditor(AbstractPopupEditor.java:812)

another similar case from the server log without own ticket:

Caused by: org.hibernate.HibernateException: A collection with cascade="all-delete-orphan" was no longer referenced by the owning entity instance: eu.etaxonomy.cdm.model.common.DefinedTermBase.representations
        at org.hibernate.engine.internal.Collections.processDereferencedCollection(Collections.java:99)
...
        at org.hibernate.event.internal.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:44)
...
        at com.sun.proxy.$Proxy611.findTaxonNameParts(Unknown Source)
        at eu.etaxonomy.cdm.service.TaxonNameStringFilterablePagingProvider.size(TaxonNameStringFilterablePagingProvider.java:196)
        at org.vaadin.viritin.fields.LazyComboBox$7.size(LazyComboBox.java:261)

more like this (3 times)

3 times

[phycobank] 2018-12-07 13:50:02,664 ...
Caused by: org.hibernate.HibernateException: A collection with cascade="all-delete-orphan" was no longer referenced by the owning entity instance: eu.etaxonomy.cdm.model.common.DefinedTermBase.representations
        at org.hibernate.engine.internal.Collections.processDereferencedCollection(Collections.java:99)
        at org.hibernate.event.internal.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:44)
...
        at eu.etaxonomy.cdm.api.service.NameServiceImpl.findTaxonNameParts(NameServiceImpl.java:375)
...
        at com.sun.proxy.$Proxy611.findTaxonNameParts(Unknown Source)
        at eu.etaxonomy.cdm.service.TaxonNameStringFilterablePagingProvider.size(TaxonNameStringFilterablePagingProvider.java:196)
...
        at org.vaadin.viritin.LazyList.contains(LazyList.java:284)
        at eu.etaxonomy.vaadin.component.WeaklyRelatedEntityCombobox.setValue(WeaklyRelatedEntityCombobox.java:199)
        at eu.etaxonomy.cdm.vaadin.view.name.TaxonNameEditorPresenter.onFieldReplaceEvent(TaxonNameEditorPresenter.java:379)

another one

Caused by: org.hibernate.HibernateException: A collection with cascade="all-delete-orphan" was no longer referenced by the owning entity instance: eu.etaxonomy.cdm.model.common.DefinedTermBase.representations
        at org.hibernate.engine.internal.Collections.processDereferencedCollection(Collections.java:99)
...
        at org.hibernate.event.internal.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:44)
...
        at eu.etaxonomy.cdm.api.service.NameServiceImpl.findTaxonNameParts(NameServiceImpl.java:375)
...
        at com.sun.proxy.$Proxy611.findTaxonNameParts(Unknown Source)
        at eu.etaxonomy.cdm.service.TaxonNameStringFilterablePagingProvider.size(TaxonNameStringFilterablePagingProvider.java:196)
        at org.vaadin.viritin.fields.LazyComboBox$7.size(LazyComboBox.java:261)
...
        at org.vaadin.viritin.LazyList.contains(LazyList.java:284)
        at eu.etaxonomy.vaadin.component.WeaklyRelatedEntityCombobox.setValue(WeaklyRelatedEntityCombobox.java:199)

CdmFilterablePagingProvider

#7881 "reference selection combobox broken after error in ...":

org.hibernate.HibernateException: A collection with cascade="all-delete-orphan" was no longer referenced by the owning entity instance: eu.etaxonomy.cdm.model.common.DefinedTermBase.representations
        at org.hibernate.engine.internal.Collections.processDereferencedCollection(Collections.java:99)
...
        at org.hibernate.event.internal.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:44)
...
        at eu.etaxonomy.cdm.persistence.dao.hibernate.common.VersionableDaoBase.countByParam(VersionableDaoBase.java:388)
...
        at eu.etaxonomy.cdm.service.CdmFilterablePagingProvider.findEntities(CdmFilterablePagingProvider.java:145)
        at org.vaadin.viritin.fields.LazyComboBox$6.findEntities(LazyComboBox.java:252)
        at org.vaadin.viritin.LazyList.findEntities(LazyList.java:221)
...
        at com.vaadin.server.communication.LegacyUidlWriter.write(LegacyUidlWriter.java:82)
        at com.vaadin.server.communication.UidlWriter.write(UidlWriter.java:143)

CdmBeanItemContainerFactory

#8065 "HibernateException: corrupt session problem breaks SpecimenTypeDesignationworkingsetEditor type designation table":

Caused by: org.hibernate.HibernateException: A collection with cascade="all-delete-orphan" was no longer referenced by the owning entity instance: eu.etaxonomy.cdm.model.common.DefinedTermBase.representations
    at org.hibernate.engine.internal.Collections.processDereferencedCollection(Collections.java:99)
...
    at org.hibernate.event.internal.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:44)
...
    at eu.etaxonomy.cdm.api.service.ServiceBase.load(ServiceBase.java:214)
...
    at com.sun.proxy.$Proxy556.load(Unknown Source)
    at eu.etaxonomy.cdm.vaadin.component.CdmBeanItemContainerFactory.buildTermItemContainer(CdmBeanItemContainerFactory.java:89)
    at eu.etaxonomy.cdm.vaadin.view.name.SpecimenTypeDesignationWorkingsetEditorPresenter$1.create(SpecimenTypeDesignationWorkingsetEditorPresenter.java:206)
    at eu.etaxonomy.cdm.vaadin.view.name.SpecimenTypeDesignationWorkingsetEditorPresenter$1.create(SpecimenTypeDesignationWorkingsetEditorPresenter.java:199)

4 time the same issue from the server logs

Caused by: org.hibernate.HibernateException: A collection with cascade="all-delete-orphan" was no longer referenced by the owning entity instance: eu.etaxonomy.cdm.model.common.DefinedTermBase.representations
        at org.hibernate.engine.internal.Collections.processDereferencedCollection(Collections.java:99)
...
        at org.hibernate.event.internal.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:86)
...
        at eu.etaxonomy.cdm.api.service.ServiceBase.load(ServiceBase.java:214)
...
        at com.sun.proxy.$Proxy558.load(Unknown Source)
        at eu.etaxonomy.cdm.vaadin.component.CdmBeanItemContainerFactory.buildTermItemContainer(CdmBeanItemContainerFactory.java:89)

RegistrationWorkingsetPresenter.saveRegistrationStatusChange(...)

Caused by: org.hibernate.HibernateException: A collection with cascade="all-delete-orphan" was no longer referenced by the owning entity instance: eu.etaxonomy.cdm.model.common.DefinedTermBase.representations
        at org.hibernate.engine.internal.Collections.processDereferencedCollection(Collections.java:99)
        at org.hibernate.engine.internal.Collections.processUnreachableCollection(Collections.java:50)
        at org.hibernate.event.internal.AbstractFlushingEventListener.flushCollections(AbstractFlushingEventListener.java:243)
        at org.hibernate.event.internal.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:86)
        at org.hibernate.event.internal.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:44)
...
        at eu.etaxonomy.cdm.api.service.ServiceBase.load(ServiceBase.java:42)
...
        at com.sun.proxy.$Proxy694.load(Unknown Source)
        at eu.etaxonomy.cdm.vaadin.view.registration.RegistrationWorkingsetPresenter.saveRegistrationStatusChange(RegistrationWorkingsetPresenter.java:364)

The above collection of elated exceptions seems to identify three hotspots where DefinedTermBase.representations loaded in another session are leaked into a second session. In two of the cases the forced flush is completely unnecessary since we only need to read data from the db:

  • CdmBeanItemContainerFactory
  • TaxonNameStringFilterablePagingProvider

The other case of RegistrationWorkingsetPresenter.saveRegistrationStatusChange(...) seems to be different. ... ---> TODO implement RegistrationService.setStatus() method #8163


Subtasks 2 (0 open2 closed)

bug #8160: CdmBeanItemContainerFactory as readonly service beanClosedAndreas Kohlbecker

Actions
bug #8161: *FilterablePagingProvider classes as transactional readonly spring beansRejectedAndreas Kohlbecker

Actions

Related issues

Related to EDIT - bug #7945: TaxonNamePopupEditor: missing genus causes exception when updating name parts visibilityRejectedAndreas Kohlbecker

Actions
Related to EDIT - bug #8065: HibernateException: corrupt session problem breaks SpecimenTypeDesignationworkingsetEditor type designation tableClosedAndreas Kohlbecker

Actions
Related to EDIT - bug #7881: reference selection combobox broken after error in ...ClosedAndreas Kohlbecker

Actions
Related to EDIT - bug #8158: cascade="all-delete-orphan" problem when ....ClosedAndreas Kohlbecker

Actions
Related to EDIT - bug #7559: possibly corrupted hiberante session after previous error on saving editorClosedAndreas Kohlbecker

Actions
Related to EDIT - feature request #8163: RegistrationService.setStatus() method implementedRejectedAndreas Kohlbecker

Actions
Actions #1

Updated by Andreas Kohlbecker almost 4 years ago

  • Description updated (diff)
Actions #2

Updated by Andreas Kohlbecker almost 4 years ago

  • Description updated (diff)
Actions #3

Updated by Andreas Kohlbecker almost 4 years ago

  • Target version changed from Release 5.5 to Release 5.6
Actions #4

Updated by Andreas Kohlbecker almost 4 years ago

  • Related to bug #7945: TaxonNamePopupEditor: missing genus causes exception when updating name parts visibility added
Actions #5

Updated by Andreas Kohlbecker almost 4 years ago

  • Related to bug #8065: HibernateException: corrupt session problem breaks SpecimenTypeDesignationworkingsetEditor type designation table added
Actions #6

Updated by Andreas Kohlbecker almost 4 years ago

  • Related to bug #7881: reference selection combobox broken after error in ... added
Actions #7

Updated by Andreas Kohlbecker almost 4 years ago

  • Related to bug #8158: cascade="all-delete-orphan" problem when .... added
Actions #8

Updated by Andreas Kohlbecker almost 4 years ago

  • Priority changed from New to Highest
Actions #9

Updated by Andreas Kohlbecker almost 4 years ago

  • Description updated (diff)
Actions #10

Updated by Andreas Kohlbecker almost 4 years ago

  • Description updated (diff)
Actions #11

Updated by Andreas Kohlbecker almost 4 years ago

  • Description updated (diff)
Actions #12

Updated by Andreas Kohlbecker almost 4 years ago

  • Description updated (diff)
Actions #13

Updated by Andreas Kohlbecker almost 4 years ago

  • Related to bug #7559: possibly corrupted hiberante session after previous error on saving editor added
Actions #14

Updated by Andreas Kohlbecker almost 4 years ago

  • Description updated (diff)
  • Status changed from New to In Progress
Actions #15

Updated by Andreas Kohlbecker almost 4 years ago

  • Found in Version set to Release 5.4
Actions #16

Updated by Andreas Kohlbecker almost 4 years ago

  • Description updated (diff)
Actions #17

Updated by Andreas Kohlbecker almost 4 years ago

  • Description updated (diff)
Actions #18

Updated by Andreas Kohlbecker almost 4 years ago

Actions #19

Updated by Andreas Kohlbecker almost 4 years ago

potentially fixed through the changes made for #8160, #7106

Actions #20

Updated by Andreas Kohlbecker almost 4 years ago

  • Status changed from In Progress to Resolved
Actions #21

Updated by Andreas Kohlbecker over 3 years ago

  • Status changed from Resolved to Closed

the cascade="all-delete-orphan" problems did not occur again

Actions #22

Updated by Andreas Kohlbecker about 3 years ago

  • Subject changed from multiple cascase all-delete-orphan exceptions related to DefinedTermBase.representations to multiple cascade all-delete-orphan exceptions related to DefinedTermBase.representations
Actions

Also available in: Atom PDF