Opened 12 years ago

Closed 12 years ago

#1683 closed defect (fixed)

Exception when exporting the 'Platform' column from the raw bioassays list

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

Description

Go to the raw bioassays list page. Make sure the 'Platform' column is visible and that at least one raw bioassay item exists. Then, use the table exporter and save the file in the BASE file system. The export stops with an error:

java.io.IOException: java.lang.String cannot be cast to java.lang.Number
  at net.sf.basedb.clients.web.plugins.SimpleExport.exportProperties(SimpleExport.java:627)
  at net.sf.basedb.clients.web.plugins.SimpleExport.performExport(SimpleExport.java:342)
  at net.sf.basedb.core.plugin.AbstractExporterPlugin.run(AbstractExporterPlugin.java:144)
  at net.sf.basedb.core.PluginExecutionRequest.invoke(PluginExecutionRequest.java:116)
  at net.sf.basedb.core.PluginExecutionRequest.run(PluginExecutionRequest.java:141)
  at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Number
  at net.sf.basedb.util.formatter.IntegerFormatter.format(IntegerFormatter.java:32)
  at net.sf.basedb.clients.web.plugins.PlainTextTemplate.writeProperty(PlainTextTemplate.java:133)
  at net.sf.basedb.clients.web.plugins.SimpleExport.exportProperties(SimpleExport.java:610)
  ... 5 more

The workaround is to exclude the 'Platform' column from the export.

Change History (3)

comment:1 by Nicklas Nordborg, 12 years ago

Owner: changed from everyone to Nicklas Nordborg
Status: newassigned

The array design list have the same problem.

comment:2 by Nicklas Nordborg, 12 years ago

And possible a lot more where the column definition have different values for 'property' and 'exportproperty'. I'll try to see if I can find more...

comment:3 by Nicklas Nordborg, 12 years ago

Resolution: fixed
Status: assignedclosed

(In [6031]) Fixes #1683: Exception when exporting the 'Platform' column from the raw bioassays list

Fixes this column and a lot of other columns with a similar problem. The key issue is that the filtering, etc. is done on the id and the data type is specified as 'int', but the export uses the name and need to explicitetly specify that as a ':string' suffix in the 'exportproperty' value.

Note: See TracTickets for help on using tickets.