Project

General

Profile

Bug #1373

Delete function causes NPE and doesn't work

Added by Matt Jones almost 18 years ago. Updated almost 18 years ago.

Status:
Resolved
Priority:
Immediate
Assignee:
Category:
morpho - general
Target version:
Start date:
03/19/2004
Due date:
% Done:

0%

Estimated time:
Bugzilla-Id:
1373

Description

I'm trying to use the "Delete..." function from a recent checkout (Mar19, 2004
around 2:15pm PST) of Morpho. When I select a row in a resultset and select
File|Delete..., it asks me if I want to delete the network copy. I say yes, and
it proceeds to try, but generates a Null Pointer Exception and the package is
not deleted. The packages I have tried to delete include:
test.2003224115028.1
test.2003224112053.1
foombj.103.1

In addition, if I open the package and select File|Delete... from within the
opened package window, nothing happens whatsoever. If this function isn't
available here, it should be disabled in the menu.

Here is the exception:
java.lang.NullPointerException
at
edu.ucsb.nceas.morpho.datapackage.AbstractDataPackage.delete(AbstractDataPackage.java:2478)
at
edu.ucsb.nceas.morpho.datapackage.DataPackagePlugin.delete(DataPackagePlugin.java:864)
at
edu.ucsb.nceas.morpho.query.DeleteCommand$1.construct(DeleteCommand.java:258)
at edu.ucsb.nceas.morpho.framework.SwingWorker$2.run(SwingWorker.java:140)
at java.lang.Thread.run(Thread.java:534)

History

#1 Updated by Dan Higgins almost 18 years ago

It looks like the delete problem is document specific --- In particular, it
seems to be occur in documents where the id stored in the metadata document does
not match the actual id used for the document in metacat/morpho local storage.

This is apparently related to fact that Morpho assumes the internal id always
matches the storage id (Apparently this is not always true!).

#2 Updated by Dan Higgins almost 18 years ago

Problem apparently due to differences between the storage id and the id saved
internally in the package. This only occurred on some packages created with the
web page. Morpho now keeps the initial id used to open a package and compares it
to the internal id. If they differ, a error message is printed and the intial id
is used for opeations like "Delete".

#3 Updated by Redmine Admin almost 9 years ago

Original Bugzilla ID was 1373

Also available in: Atom PDF