2012-02-10 82 views
-2

可能重複:
Cannot create PoolableConnectionFactory (The server version is not supported. The target server must be SQL Server 2000 or later.)服務器版本不受支持。目標服務器必須是SQL Server 2000或更高版本)

org.springframework.jdbc.CannotGetJdbcConnectionException:無法獲取JDBC連接;嵌套異常是org.apache.commons.dbcp.SQLNestedException:無法創建PoolableConnectionFactory(服務器版本不受支持,目標服務器必須是SQL Server 2000或更高版本。) at org.springframework.jdbc.datasource.DataSourceUtils.getConnection( DataSourceUtils.java:82) 在org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:577) 在org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:641) 的組織。 springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:670) 在org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:678) 在org.springframework.jdbc.core.JdbcTemplate.query( JdbcTemplate.java:710) at com.hcl.hips.service.DataService.fetchResults(DataService.java:48) at com.hcl.hips.action.Login.validate(Login.java:109) at com.hcl.hips.action.Login.execute(Login.java:61) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native法) 在sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 在sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 在java.lang.reflect.Method.invoke(Method.java: 597) 在com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:440) 在com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:279) 在com.opensymphony.xwork2.DefaultActionInvocation.invoke( DefaultActionInvocation.java:242) at com.opensymphony。 xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:163) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java: 236) 在com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:249) 在org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68) 在com.opensymphony。 xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236) at com.opensymphony.xwork2.interceptor.Conver sionErrorInterceptor.intercept(ConversionErrorInterceptor.java:122) 在com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236) 在com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195) 在com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236) at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept( Parameters.interval.java:195) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236) at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:148) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation。java:236) at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:93) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236) at org.apache.struts2。 interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:235) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236) at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:89) 在com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236) 在com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:128) 在com.opensymphony.xwork2.DefaultActi onInvocation.invoke(DefaultActionInvocation.java:236) 在org.apache.struts2.interceptor.ProfilingActivationInterceptor.intercept(ProfilingActivationInterceptor.java:104) 在com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236) 在org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:267) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236) at com.opensymphony.xwork2.interceptor.ChainingInterceptor。截距(ChainingInterceptor.java:126) 在com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236) 在com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:138) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236) at com.opensymphony.xwork2.interceptor.I18nInterceptor。截距(I18nInterceptor.java:148) 在com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236) 在org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164) 在融爲一體。 opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236) at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:128) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.jav a:236) at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:176) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236) at org.apache.struts2。 (org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:468) at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations。)。的java:77) 在org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:76) 在org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) 在org.apache.catalina.core.ApplicationFilterC hain.doFilter(ApplicationFilterChain.java:206) 在net.sf.j2ep.ProxyFilter.doFilter(ProxyFilter.java:91) 在org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) 在org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.hcl.hips.action.LoginFilter.doFilter(LoginFilter.java:110) at org.apache.catalina.core.ApplicationFilterChain。 internalDoFilter(ApplicationFilterChain.java:235) 在org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) 在org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) 在org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve。的java:191) 在org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) 在org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) 在org.apache。 catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) 在org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) 在org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor。 Java的:859) 在org.apache.coyote.http11.Http11AprProtocol $ Http11ConnectionHandler.process(Http11AprProtocol.java:574) 在org.apache.tomcat.util.net.AprEndpoint $ Worker.run(AprEndpoint.java:1527) at java.lang.Thread.run(Thread.java:619) 引起:org.apache.commons.dbcp.SQLNestedException:Can not創建PoolableConnectionFactory(服務器版本不受支持。目標服務器必須是SQL Server 2000或更高版本。) at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1225) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java: 880) 在org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:113) 在org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:79) ... 79更 引起通過: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。(Unknown Source) at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(Unknown Source) at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(Unknown Source) at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory。 java:38) at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:294) at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1247) at org.apache。 commons.dbcp.BasicDataSource.create DataSource(BasicDataSource.java:1221) ... 82更多

+0

請幫助我與上述錯誤..我無法找到相同的解決方案...正如它說我把我的sqljdbc.jar文件更改爲sqljdbc4.jar ..仍然問題continuesss ... :( – user1168992 2012-02-10 10:30:19

+0

嗨 - 這不足以幫助我們,你在做什麼?你有什麼服務器?你真的在運行SQL Server 6.5或7嗎?其實我發現了昨天的問題:請去編輯它,而不是張貼一個新的。謝謝! – Rup 2012-02-10 10:30:30

回答

0

檢查您的applicationcontext.xml並確保您已包含所有JAR文件。

+0

感謝您的輸入abhisek .....應用程序context.xml是定義好,我已經加載了所有支持sql server的jar。仍然問題繼續 – user1168992 2012-02-10 11:00:16

+0

請顯示你的applicationcontext.xml和類在哪裏你使用連接 – Abhij 2012-02-10 12:37:46

相關問題