Opened 16 years ago

Last modified 16 years ago

#1246 closed defect

Annotation importer refuses to skip bad lines — at Version 3

Reported by: Jari Häkkinen Owned by: everyone
Priority: major Milestone: BASE 2.10.1
Component: coreplugins Version: 2.10
Keywords: Cc:

Description (last modified by Martin Svensson)

I have a file (attached) that refuses to import. All lines with valid data is accepted by the importer but line 12 with obvious errors creates the below error. That is fine with me, the error occurs beyond my data, so I set default error handling to skip. Even with skip I get the burp below. Is there a problem with the importer?

net.sf.basedb.core.BaseException: Invalid use of null. The 'value' value cannot be set to null. on line 12 in file 'Labeledextract.txt': C02 ...
at net.sf.basedb.plugins.AbstractFlatFileImporter.doImport(AbstractFlatFileImporter.java:731)
at net.sf.basedb.plugins.AbstractFlatFileImporter.run(AbstractFlatFileImporter.java:468)
at net.sf.basedb.core.PluginExecutionRequest.invoke(PluginExecutionRequest.java:106)
at net.sf.basedb.core.InternalJobQueue$JobRunner.run(InternalJobQueue.java:504)
at java.lang.Thread.run(Thread.java:619)
Caused by: net.sf.basedb.core.InvalidUseOfNullException: Invalid use of null. The 'value' value cannot be set to null.
at net.sf.basedb.core.AbstractQuery.setParameter(AbstractQuery.java:351)
at net.sf.basedb.core.AbstractQuery.setParameter(AbstractQuery.java:366)
at net.sf.basedb.core.ItemQuery.setParameter(ItemQuery.java:40)
at net.sf.basedb.plugins.AnnotationFlatFileImporter.handleData(AnnotationFlatFileImporter.java:750)
at net.sf.basedb.plugins.AbstractFlatFileImporter.doImport(AbstractFlatFileImporter.java:699)
... 4 more

Change History (4)

by Jari Häkkinen, 16 years ago

Attachment: Labeledextract.txt added

Sample file to import annotation to lableled extracts

comment:1 by Nicklas Nordborg, 16 years ago

The error handling code is there, but it seems that it has not been properly initialized. In this case I would also consider this as a bug in the code that is looking up items in the database. I think it should be handled as an empty result and generate an ItemNotFoundException instead of an InvalidUseOfNullException (see line 752-764 in AnnotationFlatFileImporter).

comment:2 by Martin Svensson, 16 years ago

Description: modified (diff)
Status: newassigned
Type: defectenhancement

comment:3 by Martin Svensson, 16 years ago

Description: modified (diff)
Type: enhancementdefect
Note: See TracTickets for help on using tickets.