Reputation: 41
I have problem connect to SQL Server :
In my application.conf
I have:
db.default.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver
db.default.url="jdbc:sqlserver://localhost\\SQLEXPRESS:1433;databaseName=testdb;user=sa;password=***;"
When I run the app I get an error:
play.api.Configuration$$anon$1: Configuration error
[Driver not found: [com.microsoft.sqlserver.jdbc.SQLServerDriver]]
pl help me
Upvotes: 4
Views: 2443
Reputation: 22106
You need to download the official MS SQL Server drivers https://www.microsoft.com/en-us/download/details.aspx?id=11774
And then copy the driver jar sqljdbc4.jar
to the lib folder under project root (as Adam mentioned before).
Upvotes: 0
Reputation: 5224
You need the Sql Server drivers in your classpath. You can do that by creating a lib/ directory and placing the SQL Server driver jar in there, or updating your SBT dependencies. See http://www.playframework.org/documentation/2.0.2/SBTDependencies
Upvotes: 3