Project

General

Profile

bug #8462

NoSuchElementException accessing Optional<RegistrationDTO> in RegistrationWorkingsetPresenter.findRegistrationInContext()

Added by Andreas Kohlbecker 3 months ago. Updated 2 months ago.

Status:
Closed
Priority:
Highest
Category:
cdm-vaadin
Target version:
Start date:
08/13/2019
Due date:
% Done:

100%

Severity:
normal
Found in Version:
Tags:

Description

Reported by Henning on 04.08.19 19:17

Fehler in PhycoBank, 102010, Treptacantha ballesterosii

Beim Species-Namen-Eingeben ist die Gattung nicht vorhanden – kann ja passieren.

Eingabe „Neu“ der Gattung (von der Art aus, ID: 102010 mit (alter Referenz, vielleicht ohne Referez-Typ, oder ein alter Cache-Schnipsel?), beim Speichern Fehler:

Die Referenz muss noch aus IPNI-Zeiten kommen: „Kütz. Phyc. Gen. 1843” oder so ähnlich.
Bei der Suche nach Publikationen konnte ich diese Referenz nicht finden, dafür die korrekte:
„Kützing, F.T., Phycologia generalis oder Anatomie, Physiologie und Systemkunde der Tange. 1843“
Die hat aber keinen Eintrag.
Die Gattung ist jetzt in System, aber über die Liste nicht auffindbar

...

Caused by: java.util.NoSuchElementException: No value present
               at java.util.Optional.get(Optional.java:135)
               at eu.etaxonomy.cdm.vaadin.view.registration.RegistrationWorkingsetPresenter.findRegistrationInContext(RegistrationWorkingsetPresenter.java:824)
               at eu.etaxonomy.cdm.vaadin.view.registration.RegistrationWorkingsetPresenter.findRegistrationInContext(RegistrationWorkingsetPresenter.java:808)
               at eu.etaxonomy.cdm.vaadin.view.registration.RegistrationWorkingsetPresenter.onDoneWithTaxonnameEditor(RegistrationWorkingsetPresenter.java:479)
               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.vaadin.spring.events.internal.MethodListenerWrapper.publish(MethodListenerWrapper.java:78)
               at org.vaadin.spring.events.internal.ListenerCollection.publish(ListenerCollection.java:167)
               at org.vaadin.spring.events.internal.ScopedEventBus$1.onEvent(ScopedEventBus.java:58)
               at org.vaadin.spring.events.internal.EventBusListenerWrapper.publish(EventBusListenerWrapper.java:55)
               at org.vaadin.spring.events.internal.ListenerCollection.publish(ListenerCollection.java:167)
               at org.vaadin.spring.events.internal.ScopedEventBus.publish(ScopedEventBus.java:116)
               at org.vaadin.spring.events.internal.ScopedEventBus.publish(ScopedEventBus.java:131)
               at org.vaadin.spring.events.internal.ScopedEventBus.publish(ScopedEventBus.java:133)
               at org.vaadin.spring.events.internal.ScopedEventBus.publish(ScopedEventBus.java:121)
               at eu.etaxonomy.vaadin.mvp.AbstractPopupEditor$SaveHandler.postCommit(AbstractPopupEditor.java:380)
               ... 83 more

Related issues

Related to Edit - task #7843: blocking registrations can get lost when first TaxonNamePopupEditor with new name is not saved New 10/23/2018
Duplicated by Edit - bug #8374: Save genus generated for a species with a different reference Duplicate 07/16/2019

Associated revisions

Revision c80e35c1 (diff)
Added by Andreas Kohlbecker 2 months ago

fix #8462 fuffering new blocking registrations for later association with main registration

History

#1 Updated by Andreas Kohlbecker 3 months ago

  • Description updated (diff)

#2 Updated by Andreas Kohlbecker 3 months ago

the same issue was reported once again:

Test New name entered (not saved) new Basionym, new reference or selected reference -> error
Both names are saved.

#3 Updated by Andreas Kohlbecker 3 months ago

this seems to happen, when the first name editor has been opened for a new name to be registered and has not jet been saved.

#4 Updated by Andreas Kohlbecker 3 months ago

  • Related to task #7843: blocking registrations can get lost when first TaxonNamePopupEditor with new name is not saved added

#5 Updated by Andreas Kohlbecker 3 months ago

  • Related to task #7332: Registration Workingset Editor: better UI behavior with blocking Registation in same workingset added

#6 Updated by Andreas Kohlbecker 3 months ago

  • Related to deleted (task #7332: Registration Workingset Editor: better UI behavior with blocking Registation in same workingset)

#7 Updated by Andreas Kohlbecker 3 months ago

The solution to this problems is tightly related to #7843.

Since I am assuming that we will decide for strategy 3. in #7843 I will for now solve this problem here by creating blocking registrations in preparation for the event when the first name editor is being saved.

#8 Updated by Andreas Kohlbecker 2 months ago

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

#9 Updated by Andreas Kohlbecker 2 months ago

  • Assignee changed from Andreas Kohlbecker to Wolf-Henning Kusber

please review

#10 Updated by Wolf-Henning Kusber 2 months ago

  • Assignee changed from Wolf-Henning Kusber to Andreas Kohlbecker

#11 Updated by Andreas Kohlbecker 2 months ago

... once the server is updated ;-)

#12 Updated by Andreas Kohlbecker 2 months ago

  • Duplicated by bug #8374: Save genus generated for a species with a different reference added

#13 Updated by Wolf-Henning Kusber 2 months ago

Tested: new genus with new reference: no problems
Tested: new basionym or replaced synonym with new reference: no problem
Texted: new name with replaced synonym with new reference AND replaced synonym as validation with new reference: no problem

Did I get all possibilities?

#14 Updated by Andreas Kohlbecker 2 months ago

  • Status changed from Resolved to Feedback
  • Assignee changed from Andreas Kohlbecker to Wolf-Henning Kusber

the orthographic variant could also be tested, but I think your tests have sufficient coverage if you have started a new registration for a new name for each of the tests.

#15 Updated by Wolf-Henning Kusber 2 months ago

  • Status changed from Feedback to Resolved
  • Assignee changed from Wolf-Henning Kusber to Andreas Kohlbecker
  • % Done changed from 50 to 100

New species name with new genus with new replaced synonym with new orthographic variant successfully tested. I think we can close the ticket.

#16 Updated by Andreas Kohlbecker 2 months ago

  • Status changed from Resolved to Closed

agreed.

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 40 MB)