私のアプリケーションでPostgreSQLをMySQLに置き換えようとしています。JPA/HibernateはPostgresqlで動作しますが、Mysqlでは動作しません
の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:私はpersistence.xmlのファイルに<properties>
を交換するために十分なものでなければならないと考え、私が取得しAMG
<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"/>
しかし、この交換に
java.lang.UnsupportedOperationException: The application must supply JDBC connections
私は何が間違っているのか分かりません。交換は簡単であろう。 PostgreSQLでは、すべて正常に動作します。
のpersistence.xml:https://gist.github.com/2252443
applicationContext.xmlを:https://gist.github.com/2252463
例外:https://gist.github.com/2252487
ありがとう!
編集: 私は意図的に与えられたコードからユーザー名とパスワードを削除します。
セッションファクトリの起動メッセージも投稿できますか? – araqnid
mysqlワークベンチから指定された資格情報で接続できますか? –