Ticket #49 (closed defect: fixed)

Opened 4 years ago

Last modified 3 years ago

Import wizard, templatefield typecast error

Reported by: t.w.abma@… Owned by: t.w.abma@…
Priority: major Milestone:
Component: Export functionality Version:
Keywords: Cc:
Product: Operating system:
URL: Hardware:

Description

When importing via the Simple Import wizard and a sheet has values like BMI/Height/Weight they are recognized by POI as String. When later on mapping the BMI-property (from a template) to the BMI-column in the Excel-sheet you get a typecast error. Because the template expects a TemplateFieldType?.DOUBLE and the importer isn't yet smart enough to detect whether a column is really a string or a double and has assigned a TemplateFieldType?.STRING to the columns.

Solution is to improve detection of celltypes in the importer.

Change History

Changed 4 years ago by kees.vanbochove@…

This still seems to be an issue:
TOT HIERStrain/ string
.setting [class dbnp.studycapturing.Subject] template field: [Strain] ([string] of type [class java.lang.String])
2010-06-14 17:02:20,142 [TP-Processor3] ERROR errors.GrailsExceptionResolver? - Cannot get property 'templatefieldtype' on null object
java.lang.NullPointerException?: Cannot get property 'templatefieldtype' on null object

at dbnp.importer.ImporterService?.createRecord(ImporterService?.groovy:304)
at dbnp.importer.ImporterService?$_importdata_closure3.doCall(ImporterService?.groovy:202)
at dbnp.importer.ImporterService?.importdata(ImporterService?.groovy:201)
at dbnp.importer.ImporterService?$$FastClassByCGLIB$$3550d3b5.invoke(<generated>)
at net.sf.cglib.proxy.MethodProxy?.invoke(MethodProxy?.java:149)
at dbnp.importer.ImporterService?$$EnhancerByCGLIB$$f4fec1c1.importdata(<generated>)
at dbnp.importer.ImporterService?$importdata.call(Unknown Source)
at dbnp.importer.ImporterController?$_closure7.doCall(ImporterController?.groovy:218)
at dbnp.importer.ImporterController?$_closure7.doCall(ImporterController?.groovy)
at org.apache.shiro.web.servlet.ShiroFilter?.executeChain(ShiroFilter?.java:687)
at org.apache.shiro.web.servlet.ShiroFilter?.doFilterInternal(ShiroFilter?.java:616)
at org.apache.shiro.web.servlet.OncePerRequestFilter?.doFilter(OncePerRequestFilter?.java:81)
at org.apache.jk.server.JkCoyoteHandler?.invoke(JkCoyoteHandler?.java:190)
at org.apache.jk.common.HandlerRequest?.invoke(HandlerRequest?.java:291)
at org.apache.jk.common.ChannelSocket?.invoke(ChannelSocket?.java:769)
at org.apache.jk.common.ChannelSocket?.processConnection(ChannelSocket?.java:698)
at org.apache.jk.common.ChannelSocket?$SocketConnection?.runIt(ChannelSocket?.java:891)
at java.lang.Thread.run(Thread.java:619)

Changed 3 years ago by t.w.abma@…

  • status changed from accepted to closed
  • component set to Export functionality

Already solved a long while ago.

Note: See TracTickets for help on using tickets.