Opened 16 years ago

Last modified 16 years ago

#915 closed defect

NullPointerException when a raw data type is missing — at Version 1

Reported by: Nicklas Nordborg Owned by: everyone
Priority: major Milestone: BASE 2.6
Component: core Version:
Keywords: Cc:

Description (last modified by Nicklas Nordborg)

If a raw data type is removed from the raw-data-types.xml file and there are raw bioassays in the database that uses the removed raw data type, the call to RawBioassay.getRawDataType() will return null. This causes a lot of trouble for many parts of the code since null is not an allowed return value. I think the Experiment.getRawDataType() may be affected by the same problem.

Since the configuration is in an external file there are no database constraints that we can lean on to make sure that used raw data types are never deleted. Maybe we can have a "dummy" raw data type so we don't have to return null.

Example stacktrace:

java.lang.NullPointerException
   at org.apache.jsp.views.rawbioassays.list_005frawbioassays_jsp._jspService(list_005frawbioassays_jsp.java:1295)
   at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)

Line 1295 in list_rawbioassays.jsp is:

out.print(HTML.encodeTags(rdt.getName()));

Change History (1)

comment:1 by Nicklas Nordborg, 16 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.