Opened 8 years ago

Closed 8 years ago

#1949 closed defect (fixed)

NullPointerException when merging item lists

Reported by: Nicklas Nordborg Owned by: everyone
Priority: trivial Milestone: BASE 3.6
Component: web Version:
Keywords: Cc:


  1. Start with two item lists of the same type containing a few items each.
  1. On the "Item lists" list page, define a preset by saving the current settings using "view/presets -> Save as".
  1. Enter the view page for one of the lists, and click on one of the "Union", "Intersection" or "Complement" buttons.
  1. Use the "Add item list" button to open a popup for selecting item lists. Before selecting the other list use the "view/preset" to select the preset that was saved earlier.
  1. Click on "Ok". The following error message is displayed:
java.lang.NullPointerException DbControl.reattachItem( org.apache.jsp.views.itemlists.index_jsp._jspService(

The workaround is to NOT use the "view/preset" to select a saved preset when selecting lists to merge in step 4.

Change History (2)

comment:1 Changed 8 years ago by Nicklas Nordborg

Milestone: BASE 3.6
Priority: majortrivial

comment:2 Changed 8 years ago by Nicklas Nordborg

Resolution: fixed
Status: newclosed

(In [6930]) Fixes #1949: NullPointerException? when merging item lists

The problem was that the current context is used to store some temporary information while editing items (eg. the current item list). When selecting a saved preset, it replaces the current context and also all temporary objects stored in it, thereby causing the NullPointerException when trying to use it later. All list pages are potentially affected by the same problem.

The fix is to copy temporary objects from the current context to the preset when it is loaded.

Note: See TracTickets for help on using tickets.