bug #7386
TaxonNamePopEditor: com.vaadin.data.Property$ReadOnlyException on saving a basionym
100%
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.
Related issues
Associated revisions
ref #7386 reducing redundancy in name relationship handling methods, adding methods for general use
fix #7386 adding missing setBasionyms() method to taxonNameDTO
ref #7386 adding missing setBasionyms() method to taxonNameDTO - 2
ref #7386 adding missing setBasionyms() method to taxonNameDTO - 3
ref #7386 removing obsolete handleTransientProperties() method
ref #7386 fixing NPE
History
#1 Updated by Andreas Kohlbecker over 2 years ago
Ich kann das leider nicht reproduzieren
#2 Updated by Andreas Kohlbecker over 2 years ago
Sollte dieser Fehler bis Juni 2018 nicht wieder auftauchen ist er eventuell schon beseitigt worden und wir sollten das Ticket schließen.
#3 Updated by Andreas Kohlbecker over 2 years ago
- File cretated-basionym.png View added
- File new_reference.png View added
- File add-new-basionym.png View added
- File open-name.png View added
- Subject changed from TaxonNamePopEditor: Error on saving a basionym to TaxonNamePopEditor: com.vaadin.data.Property$ReadOnlyException on saving a basionym
I could reproduce this issue while trying to reproduce the issue #7387.
The Steps I took where:
- Open existing name which has no basionym
- enable basionym section and click new button to open second TaxonNameEditor to create the basionym
- Create a new reference for the basionym
- Save the reference, this closes the reference editor and reveals the editor for the basionym:
- 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
#4 Updated by Andreas Kohlbecker over 2 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:
- set the field to readonly == false before doing the setValue()
- add the missing setter method to the TaxonNameDTO
#5 Updated by Andreas Kohlbecker over 2 years ago
- Related to bug #7387: TaxonNamePopEditor: ConstraintViolationException on saving a basionym added
#6 Updated by Andreas Kohlbecker over 2 years ago
- Status changed from New to Resolved
- % Done changed from 0 to 50
Applied in changeset cdm-vaadin|d914aab45e43cd7c0d24f3bf94f609edefd9cae9.
#7 Updated by Andreas Kohlbecker over 2 years ago
- Related to bug #7389: NameTypeDesignationEditor typifiedNamesComboboxSelect always is readonly added
#8 Updated by Andreas Kohlbecker over 2 years ago
- Assignee changed from Andreas Kohlbecker to Wolf-Henning Kusber
I no longer can reproduce this issue. Henning, can you? Please review.
#9 Updated by Andreas Kohlbecker over 2 years ago
- Duplicated by bug #6707: transient properties managed by ToManyRelatedEntitiesListSelect are not updated on save added
#10 Updated by Andreas Kohlbecker over 2 years ago
Henning wrote:
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
#11 Updated by Andreas Kohlbecker over 2 years ago
I tried once again to reproduce this without success. Can you still reproduce the error?
#12 Updated by Andreas Kohlbecker over 2 years ago
- Related to bug #7557: TaxonNamePopEditor: com.vaadin.data.Property$ReadOnlyException on saving a sub popup editor added
#13 Updated by Wolf-Henning Kusber 6 days ago
- Assignee changed from Wolf-Henning Kusber to Andreas Kohlbecker
- % Done changed from 50 to 100
can be set to closed
#14 Updated by Andreas Kohlbecker 5 days ago
- Status changed from Resolved to Closed