Midtier 5.1.2 doesn't run with Java SDK 5
Additionally, your Midtier directory should allow the Web user to write/read the MT files and servlet engine class files. armidtier.log should help you to find the problem. Finally, a better choice is upgrade to MT 6.3.0.13

for a better performance and still compatible with ARS 5.1.2