Project

General

Profile

Actions

bug #9690

closed

Exception when editing name supplemental data in taxon bulk editor

Added by Katja Luther over 2 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Highest
Assignee:
Category:
taxeditor
Target version:
Start date:
Due date:
% Done:

90%

Estimated time:
Severity:
normal
Found in Version:

Description

mail WB:

Hallo,
aus dem Taxon Bulk Editor (Taxon? – Ist eigentlich ein Synonym) – Name Suppl. Data – Eingabe WFO-ID gleich nach der Auswahl.
Kann nicht durchgeführt werden.
Herzlichen Gruß
Walter

last remote method : http://api.cybertaxonomy.org:80/caryophyllales_spp/remoting/common.service
last remote request client time : 2021-06-30T13:15:01.67
last remote request response header time : Wed, 30 Jun 2021 11:14:35 GMT
client error time : 2021-06-30T13:15:04.136
login : w.berendsohn
editor version : 5.24.0
server : api.cybertaxonomy.org (cybertaxonomy.org) / caryophyllales_spp
schema version : 5.23.0.0.20210422
os : Windows 10 10.0 amd64
java : 1.8.0_291
java.lang.ClassCastException: eu.etaxonomy.cdm.model.name.TaxonName cannot be cast to eu.etaxonomy.cdm.model.taxon.TaxonBase
                at eu.etaxonomy.taxeditor.bulkeditor.input.TaxonEditorInput.addSaveCandidate(TaxonEditorInput.java:1)
                at eu.etaxonomy.taxeditor.bulkeditor.e4.BulkEditorE4.changed(BulkEditorE4.java:307)
                at eu.etaxonomy.taxeditor.view.e4.AbstractCdmEditorPartE4.changed(AbstractCdmEditorPartE4.java:193)
                at eu.etaxonomy.taxeditor.view.e4.AbstractCdmDataViewerE4.markViewPartDirty(AbstractCdmDataViewerE4.java:110)
                at eu.etaxonomy.taxeditor.view.e4.AbstractCdmDataViewerE4$1.dirtyStateChanged(AbstractCdmDataViewerE4.java:80)
                at org.eclipse.ui.forms.AbstractFormPart.markDirty(AbstractFormPart.java:93)
                at eu.etaxonomy.taxeditor.view.detail.CdmSectionPart.propertyChange(CdmSectionPart.java:203)
                at eu.etaxonomy.taxeditor.ui.element.AbstractFormSection.firePropertyChangeEvent(AbstractFormSection.java:147)
                at eu.etaxonomy.taxeditor.ui.element.AbstractFormSection.firePropertyChangeEvent(AbstractFormSection.java:176)
                at eu.etaxonomy.taxeditor.ui.element.AbstractFormSection.firePropertyChangeEvent(AbstractFormSection.java:162)
                at eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection.internalUpdateSection(AbstractEntityCollectionSection.java:223)
                at eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection$2.run(AbstractEntityCollectionSection.java:107)
                at org.eclipse.jface.action.Action.runWithEvent(Action.java:473)
                at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:565)
                at org.eclipse.jface.action.ActionContributionItem.lambda$5(ActionContributionItem.java:436)
                at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
                at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418)
                at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079)
                at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4236)
                at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3824)
                at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121)
                at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
                at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022)
                at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150)
                at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693)
                at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
                at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610)
                at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
                at eu.etaxonomy.taxeditor.Application.start(Application.java:20)
                at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
                at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
                at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
                at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
                at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                at java.lang.reflect.Method.invoke(Unknown Source)
                at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673)
                at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610)
                at org.eclipse.equinox.launcher.Main.run(Main.java:1519)

Actions #1

Updated by Katja Luther over 2 years ago

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

Updated by Katja Luther over 2 years ago

  • Assignee changed from Katja Luther to Andreas Müller
  • % Done changed from 50 to 0

this should be fixed, please review.

Actions #3

Updated by Andreas Müller over 2 years ago

  • Status changed from Resolved to Feedback
  • Assignee changed from Andreas Müller to Katja Luther
  • % Done changed from 0 to 90

Now I get

