tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Turner, John" <JTur...@AAS.com>
Subject RE: Microsoft SQL Server 2000 Driver for JDBC Errors
Date Mon, 24 Jun 2002 11:56:57 GMT

I'm using the driver straight from a servlet class without any problems.

I don't think your driverName parameter should have the complete URL string
in it...shouldn't it just be "com.microsoft.jdbc.sqlserver.SQLServerDriver"
?? 

I would also try putting the actual hostname in there (like "MYCOMPUTER")
instead of "localhost".  It shouldn't matter, but from what I can tell so
far, the driver is fairly picky.  Have you tried the driver against a
database on another machine, other than localhost?  Do you get the same
error?

HTH

John Turner
jturner@NOSPAM.aas.com

-----Original Message-----
From: Mark A. Richman [mailto:mark@markrichman.com]
Sent: Saturday, June 22, 2002 10:08 AM
To: tomcat-user@jakarta.apache.org
Subject: Microsoft SQL Server 2000 Driver for JDBC Errors


I am trying to use the JDBC driver with Apache Tomcat 4.0 (JDK 1.4).
Here is
my context configuration for the Datasource from server.xml:

<Context path="/admin" docBase="admin" debug="0" privileged="true">
     <Resource name="jdbc/DremiaDS" auth="SERVLET"
type="javax.sql.DataSource"/>
     <ResourceParams name="jdbc/DremiaDS">
      <parameter>
       <name>User</name>
       <value>sa</value>
      </parameter>
      <parameter>
       <name>Password</name>
       <value>mypassword</value>
      </parameter>
      <parameter>
       <name>DatabaseName</name>
       <value>Dremia</value>
      </parameter>
      <parameter>
       <name>ServerName</name>
       <value>localhost</value>
      </parameter>
      <parameter>
       <name>driverClassName</name>
       <value>com.microsoft.jdbc.sqlserver.SQLServerDriver</value>
      </parameter>
      <parameter>
       <name>driverName</name>

<value>jdbc:microsoft:sqlserver://localhost:1433;ServerName=localhost;Da
taba
seName=Dremia;User=sa;Password=mypassword</value>
      </parameter>
      <parameter>
       <name>maxActive</name>
       <value>8</value>
      </parameter>
      <parameter>
       <name>maxIdle</name>
       <value>4</value>
      </parameter>
     </ResourceParams>
    </Context>

When attempting to access the database, I get the following error:

Debug: SQL Exception:
Debug: State  : 28000
Debug: Message: [Microsoft][SQLServer 2000 Driver for
JDBC][SQLServer]Login
failed for user 'sa'.
Debug: Error  : 18456
Debug: State  : 08001
Debug: Message: [Microsoft][SQLServer 2000 Driver for JDBC]An error
occured
while attempting to log onto the database.
Debug: Error  : 0

I am running SQL Server 2000 SP2 with security set to "SQL Server and
Windows". This drivers seems to work fine from Forte CE as well.

Can someone lend a hand?

Thanks,
Mark A. Richman



Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message