Also you are using the right driver.

Nicholas Orr

-----Original Message-----
From: Nicholas Orr [mailto:Nicholas.Orr@;mim.com.au] 
Sent: Wednesday, 6 November 2002 2:11 PM
To: 'Tomcat Users List'
Subject: RE: JDBC Error with Tomcat 4.0.6


I've had this error and it means:
1) SQL Server can't find the machine where sql server is running or
2) SQL Server can't connect to the port you have given it.

So there is something wrong with this

sqlserver://vc34:1433

Go to your SQL Server machine, and run "Client Network Utility" can be found
under start>Programs>Microsoft SQL Server.  Make sure TCP/IP is in the right
hand column (enable) and have a look at its properties, this is the port SQL
Server is listening on for TCP/IP connections. 

Now you know for sure which port SQL Server is running on.

Now you need to go to your Tomcat box and make sure you can ping the SQL
Server box.  If you can't then check out your network connectivity issues.
Else make sure your SQL Server box is called what you think its called. To
do this,

Go back to your SQL Server box and get your "System Properties" up,
(Start>Control Panel>System) then on the Network Tab see what the computer
is called.

I now I have been very simplistic assuming you don't know anything, but I
assure you I only did this because I don't know what you know, and plz don't
think I think you're an idiot because I don't.

Hope this has been helpful,

Nicholas Orr

-----Original Message-----
From: John Mattos [mailto:mattosj@;yahoo.com] 
Sent: Tuesday, 5 November 2002 11:23 PM
To: [EMAIL PROTECTED]
Subject: JDBC Error with Tomcat 4.0.6



All,

I need a little help with this one. I'm porting an app to Tomcat 4.0.6 from
WebSphere 4.03 and I'm getting a JDBC Error, 

java.sql.SQLException: [Microsoft][SQLServer JDBC Driver]Error establishing
socket.

I've included a bit about my app to see if anyone can help me figure out
where my misconfiguration is.

Am I using the right driver for SQL Server 2000? (I'm using msutil.jar,
mssqlserver.jar and msbase.jsr, the native drivers) Should I be using a
different class? Is my JDBC URL not formed properly? 

I guess I need help from a SQL Server/Tomcat guru...

Thanks!

John 

Server.xml file snippet : 
<ResourceParams name="jdbc/indemand">
         <parameter>
           <name>validationQuery</name>
           <value>select top 100 * from Subscriber</value>
         </parameter>
         <parameter>
           <name>url</name>
 
<value>jdbc:microsoft:sqlserver://vc34:1433;databaseName=TibcoClearHouse</va
lue>
         </parameter>
         <parameter>
           <name>password</name>
           <value>tibco_pass</value>
         </parameter>
         <parameter>
           <name>maxActive</name>
           <value>12</value>
         </parameter>
         <parameter>
           <name>maxWait</name>
           <value>5000</value>
         </parameter>
    <parameter>
            <name>driverClassName</name>
            <value>com.microsoft.jdbc.sqlserver.SQLServerDriver</value>
    </parameter>
         <parameter>
           <name>username</name>
           <value>tibco_user</value>
              </parameter>
</ResourceParams>

Web.xml file snippet:
  <resource-ref>
      <description>DB Connection</description>
      <res-ref-name>jdbc/indemand</res-ref-name>
      <res-type>javax.sql.DataSource</res-type>
      <res-auth>Container</res-auth>
  </resource-ref>

Partial Stack trace:
java.sql.SQLException: [Microsoft][SQLServer JDBC Driver]Error establishing
socket.
        at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown
Source)
        at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown
Source)
        at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown
Source)
        at com.microsoft.jdbc.sqlserver.tds.TDSConnection.<init>(Unknown
Source)
        at com.microsoft.jdbc.sqlserver.SQLServerImplConnection.open(Unknown
Source)
        at
com.microsoft.jdbc.base.BaseConnection.getNewImplConnection(Unknown Source)
        at com.microsoft.jdbc.base.BaseConnection.open(Unknown Source)
        at com.microsoft.jdbc.base.BaseDriver.connect(Unknown Source)
        at java.sql.DriverManager.getConnection(DriverManager.java:512)
        at java.sql.DriverManager.getConnection(DriverManager.java:140)
        at
com.thoughtworks.util.pool.JDCConnectionPool.getConnection(JDCConnectionPool
.java:174)
        at
com.thoughtworks.clearinghouse.util.ConnectionFactory.createConnectionForTib
co(ConnectionFactory.java:59)
        at
com.thoughtworks.clearinghouse.util.ConnectionFactory.createConnection(Conne
ctionFactory.java:40)
        at
com.thoughtworks.clearinghouse.util.DatabaseUtility.getUserByName(DatabaseUt
ility.java:123)



---------------------------------
Do you Yahoo!?
HotJobs - Search new jobs daily now


**********************************************************************
The information contained in this e-mail is confidential and is intended
only for the use of the addressee(s). If you receive this e-mail in error,
any use, distribution or copying of this e-mail is not permitted. You are
requested to forward unwanted e-mail and address any problems to the MIM
Holdings Limited Support Centre.

For general enquires:   ++61 7 3833 8000
Support Centre e-mail:  [EMAIL PROTECTED]
Support Centre phone:   Australia 1800500646
                                        International ++61 7 38338042
**********************************************************************


--
To unsubscribe, e-mail:
<mailto:tomcat-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail:
<mailto:tomcat-user-help@;jakarta.apache.org>

--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@;jakarta.apache.org>

Reply via email to