Project

General

Profile

bug #5870

NPE when trying to open a synonym (or taxon) that has been deleted

Added by Andreas Müller over 3 years ago. Updated almost 3 years ago.

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

100%

Estimated time:
1.00 h
Severity:
normal
Found in Version:

Description

How to create:

  • Search for a synonym that exists

  • Go to the NameEditor or BulkEditor and delete the synonym

  • Go back to search result list and try to open the synonym

  • => Exception

Instead we should show an error dialog saying that the taxon / synonym does not exist (anymore) and can not be opened.

java.lang.NullPointerException
  login : admin
  editor version : 4.2.0.201606070934
  server : test.e-taxonomy.eu / edit-test
  schema version : 4.0.0.0.201604200000
  os : Windows Server 2012 6.2 amd64
  java : 1.7.0_65
    at eu.etaxonomy.taxeditor.editor.TaxonEditorInput.getTaxon(TaxonEditorInput.java:356)
    at eu.etaxonomy.taxeditor.editor.TaxonEditorInput.equals(TaxonEditorInput.java:341)
    at org.eclipse.ui.internal.EditorManager.findEditors(EditorManager.java:526)
    at org.eclipse.ui.internal.EditorManager.findEditors(EditorManager.java:455)
    at org.eclipse.ui.internal.EditorManager.findEditor(EditorManager.java:420)
    at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2887)
    at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2850)
    at org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2842)
    at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2793)
    at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
    at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2789)
    at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2773)
    at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2756)
    at eu.etaxonomy.taxeditor.editor.EditorUtil.open(EditorUtil.java:80)
    at eu.etaxonomy.taxeditor.editor.EditorUtil.open(EditorUtil.java:100)
    at eu.etaxonomy.taxeditor.editor.EditorUtil.openTaxonBase(EditorUtil.java:194)
    at eu.etaxonomy.taxeditor.navigation.NavigationUtil.openEditor(NavigationUtil.java:103)
    at eu.etaxonomy.taxeditor.navigation.NavigationUtil.openEditor(NavigationUtil.java:79)
    at ... 

Doing the same with an accepted taxon also resulted in an NPE but with different stacktrace. Needs to be handled in the same way

login : admin
editor version : 4.2.0.201606070934
server : test.e-taxonomy.eu / edit-test
schema version : 4.0.0.0.201604200000
os : Windows Server 2012 6.2 amd64
java : 1.7.0_65
java.lang.NullPointerException
    at eu.etaxonomy.taxeditor.navigation.NavigationUtil.openEditor(NavigationUtil.java:91)
    at eu.etaxonomy.taxeditor.navigation.NavigationUtil.openEditor(NavigationUtil.java:79)
    at eu.etaxonomy.taxeditor.navigation.search.SearchResultView$1.doubleClick(SearchResultView.java:125)
    at org.eclipse.jface.viewers.StructuredViewer$1.run(StructuredViewer.java:845)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
    at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
    at org.eclipse.jface.viewers.StructuredViewer.fireDoubleClick(StructuredViewer.java:843)
    at org.eclipse.jface.viewers.StructuredViewer.handleDoubleSelect(StructuredViewer.java:1134)
    at org.eclipse.jface.viewers.StructuredViewer$4.widgetDefaultSelected(StructuredViewer.java:1246)
    at ...

I did not check for pure names, but maybe we get a similar problem there.

History

#1 Updated by Andreas Müller about 3 years ago

  • Description updated (diff)
  • Priority changed from New to Highest

#2 Updated by Andreas Müller about 3 years ago

  • Target version changed from Unassigned CDM tickets to Release 4.4
  • Estimated time set to 1.00 h

#3 Updated by Katja Luther about 3 years ago

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

This is already solved, the message is that the cdm entity could not be found in the database

#4 Updated by Andreas Müller about 3 years ago

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

#5 Updated by Andreas Müller about 3 years ago

  • % Done changed from 0 to 100

#6 Updated by Andreas Müller almost 3 years ago

  • Private changed from Yes to No

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 40 MB)