On Wed, 6 Jan 1999, Ben Newman wrote:

> I'm having a problem with servlets that use JDBC.  I have a servlet that
> runs a simple query and returns some rows.  As a stand alone app it works
> just fine, but when I switch it over to run as a servlet I get a Error
> Connection: java.sql.SQLException: No suitable driver message.  At first I
> though it was CLASSPATH problem, but I returned the CLASSPATH along with
> the error message and the jar file for the jdbc driver is listed.  I know
> the URL is correct because like I said it works just fine as a stand alone
> app.  Any idea what might be the problem?  I'm running Informix-SE under
> Caldera Linux with jdk 1.1.7.  
> 

I believe there is a requirement in jdk1.1 that any class using a native
library must be loaded by the jdk classloader. This means that you may
need to have your servlet in the classpath and not in "ServletAlias"
(assuming apache + mod_jserv, which uses a special classloader to detect
updated classes) if the driver uses native code.

I remember falling into this a while back. Other problems you may have
(that I have had anyway :) is the path to the library and/or other
environment variables.


Btw, if you are using jserv and apache you should perhaps go to:
http://java.apache.org/

There used to be a FAQ there that may answer your question (now they've
redesigned the pages and I can no longer find it :).

/Urban

---
Urban Widmark                           [EMAIL PROTECTED]
Svenska Test AB                         +46 90 71 71 23

Reply via email to