Project

General

Profile

Actions

bug #10182

closed

Portal does not show typespecimen for duplicated typedesignation

Added by Katja Luther over 1 year ago. Updated over 1 year ago.

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

100%

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

Description

mail NadjaK:

wenn ich einen Typus über „Create type duplicate“ dupliziere, wird das im Portal nicht angezeigt.

viele Grüße
Nadja


Files

duplicatedTypeDesignation.png (54.1 KB) duplicatedTypeDesignation.png Katja Luther, 11/09/2022 11:38 AM
portal_output.png (63.2 KB) portal_output.png Katja Luther, 11/09/2022 11:38 AM
clipboard-202301032329-0sgqk.png (8.46 KB) clipboard-202301032329-0sgqk.png Andreas Müller, 01/03/2023 11:29 PM

Related issues

Related to EDIT - bug #10185: Missing OccurrenceStatus Type creates NPE when creating DTODuplicateKatja Luther

Actions
Related to EDIT - feature request #2506: (Type-) Specimens may need statusClosedAndreas Müller

Actions
Actions #1

Updated by Katja Luther over 1 year ago

  • Category set to cdm-dataportal
  • Assignee set to Katja Luther

The webservice to get the specimen_dto of the typespecimen returns false.

Actions #2

Updated by Katja Luther over 1 year ago

The webservice failed because the derived unit had a occurrence status which had no type.

Actions #3

Updated by Katja Luther over 1 year ago

  • Related to bug #10185: Missing OccurrenceStatus Type creates NPE when creating DTO added
Actions #4

Updated by Andreas Müller over 1 year ago

  • Target version changed from Unassigned CDM tickets to Release 5.35
Actions #5

Updated by Andreas Müller over 1 year ago

Katja Luther wrote in #note-2:

The webservice failed because the derived unit had a occurrence status which had no type.

Is this an issue of the clone mechanism (#2506)? NaK mentioned that she created the clone just before.

Actions #6

Updated by Andreas Müller over 1 year ago

Actions #7

Updated by Andreas Müller over 1 year ago

  • Status changed from New to In Progress
Actions #8

Updated by Andreas Müller over 1 year ago

  • Tags set to fast
  • Category changed from cdm-dataportal to taxeditor

The Editor must guarantee that OcccurenceStatus.type is never null.

Additionally, we should add NotNull to OccurrenceStatus.type and .unit in the model.

Actions #9

Updated by Andreas Müller over 1 year ago

  • Priority changed from New to Highest
  • % Done changed from 0 to 10
Actions #10

Updated by Katja Luther over 1 year ago

when adding a occurrenceStatus without type now an exception is thrown:

2023-01-03T09:28:35.757: http://localhost:8081/remoting/occurrence.service#load [31.0 ms]
2023-01-03T09:28:35.801: http://localhost:8081/remoting/term.service#findWithoutFlush [17.0 ms]
2023-01-03T09:28:35.859: http://localhost:8081/remoting/common.service#initializeCollection [53.0 ms]
2023-01-03T09:28:36.36: http://localhost:8081/remoting/common.service#initializeCollection [46.0 ms]
2023-01-03T09:28:36.629: http://localhost:8081/remoting/common.service#initializeCollection [52.0 ms]
2023-01-03T09:28:41.754: http://localhost:8081/remoting-public/metadata.service#getDbSchemaVersion [6.0 ms]

!ENTRY org.eclipse.ui 4 0 2023-01-03 09:28:44.232
!MESSAGE Maybe the server is currently not available. If the problem persists please contact the server admin with the error trace below.

!STACK 0
java.lang.Exception: last remote service : http://localhost:8081/remoting/occurrence.service
last remote method : getDbSchemaVersion
last remote request client time : 2023-01-03T09:28:41.665
client error time : 2023-01-03T09:28:41.755
login : admin
editor version : 5.35.0.qualifier
server : localhost (localhost-dev)
schema version : 5.35.1.0.20221218
os : Windows Server 2012 R2 6.3 amd64
java : 1.8.0_131
org.springframework.remoting.RemoteAccessException: Could not deserialize result from HTTP invoker remote service [http://localhost:8081/remoting/occurrence.service]; nested exception is java.lang.NoClassDefFoundError: javax/validation/ConstraintViolation
    at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.convertHttpInvokerAccessException(HttpInvokerClientInterceptor.java:221)
    at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.invoke(HttpInvokerClientInterceptor.java:153)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
    at com.sun.proxy.$Proxy96.merge(Unknown Source)
    at eu.etaxonomy.taxeditor.ui.selection.EditFromSelectionWizard.performFinish(EditFromSelectionWizard.java:179)
    at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:790)
    at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:423)
    at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:618)
    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.jface.window.Window.runEventLoop(Window.java:818)
    at org.eclipse.jface.window.Window.open(Window.java:794)
    at eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement$EditListener.widgetSelected(EntitySelectionElement.java:388)
    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)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1492)
