hibernate程序的异常:java.lang.UnsupportedOperationException: The user must supply a JDBC connection
hibernate程序的异常:java.lang.UnsupportedOperationException: The user must supply a JDBC connection
在使用JPA时请注意,Hibernate 3.x和4.x具有不同的语法,如下所述(在将Hibernate 4.x降级到3.x时将其命中)。
更改如下(Hibernate 4.x语法):
<properties>
<property name="javax.persistence.jdbc.driver" value="..."/>
<property name="javax.persistence.jdbc.url" value="..."/>
<property name="javax.persistence.jdbc.user" value="..."/>
<property name="javax.persistence.jdbc.password" value="..."/>
</properties>
使用(Hibernate 3.x语法):
<properties>
<property name="hibernate.connection.driver_class" value="..."/>
<property name="hibernate.connection.url" value="..."/>
<property name="hibernate.connection.username" value="..."/>
<property name="hibernate.connection.password" value="..."/>
</properties>