Since you errormessage contains that suspicious extra space at the end:
Unable to resolve name [org.hibernate.dialect.MySQL5Dialect ]
I will take a wild guess that you have an extra space at the end of your dialect property.
So look for
"org.hibernate.dialect.MySQL5Dialect "
and change it to:
"org.hibernate.dialect.MySQL5Dialect"