updating persistence.xml, added HibernateListener and added mysql connector in web.xml