MySQL의 응용 프로그램에서 PostgreSQL을 대체하려고합니다.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 workbench에서 연결할 수 있습니까? –