I am trying to replace PostgreSQL in my application with MySQL. I thought that it should be sufficient to replace the <properties> in persistence.xml file:
PostgreSQL:
<property name="hibernate.connection.url" value="jdbc:postgresql://localhost/postgres"/>
<property name="hibernate.connection.username" value=""/>
<property name="hibernate.connection.password" value=""/>
<property name="hibernate.connection.driver_class" value="org.postgresql.Driver"/>
<property name="hibernate.show_sql" value="true"/>
MySQL:
<property name="hibernate.connection.driver_class" value="com.mysql.jdbc.Driver"/>
<property name="hiberante.connection.url" value="jdbc:mysql://localhost:3306/GoOut2"/>
<property name="hibernate.connection.username" value=""/>
<property name="hibernate.connection.password" value=""/>
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/>
<property name="hibernate.hbm2ddl.auto" value="update"/>
But with this replacement, I amg getting
java.lang.UnsupportedOperationException: The application must supply JDBC connections
I am not sure what I am doing wrong, I just hoped that the replacement would be straightforward. In PostgreSQL, everything works correctly.
Persistence.xml: https://gist.github.com/2252443
applicationContext.xml: https://gist.github.com/2252463
exception: https://gist.github.com/2252487
Thanks!
EDIT: I remove username and password from the given code intentionally.