From: Nat Howard <nrh@pupworks.com>
To: pmount@retep.org.uk
To: Georg.Ritter@uibk.ac.at
To: pgsql-interfaces@hub.org
Subject: RE: [INTERFACES] still the driver and IE5 problem
Date: Thu, 09 Sep 1999 20:00:35 -0400
Message-ID: <199909100000.UAA11264@spot.pupworks.com> (raw)
Apologies if this comes to late for some.
Using the 6.5.1 postgrsql release under FreeBSD and IE4, using jdk 1.1.8,
I ran into the same problem that Georg Ritter ran into:
>From: Georg Ritter [mailto:Georg.Ritter@uibk.ac.at]
>Sent: Tuesday, June 15, 1999 2:32 PM
>To: pgsql-interfaces@hub.org
>Subject: [INTERFACES] still the driver and IE5 problem
>
>
>Hi,
>
>I tried out the new driver ( thanks Pete! ) but - I am sorry
>that I must tell - it still does not work.
>
>Interesting is: The M$-VM seems to find the driver
>(status bar shows "loading Driver.class") but does not recog.
>it as suitable. (SQLEx: No suitable driver found)
>
>I will now try a combination of IE4 + SUNs Plugin and report.
>
>I still would be pleased if anyone knows a solution. Time is
>passing by .. :-) and the system should go public at the end
>of the week.
>
>Greetings from Austria
>
> Georg Ritter
>
>
A little web searching turned up an answer that works for
me (at least with IE4) at:
http://www.software.ibm.com/data/db2/java/v5/faq.html#q7
An excerpt:
Even if the driver is loaded properly, it may not be initialized.
This can happen if the Java interpreter does not automatically
initialize one the "DB2Driver"
classes upon loading. Some recent versions of the JDK for AIX
and OS/2 have this problem. For these, the usual
Class.forName("COM.ibm.db2.jdbc.app.DB2Driver");
is not enough. One has to use:
Class.forName("COM.ibm.db2.jdbc.app.DB2Driver").newInstance();
The dummy instantiation starts the needed class initialization.
No flames, please -- I've no idea what the "correct" behavior for the
browser is.
So: Georg, you may be able to fix your problem by putting ".newInstance()"
in the right place this doesn't seem to harm appletviewer and
Netscape (although you should check, of course).
Peter -- you may want to change your driver so that it does a newInstance(),
or change your README like this:
inline patch 1: /tmp/README Thu Sep 9 17:53:06 1999 (+5/-1 lines) download inline-1.patch*** src/interfaces/jdbc/README Sat Jan 16 23:51:49 1999
--- /tmp/README Thu Sep 9 17:53:06 1999
***************
*** 106,115 ****
introduce the driver using the following snippet of code:
try {
! Class.forName("postgresql.Driver");
} catch(Exception e) {
// your error handling code goes here
}
Remember, this method restricts your code to just the postgresql database.
--- 106,119 ----
introduce the driver using the following snippet of code:
try {
! Class.forName("postgresql.Driver").newInstance();
} catch(Exception e) {
// your error handling code goes here
}
+ + The ".newInstance()" above is apparently required by InterNet Explorer+ and perhaps others.+
Remember, this method restricts your code to just the postgresql database.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: nrh@pupworks.com, pmount@retep.org.uk, Georg.Ritter@uibk.ac.at, pgsql-interfaces@hub.org
Subject: RE: [INTERFACES] still the driver and IE5 problem
In-Reply-To: <199909100000.UAA11264@spot.pupworks.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox