Opened 8 years ago

Closed 8 years ago

#1915 closed defect (fixed)

List page breaks when snapshot contains deleted annotation

Reported by: Nicklas Nordborg Owned by: everyone
Priority: minor Milestone: BASE 3.4.1
Component: core Version:
Keywords: Cc:


The extracts list page failed to load correctly. It was just aborted in the middle and no error messages in the log. After adding some debug code I got:

net.sf.basedb.core.ItemNotFoundException: Item not found: AnnotationType[id=103]
	at net.sf.basedb.core.AnnotationType.getById(
	at net.sf.basedb.core.snapshot.AnnotationSnapshot.getAnnotationType(
	at net.sf.basedb.core.snapshot.AnnotationSnapshot.hasPermission(
	at net.sf.basedb.core.snapshot.SnapshotManager.findAnnotations(
	at net.sf.basedb.core.snapshot.AnnotationLoaderUtil.findAll(
	at net.sf.basedb.core.snapshot.AnnotationLoaderUtil.find(
	at org.apache.jsp.biomaterials.extracts.list_005fextracts_jsp._jspService(

There is no annotation type with id 103 but it seems like a reference is still found in one snapshot file. Don't know exactly how this could happen since an annotation type can't be deleted if it is used and if it is not used it should not appear in a snapshot file. My best guess is that it is a leftover snapshot file from a different BASE installation. In any case, it would be nice if the code was more stable.

Change History (1)

comment:1 Changed 8 years ago by Nicklas Nordborg

Resolution: fixed
Status: newclosed

(In [6710]) Fixes #1915: List page breaks when snapshot contains deleted annotation

Now check if an annotation matches the filter before the permission check. Also make the permission check more robust against unexpected exceptions.

Note: See TracTickets for help on using tickets.