Did you pull those SQLs from another similar post? If so, it might be helpful to everyone to consolidate similar questions, rather than asking independent questions in a single thread.
The error Call to a member function getFileId() on null in .../lib/pkp/classes/file/SubmissionFileManager.inc.php:184 is also mentioned in:
and
and
In this last thread, the user reports that this was found to be an issue with missing supplementary files on the server.