----------------------------------------------------------------
BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
WHEN YOU POST, include all relevant version numbers, log files,
and configuration files. Don't make us guess your problem!!!
----------------------------------------------------------------
OK I figured it out.. Of course I have been fiddling with this on and off
when I had time over the last few days. Trying really hard not to ask a
dumb question, given that I have been running on Linux for about year now
without problems. So I posted my question. 15 minutes after I posted this
I worked it out. OF COURSE!!!
Well the short answer is that I had to recompile the source to the odbc
driver. stupid me!
Strange it works on my Linux right outa the box..
:)
Chris
On Tue, 04 Jul 2000 20:42:29 +950, Brevsville Administrator wrote:
>----------------------------------------------------------------
>BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
>WHEN YOU POST, include all relevant version numbers, log files,
>and configuration files. Don't make us guess your problem!!!
>----------------------------------------------------------------
>
>My config:
>
>Apache 1.3.12 Win32
>Jserv 1.1.1
>JSDK2.0
>
>My classpath is correct as reported by
>System.getProperty("java.class.path") called from within the same servlet.
>
>The code I'm using is:
>
> try
> {
> Class.forName("org.gjt.mm.mysql.Driver").newInstance();
> }
> catch(Exception exception) { }
> try
> {
> con = DriverManager.getConnection(BoatsBase.databaseURL,
>username, password);
> }
> catch(Exception e) {
> e.printStackTrace();
> }
>
>Jserv throws:
>
>java.sql.SQLException: No suitable driver
> at java.sql.DriverManager.getConnection(Compiled Code)
> at java.sql.DriverManager.getConnection(DriverManager.java:137)
>
>Which means the driver is not available. I can't see how this could be
>correct, for three reasons:
>
>1) The exact same code runs fine on Linux
>2) The exact same code runs fine on JDK1.2.2 servlet runner.
>3) The exact same code runs fine as a standalone java class.
>
>jserv.properties has:
>
>wrapper.classpath=C:\Program Files\Apache JServ 1.1\ApacheJServ.jar
>wrapper.classpath=c:\jsdk2.0\lib\jsdk.jar
>wrapper.classpath=c:\jbuilder2\lib\mysql_comp.jar
>#wrapper.classpath=c:\jbuilder2\lib\mysql_uncomp.jar
>#wrapper.classpath=c:\download\mm.mysql-2.0.2-bin.jar
>
>(I tried all versions of the mysql jdbc driver jars, all of which operate
>correctly on the servlet runner)
>
>I checked th FAQ.. many times, since it was down a lot of the time.
>
>The rest of the servlet, not accessing the database operates faultlessly..
>so I'm buggered if I know what is up. I'm sure I am missing something
>here, but no idea what.
>
>Anyone got any ideas?
>
>Thanx
>
>Chris
>
>
>
>--
>--------------------------------------------------------------
>Please read the FAQ! <http://java.apache.org/faq/>
>To subscribe: [EMAIL PROTECTED]
>To unsubscribe: [EMAIL PROTECTED]
>Archives and Other: <http://java.apache.org/main/mail.html>
>Problems?: [EMAIL PROTECTED]
>
--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Archives and Other: <http://java.apache.org/main/mail.html>
Problems?: [EMAIL PROTECTED]