用的是sql server 2008数据库。代码应该没有问题的呀。
异常:- com.microsoft.sqlserver.jdbc.SQLServerException: 不支持此服务器版本。目标服务器必须是 SQL Server 2000 或更高版本。
- at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(Unknown Source)
- at com.microsoft.sqlserver.jdbc.DBComms.Prelogin(Unknown Source)
- at com.microsoft.sqlserver.jdbc.DBComms.<init>(Unknown Source)
- at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(Unknown Source)
- at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(Unknown Source)
- at java.sql.DriverManager.getConnection(DriverManager.java:582)
- at java.sql.DriverManager.getConnection(DriverManager.java:185)
- at com.connAccess.DB.DBConnAccess.getConn(DBConnAccess.java:17)
- at com.ZuanJingMO.login.login.doPost(login.java:54)
- at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
- at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
- at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
- at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
- at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
- at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
- at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
- at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
- at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
- at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
- at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
- at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
- at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
- at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
- at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
- at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
- at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
- at java.lang.Thread.run(Thread.java:619)
复制代码 |