Cant connect to SQL server with jtds 1.2.2

What i did was to add

commons-dbcp-1.2.2.jar
commons-pool-1.4.jar
commons-collections-3.2.1.jar - already added initially

to the class path of the application and tomcat

and add factory="org.apache.commons.dbcp.BasicDataSourceFactory" as can be seen below
  1.     <Resource name="jdbc/PooledDS2" auth="Container" type="javax.sql.DataSource"    
  2.         factory="org.apache.commons.dbcp.BasicDataSourceFactory"  
  3.        maxActive="100" maxIdle="30" maxWait="10000"  
  4.        username="***" password="***" driverClassName="net.sourceforge.jtds.jdbc.Driver"  
  5.        url="jdbc:jtds:sqlserver://<>:1433/<>"/>  


to the context.

I got the solution thanks to the 2 topics below

http://www.coderanch.com/t/87782/Tomcat/One-resources-defined-context-xml#470239
http://forums.sun.com/thread.jspa?threadID=635640

posted on 2009-02-24 15:43  Squall  阅读(382)  评论(0编辑  收藏  举报

导航