Project

General

Profile

Actions

bug #7386

closed

TaxonNamePopEditor: com.vaadin.data.Property$ReadOnlyException on saving a basionym

Added by Andreas Kohlbecker over 4 years ago. Updated over 1 year ago.

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

100%

Estimated time:
Severity:
normal
Found in Version:
Tags:

Description

Eingabe Basionym (für Alpha gggg), Fehler nach eingabe der Basionymreferenz mit Basionymauthorteam auf der Screenshot-Seite:
http://test.e-taxonomy.eu/cdmserver/phycobank/app/registration#!workingset/f0500a66-49a6-46a3-95e2-eca92f9c625d

Caused by: java.lang.reflect.InvocationTargetException
               at sun.reflect.GeneratedMethodAccessor2135.invoke(Unknown Source)
               at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
               at java.lang.reflect.Method.invoke(Method.java:498)
               at com.vaadin.server.ServerRpcManager.applyInvocation(ServerRpcManager.java:158)
               ... 66 more
Caused by: com.vaadin.event.ListenerMethod$MethodException: Invocation of method buttonClick in eu.etaxonomy.vaadin.mvp.AbstractPopupEditor$$Lambda$133/1533192852 failed.
               at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:533)
               at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:200)
               at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:163)
               at com.vaadin.server.AbstractClientConnector.fireEvent(AbstractClientConnector.java:1015)
               at com.vaadin.ui.Button.fireClick(Button.java:377)
               at com.vaadin.ui.Button$1.click(Button.java:54)
               ... 70 more
Caused by: java.lang.RuntimeException: Error saving
               at eu.etaxonomy.vaadin.mvp.AbstractPopupEditor.save(AbstractPopupEditor.java:318)
               at eu.etaxonomy.vaadin.mvp.AbstractPopupEditor.lambda$new$fad408e6$1(AbstractPopupEditor.java:132)
               at sun.reflect.GeneratedMethodAccessor2136.invoke(Unknown Source)
               at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
               at java.lang.reflect.Method.invoke(Method.java:498)
               at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:510)
               ... 75 more
Caused by: com.vaadin.data.fieldgroup.FieldGroup$CommitException: Commit failed
               at com.vaadin.data.fieldgroup.FieldGroup.commit(FieldGroup.java:509)
               at eu.etaxonomy.vaadin.mvp.AbstractPopupEditor.save(AbstractPopupEditor.java:305)
               ... 80 more
Caused by: com.vaadin.data.fieldgroup.FieldGroup$CommitException: Failed to store data to backend
               at eu.etaxonomy.vaadin.mvp.AbstractPopupEditor$SaveHandler.postCommit(AbstractPopupEditor.java:273)
               at com.vaadin.data.fieldgroup.FieldGroup.firePostCommitEvent(FieldGroup.java:625)
               at com.vaadin.data.fieldgroup.FieldGroup.commit(FieldGroup.java:501)
               ... 81 more
Caused by: com.vaadin.data.Property$ReadOnlyException
               at com.vaadin.ui.AbstractField.setValue(AbstractField.java:493)
               at com.vaadin.ui.AbstractField.setValue(AbstractField.java:468)
               at com.vaadin.ui.AbstractField.setValue(AbstractField.java:453)
               at org.vaadin.viritin.fields.TypedSelect.setValue(TypedSelect.java:503)
               at eu.etaxonomy.cdm.vaadin.view.name.TaxonNameEditorPresenter.onEntityChangeEvent(TaxonNameEditorPresenter.java:352)
               at sun.reflect.GeneratedMethodAccessor2252.invoke(Unknown Source)
               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.publish(ScopedEventBus.java:116)
               at org.vaadin.spring.events.internal.ScopedEventBus.publish(ScopedEventBus.java:109)
               at eu.etaxonomy.vaadin.mvp.AbstractCdmEditorPresenter.onEditorSaveEvent(AbstractCdmEditorPresenter.java:163)
               at sun.reflect.GeneratedMethodAccessor2175.invoke(Unknown Source)
               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.publish(ScopedEventBus.java:116)
               at org.vaadin.spring.events.internal.ScopedEventBus.publish(ScopedEventBus.java:109)
               at eu.etaxonomy.vaadin.mvp.AbstractPopupEditor$SaveHandler.postCommit(AbstractPopupEditor.java:265)
               ... 83 more