Caused by: java.lang.NoClassDefFoundError: javax/validation/ConstraintViolation
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
    at org.eclipse.osgi.internal.loader.ModuleClassLoader.defineClass(ModuleClassLoader.java:273)
    at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.defineClass(ClasspathManager.java:632)
    at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findClassImpl(ClasspathManager.java:586)
    at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClassImpl(ClasspathManager.java:538)
    at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:525)
    at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:325)
    at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:345)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:423)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:372)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:364)
    at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:161)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
    at org.eclipse.osgi.internal.loader.ModuleClassLoader.defineClass(ModuleClassLoader.java:273)
    at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.defineClass(ClasspathManager.java:632)
    at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findClassImpl(ClasspathManager.java:586)
    at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClassImpl(ClasspathManager.java:538)
    at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:525)
    at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:325)
    at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:345)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:423)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:372)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:364)
    at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:161)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:348)
    at java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:677)
    at org.springframework.core.ConfigurableObjectInputStream.resolveClass(ConfigurableObjectInputStream.java:78)
    at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1826)
    at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1713)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2000)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1535)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:422)
    at java.util.HashSet.readObject(HashSet.java:333)
    at sun.reflect.GeneratedMethodAccessor44.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1058)
    at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2136)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2027)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1535)
    at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2245)
    at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2125)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2027)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1535)
    at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2245)
    at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2169)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2027)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1535)
    at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2245)
    at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2169)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2027)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1535)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:422)
    at org.springframework.remoting.httpinvoker.AbstractHttpInvokerRequestExecutor.doReadRemoteInvocationResult(AbstractHttpInvokerRequestExecutor.java:291)
    at org.springframework.remoting.httpinvoker.AbstractHttpInvokerRequestExecutor.readRemoteInvocationResult(AbstractHttpInvokerRequestExecutor.java:242)
    at org.springframework.remoting.httpinvoker.HttpComponentsHttpInvokerRequestExecutor.doExecuteRequest(HttpComponentsHttpInvokerRequestExecutor.java:248)
    at org.springframework.remoting.httpinvoker.AbstractHttpInvokerRequestExecutor.executeRequest(AbstractHttpInvokerRequestExecutor.java:137)
    at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.executeRequest(HttpInvokerClientInterceptor.java:202)
    at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.executeRequest(HttpInvokerClientInterceptor.java:184)
    at org.springframework.remoting.httpinvoker.CachingHttpInvokerProxyFactoryBean.doExecuteRequest(CachingHttpInvokerProxyFactoryBean.java:161)
    at org.springframework.remoting.httpinvoker.CachingHttpInvokerProxyFactoryBean.handleGeneralRequest(CachingHttpInvokerProxyFactoryBean.java:95)
    at org.springframework.remoting.httpinvoker.CachingHttpInvokerProxyFactoryBean.executeRequest(CachingHttpInvokerProxyFactoryBean.java:88)
    at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.invoke(HttpInvokerClientInterceptor.java:150)
    ... 44 more
Caused by: java.lang.ClassNotFoundException: javax.validation.ConstraintViolation cannot be found by eu.etaxonomy.taxeditor.cdmlib_5.35.0.qualifier
    at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:461)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:372)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:364)
    at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:161)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    ... 112 more

    at eu.etaxonomy.taxeditor.model.MessagingUtils$1.run(MessagingUtils.java:289)
    at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
    at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:182)
    at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4211)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3827)
    at org.eclipse.jface.window.Window.runEventLoop(Window.java:818)
    at org.eclipse.jface.window.Window.open(Window.java:794)
    at eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement$EditListener.widgetSelected(EntitySelectionElement.java:388)
    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)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1492)
Actions #11

Updated by Katja Luther over 1 year ago

Added a check in derived unit wizard, which is used for editing specimens of type designations.

Actions #12

Updated by Katja Luther over 1 year ago

Andreas Müller wrote in #note-5:

Katja Luther wrote in #note-2:

The webservice failed because the derived unit had a occurrence status which had no type.

