Resolved
The problem was in the hibernate mapping file:
Since i was using a url for an online Mysql server, instead of this
<property name="connection.url">
jdbc:mysql://http://url:3306/development</property>
I had to do this and it works fine now
<property name="connection.url">jdbc:mysql://url:3306/development</property>
Thank you