Alpha gggg und Alpha hhhh wurden dann gar nicht gespeichert.

Bei Basionym geht die Auswahl nicht.

Auch ein Basionym mit ausgewählter Reference wird nicht angenommen.


Files

picture361-1.png (35.1 KB) picture361-1.png Andreas Kohlbecker, 04/27/2018 03:25 PM
cretated-basionym.png (26.1 KB) cretated-basionym.png Andreas Kohlbecker, 04/27/2018 04:12 PM
new_reference.png (37.7 KB) new_reference.png Andreas Kohlbecker, 04/27/2018 04:12 PM
add-new-basionym.png (25.9 KB) add-new-basionym.png Andreas Kohlbecker, 04/27/2018 04:12 PM
open-name.png (31.8 KB) open-name.png Andreas Kohlbecker, 04/27/2018 04:12 PM

Related issues

Related to EDIT - bug #7387: TaxonNamePopEditor: ConstraintViolationException on saving a basionymClosedWolf-Henning Kusber

Actions
Related to EDIT - bug #7389: NameTypeDesignationEditor typifiedNamesComboboxSelect always is readonlyNewAndreas Kohlbecker

Actions
Related to EDIT - bug #7557: TaxonNamePopEditor: com.vaadin.data.Property$ReadOnlyException on saving a sub popup editorClosedAndreas Kohlbecker

Actions
Has duplicate EDIT - bug #6707: transient properties managed by ToManyRelatedEntitiesListSelect are not updated on saveDuplicateAndreas Kohlbecker

Actions
Actions #1

Updated by Andreas Kohlbecker over 4 years ago

Ich kann das leider nicht reproduzieren

Actions #2

Updated by Andreas Kohlbecker over 4 years ago

Sollte dieser Fehler bis Juni 2018 nicht wieder auftauchen ist er eventuell schon beseitigt worden und wir sollten das Ticket schließen.

Actions #3

Updated by Andreas Kohlbecker over 4 years ago

I could reproduce this issue while trying to reproduce the issue #7387.

The Steps I took where:

  1. Open existing name which has no basionym

  1. enable basionym section and click new button to open second TaxonNameEditor to create the basionym

  1. Create a new reference for the basionym

  1. Save the reference, this closes the reference editor and reveals the editor for the basionym:

  1. Save the basionym.

TaxonNameEditor basionym ToManyRelatedEntitiesComboboxSelect is readonly and the LazySelect childcomponent of the ToManyRelatedEntitiesComboboxSelect is also readonly, This causes the below code snipped to fail:


getCache().load(event.getEntity());
if(event.isCreatedType()){
    basionymSourceField.setValue((TaxonName) event.getEntity()); // ##### com.vaadin.data.Property$ReadOnlyException
} else {
    ((ReloadableSelect)basionymSourceField).reload();
}
Caused by: com.vaadin.data.Property$ReadOnlyException
    at com.vaadin.ui.AbstractField.setValue(AbstractField.java:493)
    at com.vaadin.ui.AbstractField.setValue(AbstractField.java:468)
    at com.vaadin.ui.AbstractField.setValue(AbstractField.java:453)
    at org.vaadin.viritin.fields.TypedSelect.setValue(TypedSelect.java:503)
    at eu.etaxonomy.cdm.vaadin.view.name.TaxonNameEditorPresenter.onEntityChangeEvent(TaxonNameEditorPresenter.java:355)
    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.publish(ScopedEventBus.java:116)
    at org.vaadin.spring.events.internal.ScopedEventBus.publish(ScopedEventBus.java:109)
    at eu.etaxonomy.vaadin.mvp.CdmEditorPresenterBase.onEditorSaveEvent(CdmEditorPresenterBase.java:205)
    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.publish(ScopedEventBus.java:116)
    at org.vaadin.spring.events.internal.ScopedEventBus.publish(ScopedEventBus.java:109)
    at eu.etaxonomy.vaadin.mvp.AbstractPopupEditor$SaveHandler.postCommit(AbstractPopupEditor.java:339)
    ... 89 more
Actions #4

Updated by Andreas Kohlbecker over 4 years ago