Is this an issue of the clone mechanism (#2506)? NaK mentioned that she created the clone just before.

We both (AM und KL) checked the clone mechanism, but during cloning there is no occurrence status created. So I added the check for the editing wizard.

Actions #13

Updated by Andreas Müller over 1 year ago

I think the TaxEditor implementation does not use DerivedUnit.clone(). However, there was a bug in the clone method that is fixed now (0ec25996a3f6).

Actions #14

Updated by Andreas Müller over 1 year ago

Katja Luther wrote in #note-12:
...

We both (AM und KL) checked the clone mechanism, but during cloning there is no occurrence status created. So I added the check for the editing wizard.

Is this already pushed and for review?

Actions #15

Updated by Katja Luther over 1 year ago

Andreas Müller wrote in #note-13:

I think the TaxEditor implementation does not use DerivedUnit.clone(). However, there was a bug in the clone method that is fixed now (0ec25996a3f6).

There are only changes in javadoc?

Actions #16

Updated by Katja Luther over 1 year ago

Andreas Müller wrote in #note-14:

Katja Luther wrote in #note-12:
...

We both (AM und KL) checked the clone mechanism, but during cloning there is no occurrence status created. So I added the check for the editing wizard.

Is this already pushed and for review?

Yes, but there is still one issue that the type is not marked after creating the new occurrence status. It should be marked red to show why the specimen can't be saved.

Actions #17

Updated by Andreas Müller over 1 year ago

Katja Luther wrote in #note-16:

Andreas Müller wrote in #note-14:

Katja Luther wrote in #note-12:
...

We both (AM und KL) checked the clone mechanism, but during cloning there is no occurrence status created. So I added the check for the editing wizard.

Is this already pushed and for review?

Yes, but there is still one issue that the type is not marked after creating the new occurrence status. It should be marked red to show why the specimen can't be saved.

Katja Luther wrote in #note-15:

Andreas Müller wrote in #note-13:

I think the TaxEditor implementation does not use DerivedUnit.clone(). However, there was a bug in the clone method that is fixed now (0ec25996a3f6).

There are only changes in javadoc?

Upps, sorry, I meant 98ba42ca6a5d0

Actions #18

Updated by Katja Luther over 1 year ago

  • Status changed from In Progress to Resolved
  • Assignee changed from Katja Luther to Andreas Müller

Katja Luther wrote in #note-16:

Andreas Müller wrote in #note-14:

Katja Luther wrote in #note-12:
...

We both (AM und KL) checked the clone mechanism, but during cloning there is no occurrence status created. So I added the check for the editing wizard.

Is this already pushed and for review?

Yes, but there is still one issue that the type is not marked after creating the new occurrence status. It should be marked red to show why the specimen can't be saved.

Now everything is pushed and jenkins built successfully.

Actions #19

Updated by Katja Luther over 1 year ago

  • Status changed from Resolved to In Progress
Actions #20

Updated by Andreas Müller over 1 year ago

  • % Done changed from 10 to 60

did you put this back to InProgress on purpose?

Actions #21

Updated by Katja Luther over 1 year ago

  • Status changed from In Progress to Resolved

Andreas Müller wrote in #note-20:

did you put this back to InProgress on purpose?

the exception isn't fixed but could not be thrown anymore. So we could set it to resolved again, but maybe we should have a look whether the ClassNotFoundException was thrown.

Actions #22

Updated by Andreas Müller over 1 year ago

I tried to fix the ClassNotFoundException (taxeditor:commit:384cf0c384d17e0f). Still needs to be tested.

Actions #23

Updated by Andreas Müller over 1 year ago

  • Status changed from Resolved to Feedback
  • Assignee changed from Andreas Müller to Katja Luther

In the TaxEditor log I find multiple times

!ENTRY eu.taxeditor 2 0 2023-01-03 21:56:39.428
!MESSAGE Widget is disposed
!STACK 0
org.eclipse.swt.SWTException: Widget is disposed
    at org.eclipse.swt.SWT.error(SWT.java:4533)
    at org.eclipse.swt.SWT.error(SWT.java:4448)
    at org.eclipse.swt.SWT.error(SWT.java:4419)
    at org.eclipse.swt.widgets.Widget.error(Widget.java:482)
    at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:354)
    at org.eclipse.swt.widgets.Control.setBackground(Control.java:3101)
    at eu.etaxonomy.taxeditor.ui.section.occurrence.OccurrenceStatusElement.setBackground(OccurrenceStatusElement.java:111)
    at eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement.setSelected(AbstractEntityCollectionElement.java:158)
    at eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator.selectionChanged(SelectionArbitrator.java:147)
    at org.eclipse.jface.viewers.Viewer$1.run(Viewer.java:158)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:50)
    at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:173)
    at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java:155)
    at eu.etaxonomy.taxeditor.view.e4.details.DetailsViewerE4.setSelection(DetailsViewerE4.java:462)

