Opened 9 years ago

Last modified 9 years ago

#1978 closed defect

Permission denied on existing when running batch importer in 'create' mode — at Version 1

Reported by: Nicklas Nordborg Owned by: everyone
Priority: minor Milestone: BASE 3.7
Component: coreplugins Version:
Keywords: Cc:

Description (last modified by Nicklas Nordborg)

There seems to be a problem with batch item importers that may result in a PermissionDeniedException when running the batch importer in 'create' mode. If the importer finds an existing item that the logged in user doesn't have write permission to it stops with an error:

net.sf.basedb.core.BaseException: Permission denied: Not allowed to write Physical bioassay[Name=Hybridization A.00h] on line 5 in file 'physicalbioassay_out.txt': Hybridization A.0...
  at net.sf.basedb.plugins.AbstractFlatFileImporter.doImport(AbstractFlatFileImporter.java:720)
  at net.sf.basedb.plugins.AbstractFlatFileImporter.run(AbstractFlatFileImporter.java:451)
  at net.sf.basedb.core.PluginExecutionRequest.invoke(PluginExecutionRequest.java:116)
  at net.sf.basedb.core.InternalJobQueue$JobRunner.run(InternalJobQueue.java:572)
  at java.lang.Thread.run(Unknown Source)
Caused by: net.sf.basedb.core.PermissionDeniedException: Permission denied: Not allowed to write Physical bioassay[Name=Hybridization A.00h]
  at net.sf.basedb.plugins.batchimport.AbstractItemImporter.handleData(AbstractItemImporter.java:705)
  at net.sf.basedb.plugins.AbstractFlatFileImporter.doImport(AbstractFlatFileImporter.java:685)
  ... 4 more

Write permission should not be required since the importer is not going to update the item. IT doesn't help to set the 'Item already exists' option to 'skip'.

This issue was found in the physical bioassay importer but since it happens in the generic base class (AbstractItemImporter) it is probably present in all batch item importers.

Change History (1)

comment:1 by Nicklas Nordborg, 9 years ago

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