Opened 10 years ago

Closed 10 years ago

#1548 closed defect (fixed)

java.lang.ClassCastException on biowells list page when the [Biomtrl] Registered column is hidden

Reported by: Nicklas Nordborg Owned by: Nicklas Nordborg
Priority: minor Milestone: BASE 2.16.1
Component: web Version:
Keywords: Cc:

Description

The error is only visible in the log file and never shows up on the web page itself. The error goes away if the [Biomtrl] Registered is made visible.

The interesting part of the stacktrace in the log file is:

java.lang.ClassCastException: java.sql.Date cannot be cast to java.lang.Integer
	at net.sf.basedb.util.formatter.WellCoordinateFormatter.format(WellCoordinateFormatter.java:37)
	at net.sf.basedb.clients.web.taglib.table.Cell.doEndTag(Cell.java:283)
	at org.apache.jsp.biomaterials.bioplates.wells.list_005fbiowells_jsp._jspService(list_005fbiowells_jsp.java:1507)
....

We have identified the problem to the <tbl:cell> taglib. There is an incomplete check if the column is visible or hidden in the Cell.doEndTag() method. This causes the code to continue instead of returning. In this particular case (and because taglib objects are re-used) there happens to be a formatter for the Row/Column? coordinate present in the formatter variable, which of course fails with the above exception.

Change History (3)

comment:1 Changed 10 years ago by Nicklas Nordborg

I guess the same thing can happen on other list pages that have columns with more than one type of formatter. But it only seems to happen on hidden columns, so it should not affect users at all.

comment:2 Changed 10 years ago by Nicklas Nordborg

Owner: changed from everyone to Nicklas Nordborg
Status: newassigned

comment:3 Changed 10 years ago by Nicklas Nordborg

Resolution: fixed
Status: assignedclosed

(In [5493]) Fixes #1548: java.lang.ClassCastException? on biowells list page when the [Biomtrl] Registered column is hidden

Note: See TracTickets for help on using tickets.