last remote method : http://test.e-taxonomy.eu:80/cdmserver/rem_conf_am/remoting/common.service
last remote request client time : 2021-07-01T12:59:44.731
last remote request response header time : Thu, 01 Jul 2021 10:59:45 GMT
client error time : 2021-07-01T13:01:12.158
login : admin
editor version : 5.25.0.202107011038
server : test.e-taxonomy.eu (edit-test) / rem_conf_am
schema version : 5.25.0.0.20210609
os : Windows Server 2012 R2 6.3 amd64
java : 1.8.0_131
java.lang.NullPointerException
    at eu.etaxonomy.taxeditor.bulkeditor.input.TaxonEditorInput.addSaveCandidate(TaxonEditorInput.java:168)
    at eu.etaxonomy.taxeditor.bulkeditor.input.TaxonEditorInput.addSaveCandidate(TaxonEditorInput.java:1)
    at eu.etaxonomy.taxeditor.bulkeditor.e4.BulkEditor.changed(BulkEditor.java:314)
    at eu.etaxonomy.taxeditor.view.e4.AbstractCdmEditorPartE4.changed(AbstractCdmEditorPartE4.java:196)
    at eu.etaxonomy.taxeditor.view.e4.AbstractCdmDataViewer.markViewPartDirty(AbstractCdmDataViewer.java:110)
    at eu.etaxonomy.taxeditor.view.e4.AbstractCdmDataViewer$1.dirtyStateChanged(AbstractCdmDataViewer.java:80)
    at org.eclipse.ui.forms.AbstractFormPart.markDirty(AbstractFormPart.java:93)
    at eu.etaxonomy.taxeditor.view.detail.CdmSectionPart.propertyChange(CdmSectionPart.java:206)
    at eu.etaxonomy.taxeditor.ui.element.AbstractCdmFormElement.firePropertyChangeEvent(AbstractCdmFormElement.java:230)
    at eu.etaxonomy.taxeditor.ui.combo.term.TermComboElement.widgetSelected(TermComboElement.java:387)
    at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:249)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4236)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3824)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022)
    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150)
    at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
    at eu.etaxonomy.taxeditor.Application.start(Application.java:20)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
    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.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1519)

when I try to add a name identifier within the bulkeditor for taxa (by selecting the name in details view).
However I could not reproduce. It looks like I somehow managed to remove the focus from the bulkeditor without emptying the views.
Anyway, we should put the last 2 lines of the new code to the if-statement as the current code looks like it allows taxonBase = null
But the question is how to handle this special case then. If not handled it could happen that the changed value is not added to the model so maybe we should still throw a message saying the the selection unexpectedly got lost or whatever (this makes it at least easier to debug).

Can you leave a small massage what the new code is doing and what the changed() method is doing.

Actions #4

Updated by Andreas Müller over 2 years ago

Except for the above exception the bug seems to be fixed now.

Actions #5

Updated by Katja Luther over 2 years ago

Andreas Müller wrote:

Now I get

when I try to add a name identifier within the bulkeditor for taxa (by selecting the name in details view).
However I could not reproduce. It looks like I somehow managed to remove the focus from the bulkeditor without emptying the views.
Anyway, we should put the last 2 lines of the new code to the if-statement as the current code looks like it allows taxonBase = null
But the question is how to handle this special case then. If not handled it could happen that the changed value is not added to the model so maybe we should still throw a message saying the the selection unexpectedly got lost or whatever (this makes it at least easier to debug).

Can you leave a small massage what the new code is doing and what the changed() method is doing.

I got the same excpetion when I tried first then everything works as expected.
The new code checks whether the element changed is a name, but the bulk editor is of type taxonbulkeditor. If this is the case, the selection of the bulk editor is used to add to the list of saveCandidates.

In my develop environment I never got this exception, but I can not find the cause, there are no local changes that could prevent from this exception.

I add a message when the element, that should be added to the saveCandidate list is null.

Actions #6

Updated by Katja Luther over 2 years ago

  • Status changed from Feedback to Closed

I tested it again and did not get the exception anymore, so I would close this ticket.

Actions

Also available in: Atom PDF