Opened 17 years ago

Closed 17 years ago

#443 closed defect (fixed)

raw bioassay data not linked to LIMS kills Feature.getWell in list_rawdata.jsp

Reported by: base Owned by: Nicklas Nordborg
Priority: major Milestone: BASE 2.1.1
Component: core Version: 2.1
Keywords: Cc:

Description

I have migrated data sucessfully from BASE 1.2.x where we did not use the LIMS at all. The Raw data tab in the Raw bioassays page was coming up blank with the following exception in the logs:

11:32:59,837 ERROR [jsp]:253 - Servlet.service() for servlet jsp threw exception java.lang.NullPointerException

at net.sf.basedb.core.Feature.getWell(Feature.java:77) at org.apache.jsp.views.rawbioassays.rawdata.list_005frawdata_jsp._jspService(list_005frawdata_jsp.java:2185) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)

I can fix the problem with the following code: (I added the if/else null test on 'well')

	public static Well getWell(DbControl dc, FeatureData feature)
		throws PermissionDeniedException, BaseException
	{
		WellData well = (WellData)metaData.getPropertyValue(feature, "well", EntityMode.POJO);
		if (well != null) {
		    well = HibernateUtil.loadData(dc.getHibernateSession(), WellData.class, well.getId());
		    return dc.getItem(Well.class, well);
		} else {
		    return null;
		}
	}

I guess you'll want to fix it your own way. (Should the JSP catch an exception instead?)

(submitted by Bob)

Change History (4)

comment:1 by Nicklas Nordborg, 17 years ago

Milestone: BASE 2.1.1
Status: newassigned
Version: 2.1

This was fixed in the trunk as part of ticket #189 (changeset [2868]). I think it should be fixed in the 2.1.1 release as well.

comment:2 by Nicklas Nordborg, 17 years ago

Thanks for providing a fix. It is more or less identical to the existing fix.

comment:3 by Jari Häkkinen, 17 years ago

A similar exception occurs when trying to list the features for an Array design. I guess this will be resolved aswell.

comment:4 by Nicklas Nordborg, 17 years ago

Resolution: fixed
Status: assignedclosed

(In [2957]) Fixes #443: raw bioassay data not linked to LIMS kills Feature.getWell in list_rawdata.jsp

Note: See TracTickets for help on using tickets.