Project

General

Profile

bug #8736

LazyInitializationException (LIE) during adding Specimens to Matrix Editor

Added by Andreas Kohlbecker 3 months ago. Updated about 1 month ago.

Status:
Closed
Priority:
New
Category:
taxeditor
Target version:
Start date:
11/29/2019
Due date:
% Done:

100%

Severity:
normal
Found in Version:
Tags:

Description

To reproduce:

  • use database: caryophyllales_spp (cactaceae)
  • create new Descriptive Dataset (son specimens so far!)
  • open Select Specimen Dialog
  • Enter "Acanto" in the filter bar
  • Select all Specimens click OK
  • The dialog will be shown asking if you want to create IndividualsAssiociations, click OK --> LIE (see below)

The proplem only occures when creating the IndividualsAssiociations.

client stack trace:

login : 
editor version : 5.12.0.201911220001
server :  ()
schema version : 
os : Linux 5.0.0-36-generic amd64
java : 1.8.0_131
org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: eu.etaxonomy.cdm.model.taxon.Taxon.descriptions, could not initialize proxy - no Session
    at org.hibernate.collection.internal.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:567)
    at org.hibernate.collection.internal.AbstractPersistentCollection.withTemporarySessionIfNeeded(AbstractPersistentCollection.java:205)
    at org.hibernate.collection.internal.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:546)
    at org.hibernate.collection.internal.AbstractPersistentCollection.read(AbstractPersistentCollection.java:133)
    at org.hibernate.collection.internal.PersistentSet.iterator(PersistentSet.java:163)
    at java.util.Spliterators$IteratorSpliterator.estimateSize(Spliterators.java:1821)
    at java.util.Spliterator.getExactSizeIfKnown(Spliterator.java:408)
    at java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:497)
    at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:485)
    at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
    at java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:152)
    at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
    at java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:464)
    at eu.etaxonomy.cdm.api.service.DescriptiveDataSetService.addRowWrapperToDataset(DescriptiveDataSetService.java:237)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
    at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
    at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)
    at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208)
    at com.sun.proxy.$Proxy178.addRowWrapperToDataset(Unknown Source)
    at eu.etaxonomy.cdm.api.service.longrunningService.LongRunningTasksService$3.doRun(LongRunningTasksService.java:115)
    at eu.etaxonomy.cdm.common.monitor.RemotingProgressMonitorThread.run(RemotingProgressMonitorThread.java:42)

server stack trace:

[caryophyllales_spp] 17:04:58,498 INFO [Thread-390][eu.et.cd.co.mo.RemotingProgressMonitorThread] - Exception in RemotingProgressMonitorThread 
org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: eu.etaxonomy.cdm.model.taxon.Taxon.descriptions, could not initialize proxy - no Session
    at org.hibernate.collection.internal.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:567)
    at org.hibernate.collection.internal.AbstractPersistentCollection.withTemporarySessionIfNeeded(AbstractPersistentCollection.java:205)
    at org.hibernate.collection.internal.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:546)
    at org.hibernate.collection.internal.AbstractPersistentCollection.read(AbstractPersistentCollection.java:133)
    at org.hibernate.collection.internal.PersistentSet.iterator(PersistentSet.java:163)
    at java.util.Spliterators$IteratorSpliterator.estimateSize(Spliterators.java:1821)
    at java.util.Spliterator.getExactSizeIfKnown(Spliterator.java:408)
    at java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:497)
    at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:485)
    at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
    at java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:152)
    at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
    at java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:464)
    at eu.etaxonomy.cdm.api.service.DescriptiveDataSetService.addRowWrapperToDataset(DescriptiveDataSetService.java:237)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
    at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
    at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)
    at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208)
    at com.sun.proxy.$Proxy178.addRowWrapperToDataset(Unknown Source)
    at eu.etaxonomy.cdm.api.service.longrunningService.LongRunningTasksService$3.doRun(LongRunningTasksService.java:115)
    at eu.etaxonomy.cdm.common.monitor.RemotingProgressMonitorThread.run(RemotingProgressMonitorThread.java:42)

Related issues

Copied to Edit - bug #8816: NoSuchElementException during adding Specimens to Matrix Editor New 01/20/2020

Associated revisions

Revision 9e899760 (diff)
Added by Patrick Plitzner 2 months ago

fix #8736 Fix LIE when adding specimens to matrix

Revision 034ce108 (diff)
Added by Patrick Plitzner 2 months ago

ref #8736 minor performance improvement when adding specimens to matrix

History

#1 Updated by Andreas Kohlbecker 3 months ago

  • Description updated (diff)

#2 Updated by Andreas Kohlbecker 3 months ago

  • Description updated (diff)

#3 Updated by Andreas Müller 3 months ago

  • Assignee changed from Katja Luther to Patrick Plitzner

#4 Updated by Patrick Plitzner 3 months ago

  • Tags set to additivity

