想使用MSSQL服務器遊戲框架,在我application.confPlayFramework MSSQL數據庫錯誤
db.url=jdbc:microsoft:sqlserver://localhost\SQL2008:1433;DatabaseName=testDB
db.driver=com.microsoft.jdbc.sqlserver.SQLServerDriver
db.user=sa
db.pass=sa
正在此提示以下錯誤:
Database error
A database error occured : Cannot connected to the database, [Microsoft][SQLServer
2000 Driver for JDBC]Error establishing socket.
play.exceptions.DatabaseException: Cannot connected to the database, [Microsoft]
[SQLServer 2000 Driver for JDBC]Error establishing socket.
at play.db.DBPlugin.onApplicationStart(DBPlugin.java:132)
at play.plugins.PluginCollection.onApplicationStart(PluginCollection.java:425)
at play.Play.start(Play.java:495)
at play.Play.detectChanges(Play.java:599)
at play.Invoker$Invocation.init(Invoker.java:186)
at Invocation.HTTP Request(Play!)
Caused by: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error
establishing socket.
at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source)
at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
at com.microsoft.jdbc.sqlserver.tds.TDSConnection.<init>(Unknown Source)
at com.microsoft.jdbc.sqlserver.SQLServerImplConnection.open(Unknown Source)
at com.microsoft.jdbc.base.BaseConnection.getNewImplConnection(Unknown Source)
我已經加入到sqljdbc4.jar lib文件夾。 甚至嘗試使用mssqlserver.jar,msutil.jar,msbase.jar
您應該使用雙引號括住每個鍵的值(例如:'db.default.driver =「net.sourceforge.jtds.jdbc.Driver」') – 2016-09-01 23:34:22