ERROR using the tomcat db connection pool against one SQL SERVER 200 database. Please help me

Discussion in 'Java' started by _XaToA_, Oct 30, 2003.

  1. _XaToA_

    _XaToA_ Guest

    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
     
    _XaToA_, Oct 30, 2003
    #1
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.