#5 Updated by Patrick Plitzner 2 months ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 50

#6 Updated by Patrick Plitzner 2 months ago

  • Assignee changed from Patrick Plitzner to Andreas Kohlbecker
  • Target version changed from 287 to Release 5.12

#7 Updated by Andreas Kohlbecker about 1 month ago

  • Status changed from Resolved to In Progress
  • Assignee changed from Andreas Kohlbecker to Katja Luther

The LIE is apparently fixed but I received another exception:

Server side:

[caryophyllales_spp] 11:42:48,590 INFO [Thread-24][eu.et.cd.co.mo.RemotingProgressMonitorThread] - Exception in RemotingProgressMonitorThread 
java.util.NoSuchElementException
    at java.util.HashMap$HashIterator.nextNode(HashMap.java:1439)
    at java.util.HashMap$KeyIterator.next(HashMap.java:1461)
    at org.hibernate.collection.internal.AbstractPersistentCollection$IteratorProxy.next(AbstractPersistentCollection.java:829)
    at eu.etaxonomy.cdm.api.service.DescriptiveDataSetService.findTaxonNodeForDescription(DescriptiveDataSetService.java:196)
    at eu.etaxonomy.cdm.api.service.DescriptiveDataSetService.findDefaultDescription(DescriptiveDataSetService.java:171)
    at eu.etaxonomy.cdm.api.service.DescriptiveDataSetService.createSpecimenRowWrapper(DescriptiveDataSetService.java:319)
    at eu.etaxonomy.cdm.api.service.DescriptiveDataSetService.addRowWrapperToDataset(DescriptiveDataSetService.java:263)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
    at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
    at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)
    at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208)
    at com.sun.proxy.$Proxy178.addRowWrapperToDataset(Unknown Source)
    at eu.etaxonomy.cdm.api.service.longrunningService.LongRunningTasksService$3.doRun(LongRunningTasksService.java:116)
    at eu.etaxonomy.cdm.common.monitor.RemotingProgressMonitorThread.run(RemotingProgressMonitorThread.java:42)
[caryophyllales_spp] 11:42:48,598 INFO [Thread-24][eu.et.cd.co.mo.DefaultProgressMonitor] - No task name... Done

Taxeditor:

login : 
editor version : 5.12.0.202001141551
server :  ()
schema version : 
os : Linux 5.0.0-37-generic amd64
java : 1.8.0_131
java.util.NoSuchElementException
    at java.util.HashMap$HashIterator.nextNode(HashMap.java:1439)
    at java.util.HashMap$KeyIterator.next(HashMap.java:1461)
    at org.hibernate.collection.internal.AbstractPersistentCollection$IteratorProxy.next(AbstractPersistentCollection.java:829)
    at eu.etaxonomy.cdm.api.service.DescriptiveDataSetService.findTaxonNodeForDescription(DescriptiveDataSetService.java:196)
    at eu.etaxonomy.cdm.api.service.DescriptiveDataSetService.findDefaultDescription(DescriptiveDataSetService.java:171)
    at eu.etaxonomy.cdm.api.service.DescriptiveDataSetService.createSpecimenRowWrapper(DescriptiveDataSetService.java:319)
    at eu.etaxonomy.cdm.api.service.DescriptiveDataSetService.addRowWrapperToDataset(DescriptiveDataSetService.java:263)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
    at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
    at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)
    at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208)
    at com.sun.proxy.$Proxy178.addRowWrapperToDataset(Unknown Source)
    at eu.etaxonomy.cdm.api.service.longrunningService.LongRunningTasksService$3.doRun(LongRunningTasksService.java:116)
    at eu.etaxonomy.cdm.common.monitor.RemotingProgressMonitorThread.run(RemotingProgressMonitorThread.java:42)

this issue is moved to #8816

#8 Updated by Katja Luther about 1 month ago

  • Target version changed from Release 5.12 to Release 5.13

#9 Updated by Katja Luther about 1 month ago

  • Related to bug #8816: NoSuchElementException during adding Specimens to Matrix Editor added

#10 Updated by Andreas Kohlbecker about 1 month ago

  • Related to deleted (bug #8816: NoSuchElementException during adding Specimens to Matrix Editor)

#11 Updated by Andreas Kohlbecker about 1 month ago

  • Copied to bug #8816: NoSuchElementException during adding Specimens to Matrix Editor added

#12 Updated by Andreas Müller about 1 month ago

  • Status changed from In Progress to Feedback
  • Target version changed from Release 5.13 to Release 5.12

I guess this can be closed in 5.12 as there is a follow up ticket in 5.13?

#13 Updated by Katja Luther about 1 month ago

  • Status changed from Feedback to Closed
  • Assignee changed from Katja Luther to Patrick Plitzner

#14 Updated by Andreas Müller about 1 month ago

  • % Done changed from 50 to 100

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 40 MB)