Opened 15 years ago

Closed 15 years ago

#1207 closed defect (fixed)

Using empty filters (= or <>) on an annotation column with units results in NullPointerException

Reported by: Nicklas Nordborg Owned by: Nicklas Nordborg
Priority: critical Milestone: BASE 2.9.1
Component: core Version: 2.9
Keywords: Cc:


  1. Create an annotation type for any kind of item. Select any unit and quantity.
  2. Go to the list page and display the column for the new annotation type.
  3. Try to filter with '=' or '<>' on the annotation column.

NullPointerException:null is displayed on the page and no results are returned. The log contains the stack trace:

19:29:42,404  WARN Application:1077 - Could not filter on 'Sample.#6'
        at java.util.regex.Matcher.getTextLength(
        at java.util.regex.Matcher.reset(
        at java.util.regex.Matcher.<init>(
        at java.util.regex.Pattern.matcher(
        at net.sf.basedb.util.units.UnitUtil.splitValueWithUnit(
        at net.sf.basedb.core.PropertyFilter.getValueAsObject(
        at net.sf.basedb.core.PropertyFilter.getRestriction(
        at net.sf.basedb.core.ItemContext.configureQuery(
        at net.sf.basedb.clients.web.Base.getConfiguredQuery(
        at org.apache.jsp.biomaterials.samples.list_005fsamples_jsp._jspService(

Filtering on specific values seems to work.

Change History (2)

comment:1 Changed 15 years ago by Nicklas Nordborg

Owner: changed from everyone to Nicklas Nordborg
Status: newassigned

comment:2 Changed 15 years ago by Nicklas Nordborg

Resolution: fixed
Status: assignedclosed

(In [4692]) Fixes #1207: Using empty filters (= or <>) on an annotation column with units results in NullPointerException?

Note: See TracTickets for help on using tickets.