X
_XaToA_
Hello i am trying for using the Tomcat database conecition pool (dbcp)
against one SQL SERVER 2000 but i cannot connect always appears this error:
DBCP borrowObject failed: java.sql.SQLException: [Microsoft][SQLServer 2000
Driver for JDBC]Unable to connect. Invalid URL.
org.apache.commons.dbcp.DbcpException
: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Unable
to connect. Invalid URL
in the server.xml i have:
<Context path="" docBase="" reloadable="true" crossContext="true">
<Resource name="jdbc/DB" auth="Container" type="javax.sql.DataSource"/>
<ResourceParams name="jdbc/DB">
<parameter>
<name>factory</name>
<value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
</parameter>
<parameter>
<name>driverClassName</name>
<value>com.microsoft.jdbc.sqlserver.SQLServerDriver</value>
</parameter>
<parameter>
<name>url</name>
<value>jdbc:microsoft:sqlserver://192.168.0.12:1433/Northwind</value>
</parameter>
<parameter>
<name>username</name>
<value>sa</value>
</parameter>
<parameter>
<name>password</name>
<value>sa</value>
but i cannot connect, the error appears when i make:
conn=ds.getConnection();
can anybody helps me?
this question is very important for my job.
Please help me.
Thanks
against one SQL SERVER 2000 but i cannot connect always appears this error:
DBCP borrowObject failed: java.sql.SQLException: [Microsoft][SQLServer 2000
Driver for JDBC]Unable to connect. Invalid URL.
org.apache.commons.dbcp.DbcpException
: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Unable
to connect. Invalid URL
in the server.xml i have:
<Context path="" docBase="" reloadable="true" crossContext="true">
<Resource name="jdbc/DB" auth="Container" type="javax.sql.DataSource"/>
<ResourceParams name="jdbc/DB">
<parameter>
<name>factory</name>
<value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
</parameter>
<parameter>
<name>driverClassName</name>
<value>com.microsoft.jdbc.sqlserver.SQLServerDriver</value>
</parameter>
<parameter>
<name>url</name>
<value>jdbc:microsoft:sqlserver://192.168.0.12:1433/Northwind</value>
</parameter>
<parameter>
<name>username</name>
<value>sa</value>
</parameter>
<parameter>
<name>password</name>
<value>sa</value>
but i cannot connect, the error appears when i make:
conn=ds.getConnection();
can anybody helps me?
this question is very important for my job.
Please help me.
Thanks