You said that the dabase structure is the same, as you can see on attached file the two structure are different..
V4 has two tables more
Anyway, i've fixed my live install with JM 3.3.1 and Joomdoc 4.0.2, to solve permission problem i've open and salve all my documents one at a time and set the right permission because global does'nt work
If you need to do some test about v3 to v4 migration i can send you a backup of my previous site based on JM 2.5 and JoomDoc 3.4
let me see..