At 12:47 +0100 21/02/04, Juraj Lenharcik wrote:
You have to put yout jdbc driver to web-inf/lib of your application.

That's the way it was initially. Here's the log output with it there:

DriverManager.initialize: jdbc.drivers = null
JDBC DriverManager initialized
registerDriver: driver[className=com.sybase.jdbc2.jdbc.SybDriver,[EMAIL PROTECTED]
registerDriver: driver[className=com.sybase.jdbc2.jdbc.SybDriver,[EMAIL PROTECTED]
DriverManager.deregisterDriver: [EMAIL PROTECTED]
DriverManager.getConnection("jdbc:sybase:Tds:202.89.155.78:5000/Orca")
skipping: driver[className=com.sybase.jdbc2.jdbc.SybDriver,[EMAIL PROTECTED]
getConnection: no suitable driver
java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getConnection(DriverManager.java:532)
at java.sql.DriverManager.getConnection(DriverManager.java:140)
at org.apache.xalan.lib.sql.DefaultConnectionPool.createConnection(DefaultConnectionPool.java:442)
at org.apache.xalan.lib.sql.DefaultConnectionPool.getConnection(DefaultConnectionPool.java:336)
at <my servlet>


-----Urspr�ngliche Nachricht-----
Von: Advent Information Systems [mailto:[EMAIL PROTECTED]
Gesendet: Samstag, 21. Februar 2004 03:55
An: [EMAIL PROTECTED]
Betreff: Need help using the SQL extension in a servlet.


I have an HTTP servlet (under Tomcat under JDK 1.4.2) that uses XSLT to transform a request into the appropriate response. That all works fine.

But, I now want to use the SQL extension, and I keep getting the "No
suitable driver" exception.

Among other things, I've tried using JDK 1.3.1 instead; I've tried
moving the driver to the JRE extensions directory; I've tried putting
-Djdbc.drivers=com.sybase.jdbc2.jdbc.SybDriver in the Java command
line; and none of these seem to make any difference.

Has ANYONE successfully used the SQL extension in a servlet?

Here's the setLogWriter output from java.sql.DriverManager:

DriverManager.initialize: jdbc.drivers =
com.sybase.jdbc2.jdbc.SybDriver
DriverManager.Initialize: loading com.sybase.jdbc2.jdbc.SybDriver
JDBC DriverManager initialized
registerDriver:
driver[className=com.sybase.jdbc2.jdbc.SybDriver,com.sybase.jdbc2.jdbc.SybD
[EMAIL PROTECTED]
registerDriver:
driver[className=com.sybase.jdbc2.jdbc.SybDriver,com.sybase.jdbc2.jdbc.SybD
[EMAIL PROTECTED]
DriverManager.deregisterDriver: [EMAIL PROTECTED]
DriverManager.getConnection("jdbc:sybase:Tds:202.89.155.78:5000/Orca")
     skipping:
driver[className=com.sybase.jdbc2.jdbc.SybDriver,com.sybase.jdbc2.jdbc.SybD
[EMAIL PROTECTED]
getConnection: no suitable driver
java.sql.SQLException: No suitable driver
        at java.sql.DriverManager.getConnection(DriverManager.java:532)
        at java.sql.DriverManager.getConnection(DriverManager.java:140)
        at
org.apache.xalan.lib.sql.DefaultConnectionPool.createConnection(DefaultConn
ectionPool.java:442)
        at
org.apache.xalan.lib.sql.DefaultConnectionPool.getConnection(DefaultConnect
ionPool.java:336)
        at <my code in the servlet, doing a getConnection to test the
connection pool>

BTW, I have no idea where the deregisterDriver call is coming from. Might that be the problem?

TIA for whatever help anyone can give me with this.  I'm basically
dead in the water until this problem gets fixed.

-- Richard Grossman
    AIS Ltd.



Reply via email to