Note that there are some explanatory texts on larger screens.

plurals
  1. POJPA/Hibernate works with Postgresql, but not with Mysql
    primarykey
    data
    text
    <p>I am trying to replace PostgreSQL in my application with MySQL. I thought that it should be sufficient to replace the <code>&lt;properties&gt;</code> in persistence.xml file:</p> <p>PostgreSQL:</p> <pre><code>&lt;property name="hibernate.connection.url" value="jdbc:postgresql://localhost/postgres"/&gt; &lt;property name="hibernate.connection.username" value=""/&gt; &lt;property name="hibernate.connection.password" value=""/&gt; &lt;property name="hibernate.connection.driver_class" value="org.postgresql.Driver"/&gt; &lt;property name="hibernate.show_sql" value="true"/&gt; </code></pre> <p>MySQL:</p> <pre><code>&lt;property name="hibernate.connection.driver_class" value="com.mysql.jdbc.Driver"/&gt; &lt;property name="hiberante.connection.url" value="jdbc:mysql://localhost:3306/GoOut2"/&gt; &lt;property name="hibernate.connection.username" value=""/&gt; &lt;property name="hibernate.connection.password" value=""/&gt; &lt;property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/&gt; &lt;property name="hibernate.hbm2ddl.auto" value="update"/&gt; </code></pre> <p>But with this replacement, I amg getting </p> <pre><code>java.lang.UnsupportedOperationException: The application must supply JDBC connections </code></pre> <p>I am not sure what I am doing wrong, I just hoped that the replacement would be straightforward. In PostgreSQL, everything works correctly.</p> <p>Persistence.xml: <a href="https://gist.github.com/2252443" rel="nofollow">https://gist.github.com/2252443</a></p> <p>applicationContext.xml: <a href="https://gist.github.com/2252463" rel="nofollow">https://gist.github.com/2252463</a></p> <p>exception: <a href="https://gist.github.com/2252487" rel="nofollow">https://gist.github.com/2252487</a></p> <p>Thanks!</p> <p>EDIT: I remove username and password from the given code intentionally.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload