So you have to do this in every servlet??  In the doGet method?

Cheers,

Shaun

-----Original Message-----
From: Alexey Bairov <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
<[EMAIL PROTECTED]>
Date: Monday, July 19, 1999 2:37 PM
Subject: Re: SQL Exception: No suitable driver


>Hello, Shaun,
>
>I was already using JDK 1.2.
>The system works when I put both
>Class.forName(...).newInstance();
>and
>Conn = DriverManager.getConnection(...);
>in one block -- doGet. It os interesting that this doesn`t work when they
>are both placed in init() (still works in servlet exec).
>
>Alex.
>
>
>
>>From: "DD - Shaun Collopy" <[EMAIL PROTECTED]>
>>Reply-To: "Java Apache Users" <[EMAIL PROTECTED]>
>>To: "Java Apache Users" <[EMAIL PROTECTED]>
>>Subject: Re: SQL Exception: No suitable driver
>>Date: Sun, 18 Jul 1999 18:00:36 +0800
>>Alex,
>>
>>I have also experienced this problem, but only with Servlet Exec.  The
>>issue
>>seems to be with JDK1.1.x and Servlet Exec 2.1.  I found that using
Solaris
>>2.5 / JServ / Apache / JDK1.1.7  the problem would only occur after  the
>>ConnectionManger was not accessed for a few days, and would only work
again
>>when the class was touched??  I haven't heard of anyone else having the
>>problem with JServ but the problem was much worse on ServletExec, where
the
>>first servlet would get one connection and then none of the the other
>>servlets using the same ConnectionManager could get a connection.
>>
>>I also was able to get the code running fine with the Servlet Exec
>>debugger.
>>
>>I wrote to Servlet Exec about this and they said it is a known bug.  He
>>suggested 2 solutions, one
>>of which you have already tried:
>>
>>     Use the JDK1.2 to compile and run your servlets OR
>>     Initialise the mysql jdbc driver in the init method of every servlet
>>(quick fix)
>>
>>The support response from Servlet Exec mentioned that upgrading to the
>>JDK1.2,
>>would fix the problem, something to do with problems with
>>the security model in the JDK1.1.X (combined with ServletExec) means that
>>you each servlet requiring a connection through an object such as a
>>Connection Manager or BusinessObject must initialise the driver.
>>
>>Please let me know if you have tried this already.  Our system admin is
>>installing the JDK1.2
>>this weekend which also required an ugrade to 2.6 of solaris.  I am hoping
>>my problem will
>>be fixed by the move to JDK1.2.
>>
>>I would be interested if anyone has found this bug or knows a way to fix
>>it.
>>
>>Regards,
>>
>>Shaun Collopy
>>Web Applications Developer
>>
>>----- Original Message -----
>>From: Alexey Bairov <[EMAIL PROTECTED]>
>>To: <[EMAIL PROTECTED]>
>>Sent: Friday, July 16, 1999 9:55 PM
>>Subject: SQL Exception: No suitable driver
>>
>>
>> > Hello!
>> > Working on NT4.0 // Apache1.3.6 // JServ1.0 // JDK1.2.1
>> > JServ is unable to find/use JDBC driver(org.gjt.mm.mysql.Driver). The
>>above
>> > Exception is thrown by DriverManager.getConnection(). That`s probably
>> > because of paths because thge servlet works under New Atlanta
>>ServletExec
>> > Debugger 2.1b3. I reread all the FAQ concerning this question and still
>> > don`t know how to solve the problem. Help please.
>> >
>> > Alex Bairov.
>> > Java Developer
>> >
>> >
>> > ______________________________________________________
>> > Get Your Private, Free Email at http://www.hotmail.com
>> >
>> >
>> > --
>> > --------------------------------------------------------------
>> > To subscribe:        [EMAIL PROTECTED]
>> > To unsubscribe:      [EMAIL PROTECTED]
>> > READ THE FAQ!!!!     <http://java.apache.org/faq/>
>> > Archives and Other:  <http://java.apache.org/main/mail.html/>
>> > Problems?:           [EMAIL PROTECTED]
>> >
>> >
>>
>>
>>
>>--
>>--------------------------------------------------------------
>>To subscribe:        [EMAIL PROTECTED]
>>To unsubscribe:      [EMAIL PROTECTED]
>>READ THE FAQ!!!!     <http://java.apache.org/faq/>
>>Archives and Other:  <http://java.apache.org/main/mail.html/>
>>Problems?:           [EMAIL PROTECTED]
>>
>
>
>______________________________________________________
>Get Your Private, Free Email at http://www.hotmail.com
>
>
>--
>--------------------------------------------------------------
>To subscribe:        [EMAIL PROTECTED]
>To unsubscribe:      [EMAIL PROTECTED]
>READ THE FAQ!!!!     <http://java.apache.org/faq/>
>Archives and Other:  <http://java.apache.org/main/mail.html/>
>Problems?:           [EMAIL PROTECTED]
>



--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
READ THE FAQ!!!!     <http://java.apache.org/faq/>
Archives and Other:  <http://java.apache.org/main/mail.html/>
Problems?:           [EMAIL PROTECTED]

Reply via email to