The problem is caused by the TaxonNameDTO having the getter getBasionyms() but not having the according set method. The vaadin fieldFieldGroup.configureField(Field<?> field) method thus sets the field to readonly. So any attempt to set the value will cause a readonly exception.

There are two options now:

  1. set the field to readonly == false before doing the setValue()
  2. add the missing setter method to the TaxonNameDTO
Actions #5

Updated by Andreas Kohlbecker over 4 years ago

  • Related to bug #7387: TaxonNamePopEditor: ConstraintViolationException on saving a basionym added
Actions #6

Updated by Andreas Kohlbecker over 4 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 50
Actions #7

Updated by Andreas Kohlbecker over 4 years ago

  • Related to bug #7389: NameTypeDesignationEditor typifiedNamesComboboxSelect always is readonly added
Actions #8

Updated by Andreas Kohlbecker over 4 years ago

  • Assignee changed from Andreas Kohlbecker to Wolf-Henning Kusber

I no longer can reproduce this issue. Henning, can you? Please review.

Actions #9

Updated by Andreas Kohlbecker over 4 years ago

  • Has duplicate bug #6707: transient properties managed by ToManyRelatedEntitiesListSelect are not updated on save added
Actions #10

Updated by Andreas Kohlbecker over 4 years ago

Henning wrote:

http://test.e-taxonomy.eu/cdmserver/phycobank/app/registration#!workingset/bd075280-f7ff-401b-8353-6621c41354f9

Als curator einen Namen mit Referenz eingegeben (Synedra paludosa)
Als submitter1 eine neue Referenz mit neuem Namen eingegeben (Fragilaria paludosa),
als Basionym Synedra paludosa ausgewählt, Speichern führt zum Fehler:

Caused by: com.vaadin.event.ListenerMethod$MethodException: Invocation of method valueChange in eu.etaxonomy.cdm.vaadin.view.name.TaxonNamePopupEditor$$Lambda$125/34314791 failed.
               at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:533)
               at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:200)
               at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:163)
               at com.vaadin.server.AbstractClientConnector.fireEvent(AbstractClientConnector.java:1015)
               at com.vaadin.ui.AbstractField.fireValueChange(AbstractField.java:1161)
               at eu.etaxonomy.vaadin.component.ToManyRelatedEntitiesListSelect.lambda$addNewRow$558de902$1(ToManyRelatedEntitiesListSelect.java:310)
               at sun.reflect.GeneratedMethodAccessor2148.invoke(Unknown Source)
               at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
               at java.lang.reflect.Method.invoke(Method.java:498)
               at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:510)
               ... 88 more
Caused by: org.hibernate.LazyInitializationException: could not initialize proxy - no Session
               at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:148)
               at org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:266)
               at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:68)
               at eu.etaxonomy.cdm.model.reference.Reference_$$_jvst7d8_25.getAuthorship(Reference_$$_jvst7d8_25.java)
               at eu.etaxonomy.cdm.vaadin.view.name.TaxonNamePopupEditor.inferBasiomynAuthors(TaxonNamePopupEditor.java:359)
               at eu.etaxonomy.cdm.vaadin.view.name.TaxonNamePopupEditor.updateAuthorshipFields(TaxonNamePopupEditor.java:442)
               at eu.etaxonomy.cdm.vaadin.view.name.TaxonNamePopupEditor.lambda$updateAuthorshipFieldData$c3f3f4e5$1(TaxonNamePopupEditor.java:513)
               at sun.reflect.GeneratedMethodAccessor2148.invoke(Unknown Source)
               at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
               at java.lang.reflect.Method.invoke(Method.java:498)
               at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:510)
               ... 97 more

VG
Henning

Actions #11

Updated by Andreas Kohlbecker over 4 years ago

I tried once again to reproduce this without success. Can you still reproduce the error?

Actions #12

Updated by Andreas Kohlbecker about 4 years ago

  • Related to bug #7557: TaxonNamePopEditor: com.vaadin.data.Property$ReadOnlyException on saving a sub popup editor added
Actions #13

Updated by Wolf-Henning Kusber over 1 year ago

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

can be set to closed

Actions #14

Updated by Andreas Kohlbecker over 1 year ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF