Here is the scenario: ContentHosting is configured to store content in the file system rather than the database; e.g.:
bodyPath@org.sakaiproject.service.legacy.content.ContentHostingService = /mnt/sakai
bodyVolumes@org.sakaiproject.service.legacy.content.ContentHostingService = a01,b01
If for some reason, the file system becomes unavailable to Sakai (e.g. nfs mounted file system is inaccessible) then Sakai must detect the error condition and display an appropriate error message to the user.
As the code stands right now (as of r2433) two very bad things happen:
1) Even though the file could not be created (FileNotFoundException) the row is still insterted into CONTENT_RESOURCE. This must be resolved. As it stands, the user thinks the file has been uploaded successfully when in fact it has not.
2) No error message is ever diaplayed to the end user.
Here is the current exception that gets logged in catalina.out:
WARN: org.sakaiproject.component.legacy.content.DbContentService$DbStorage@1a796c8: failed to write resource: /user/lance/config.xml : java.io.FileNotFoundException: /mnt/sakai/b01/2005/280/15/f1969fdb-d6b5-4d3b-003b-c019ac328237 (No such file or directory) (2005-10-07 10:27:56,996 TP-Processor67_org.sakaiproject.component.framework.log.CommonsLogger)