sql server - playframework 2.X JPA to MSSQL Unable to build Hibernate SessionFactory -
i want using jpa connect mssql,using sample computer-database-jpa can access h2 sql ,but when change mssql ,it's put error message "persistenceexception: [persistenceunit: defaultpersistenceunit] unable build hibernate sessionfactory" can me thanks!
my application.conf
# database configuration # ~~~~~ # can declare many datasources want. # convention, default datasource named `default` db.default.driver=net.sourceforge.jtds.jdbc.driver db.default.url="jdbc:jtds:sqlserver://127.0.0.1:1433;databasename=tcgw;selectmethod=cursor:sendstringasunicode=true" db.default.user=qqqq db.default.password=qqqq #db.default.driver=org.h2.driver #db.default.url="jdbc:h2:mem:play" db.default.jndiname=defaultds applyevolutions.default=true hibernate.use_sql_comments=true
my persistence.xml
<persistence-unit name="defaultpersistenceunit" > <provider>org.hibernate.ejb.hibernatepersistence</provider> <non-jta-data-source>defaultds</non-jta-data-source> <properties> <!-- <property name="hibernate.dialect" value="org.hibernate.dialect.h2dialect"/> --> <property name="hibernate.dialect" value="org.hibernate.dialect.sqlserverdialect"/> </properties> </persistence-unit>
Comments
Post a Comment