Opened 8 years ago

Closed 8 years ago

#2036 closed defect (fixed)

Exception when using the "Auto-inhert" feature on the experiment page

Reported by: Nicklas Nordborg Owned by: everyone
Priority: major Milestone: BASE 3.10
Component: web Version:
Keywords: Cc:

Description

Selecting some annotation types and clicking "Auto-inherit" results in an exception (sometimes):

java.lang.Integer cannot be cast to java.lang.String
...at HibernateUtil.loadList(HibernateUtil.java:1919)
...at ItemQuery.list(ItemQuery.java:92)
...at net.sf.basedb.clients.web.AnnotationUtil.loadJsonForBatchInherit(AnnotationUtil.java:139)
...at org.apache.jsp.common.annotations.batch_005finherit_jsp._jspService(batch_005finherit_jsp.java:224)
...

The exception only happens for some annotation types. The relevant part of the code (line 139 in AnnotationUtil) is executing a query for bioplate types which only happens if at least one of the selected annotation types are used on bioplates. If that annotation type is not selected the dialog is opened without error.

Change History (1)

comment:1 by Nicklas Nordborg, 8 years ago

Resolution: fixed
Status: newclosed

(In [7208]) Fixes #2036: Exception when using the "Auto-inhert" feature on the experiment page

The problem was that the query for bioplate types was used to match existing annotation categories but if there are no categories the query failed. The solution is to only search for bioplate types if there are any categories to match against.

Note: See TracTickets for help on using tickets.