I am trying to establish a connection pool in Tomcat 4.1 to SQL Server
2000.  Looking at the SQL Server trace utility, it appears Tomcat
connects with the correct username/password and then the following
exception is thrown:

 

java.lang.UnsupportedOperationException at
org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSourc
e.java:161).
 
I have taken the following steps:
 
1)        Moved the driver jar files to /common/lib/
2)        Modified the Server.xml file
3)        Modified the web.xml file of the application
 
Here is my Server.xml entry:
 
<DefaultContext>
<Resource name="jdbc/test" auth="Container"
type="javax.sql.DataSource"/>
<ResourceParams name="jdbc/test">
<parameter>
<name>driverClassName</name>
<value>com.microsoft.jdbc.sqlserver.SQLServerDriver</value>
</parameter>
<parameter>
<name>url</name>
<value>jdbc:microsoft:sqlserver://localhost:1433</value>
</parameter>
<parameter>
<name>username</name>
<value>jay</value>
</parameter>
<parameter>
<name>password</name>
<value>jay</value>
</parameter>
<parameter>
<name>maxActive</name>
<value>20</value>
</parameter>
<parameter>
<name>maxIdle</name>
<value>10</value>
</parameter>
<parameter>
<name>maxWait</name>
<value>100</value>
</parameter>
</ResourceParams>
</DefaultContext>
 
Here is my entry in the web.xml file:
 
<resource-ref>
<description>DB Connection</description>
<res-ref-name>jdbc/test</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth> 
</resource-ref>
 
Are any additional entries needed?  Any help would be greatly
appreciated!

 

Thanks,

Jay Johnson

Reply via email to