The relevant line is the middle line in

        for(Control element : getControls()){
            element.setBackground(color);
        }

in OccurrenceStatusElement.setBackground().

When fixing please fix also the NPE warning above related to

element.setBackground(colorRedSWT);

(and maybe leave a more specific comment in getSelectionArbitrator() (currently it is only the default comment for auto-generated code)

Please be aware that I did some cleanup in the file so pull first.

Actions #24

Updated by Andreas Müller over 1 year ago

I fixed the widgetIsDisposed issue already. Please review and do the other changes.

Actions #25

Updated by Andreas Müller over 1 year ago

Andreas Müller wrote in #note-22:

I tried to fix the ClassNotFoundException (taxeditor:commit:384cf0c384d17e0f). Still needs to be tested.

I tried to test. If removing the type (type_id) of an OccurrenceStatus in the db (e.g. for record OccurrenceStatus.id = 72 in rem_conf_am) I would expect some kind of exception to be thrown when loading the related record (load synonym "Spartina versicolor E. Fabre" and go to second specimen type and edit the specimen). Instead the following record is shown:

I would expect the the NotNull constraint information is thrown in some way here and the record can not be loaded. But this is not the case.
Do you have any idea why this is the case? Do we use DTOs here (for DTOs I do not know the expected behaviour).

I did not find any exception, neither in the taxeditor log nor in the cdmserver log.

Actions #26

Updated by Katja Luther over 1 year ago

Andreas Müller wrote in #note-25:

Andreas Müller wrote in #note-22:

I tried to fix the ClassNotFoundException (taxeditor:commit:384cf0c384d17e0f). Still needs to be tested.

I tried to test. If removing the type (type_id) of an OccurrenceStatus in the db (e.g. for record OccurrenceStatus.id = 72 in rem_conf_am) I would expect some kind of exception to be thrown when loading the related record (load synonym "Spartina versicolor E. Fabre" and go to second specimen type and edit the specimen). Instead the following record is shown:

I would expect the the NotNull constraint information is thrown in some way here and the record can not be loaded. But this is not the case.
Do you have any idea why this is the case? Do we use DTOs here (for DTOs I do not know the expected behaviour).

I did not find any exception, neither in the taxeditor log nor in the cdmserver log.

Maybe the validation only takes place during saving/merging?

Actions #27

Updated by Katja Luther over 1 year ago

Andreas Müller wrote in #note-24:

I fixed the widgetIsDisposed issue already. Please review and do the other changes.

thanks!

Actions #28

Updated by Andreas Müller over 1 year ago

Katja Luther wrote in #note-26:

Andreas Müller wrote in #note-25:

Andreas Müller wrote in #note-22:

I tried to fix the ClassNotFoundException (taxeditor:commit:384cf0c384d17e0f). Still needs to be tested.

I tried to test. If removing the type (type_id) of an OccurrenceStatus in the db (e.g. for record OccurrenceStatus.id = 72 in rem_conf_am) I would expect some kind of exception to be thrown when loading the related record (load synonym "Spartina versicolor E. Fabre" and go to second specimen type and edit the specimen). Instead the following record is shown:

I would expect the the NotNull constraint information is thrown in some way here and the record can not be loaded. But this is not the case.
Do you have any idea why this is the case? Do we use DTOs here (for DTOs I do not know the expected behaviour).

I did not find any exception, neither in the taxeditor log nor in the cdmserver log.

Maybe the validation only takes place during saving/merging?

I thought that I had observed validation during load. But now I implemented a test (e8fbd83a93a44) that shows that validation does not take place during testing. So this issue is solved.

Actions #29

Updated by Katja Luther over 1 year ago

  • Status changed from Feedback to Closed

made code cleaning mentioned in note#23, so we can close this ticket.

Actions #30

Updated by Andreas Müller over 1 year ago

  • Status changed from Closed to Feedback

Katja Luther wrote in #note-29:

made code cleaning mentioned in note#23, so we can close this ticket.

The code cleaning mostly reverted all my changes. Please correct!

Actions #31

Updated by Katja Luther over 1 year ago

Andreas Müller wrote in #note-30:

Katja Luther wrote in #note-29:

made code cleaning mentioned in note#23, so we can close this ticket.

The code cleaning mostly reverted all my changes. Please correct!

reverted the last commit and added my changes again.

Actions #32

Updated by Andreas Müller over 1 year ago

  • Status changed from Feedback to Closed
  • % Done changed from 80 to 100

Looks ok now, I think we can finally close this ticket now.

Actions

Also available in: Atom PDF