could you paste complete error log
There is a duplicate primary key in the FileDocument entity, but Mendix needs this to be unique.
This is something that is generated automatically by the Mendix system, so it looks like the duplicate is being created before the first is committed. How do you create and commit the objects?