0

をHibernateは、私が取得していますこのURLを使用してsqljdbc_auth.dllライブラリとイム:SQL ServerのWindows認証およびWindows認証とSQL Serverには、Hibernate 4.3を使用して、接続しようとすると

jdbc:sqlserver://localhost:1433;databaseName=WIN_AUTHDB;integratedSecurity=true 

私はエンティティマネージャファクトリを作成するために使用していたパラメータは次のとおりです。

properties.put("background-validation", "true"); 
properties.put("hibernate.c3p0.idle_test_period", "3600"); 
properties.put("hibernate.hbm2ddl.auto", "update"); 
properties.put("hibernate.max_fetch_depth", "3"); 
properties.put("hibernate.connection.driver_class", "com.microsoft.sqlserver.jdbc.SQLServerDriver"); 
properties.put("hibernate.connection.url","jdbc:sqlserver://localhost:1433;databaseName=WIN_AUTHDB;integratedSecurity=true"); 

何か不足していますか?おそらく、DLLがロードされていないのでしょうか?

Persistence.createEntityManagerFactory("instanceTest", initProperties(properties)); 

データベースが正しく構成されているため、SQL Server管理でWindows認証を使用して接続しています。また、以前のテストでは、休止状態のないドライバを使用してデータベースを作成しました。

ありがとうございます。これらに伴い

答えて

0

を追加!

私は思ったよりずっと簡単です。 mavenプロジェクトをコンパイルするとき、私は意図せずにpersistence.xmlファイルを削除していました。なぜなら、戦争で永続性プロバイダを見つけられなかったからです。

0

、以下のプロパティ

解決
properties.put("hibernate.dialect", "org.hibernate.dialect.SQLServerDialect"); 
+0

同じ結果です。まだ動かない –

関連する問題