Opened 14 years ago

Closed 14 years ago

#1246 closed defect (fixed)

Annotation importer refuses to skip bad lines

Reported by: Jari Häkkinen Owned by: Martin Svensson
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

Attachments (1)

Labeledextract.txt (1.7 KB) - added by Jari Häkkinen 14 years ago.
Sample file to import annotation to lableled extracts

Download all attachments as: .zip

Change History (7)

Changed 14 years ago by Jari Häkkinen

Attachment: Labeledextract.txt added

Sample file to import annotation to lableled extracts

comment:1 Changed 14 years ago by Nicklas Nordborg

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 Changed 14 years ago by Martin Svensson

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

comment:3 Changed 14 years ago by Martin Svensson

Description: modified (diff)
Type: enhancementdefect

comment:4 Changed 14 years ago by Martin Svensson

Owner: changed from everyone to Martin Svensson
Status: assignednew

Tested Mylyn plugin for Eclipse but everything wasn't included in the submit.

comment:5 Changed 14 years ago by Martin Svensson

Status: newassigned

comment:6 Changed 14 years ago by Martin Svensson

Resolution: fixed
Status: assignedclosed

(In [4800]) Fixes #1246 Annotation importer refuses to skip bad lines.
Annotationimporter is now handling lines, without a value in the identifier column, as an item not found.

Note: See TracTickets for help on using tickets.