pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Problems using, IE5 MS-VM and JDBC driver
2+ messages / 2 participants
[nested] [flat]

* Problems using, IE5 MS-VM and JDBC driver
@ 1999-06-13 22:15  Georg Ritter <Georg.Ritter@uibk.ac.at>
  0 siblings, 1 reply; 2+ messages in thread

From: Georg Ritter @ 1999-06-13 22:15 UTC (permalink / raw)
  To: pgsql-interfaces@hub.org

Hello, 


I wrote a little Java applet which uses jdbc to connect to a 
pg installed on a linux box. 

It works with Nectscape 4.5/6 but when I try to start
the applet with IE5 ( JIT on and off ) I get the SQLException
"No suitable driver found", thrown by the first try block (see
program code below). 

I don't understand where the problem comes from. It seems to 
be correctly done if it works with Netscape? 
 
Any ideas around there?

The driver is situated in a subdir of the applet: ..../applet/postgres/
( single .class files, structure as in the postgres dist. )

I used jdk1.2 port for linux for compiling the driver.



The code I use to load the driver:
...
import java.sql.*;
import java.net.URL;
import java.net.MalformedURLException;
...
    private void initDBconnection()
    {
        String url = "jdbc:postgresql://a.b.c:5000/mydb?" +
                     "user=thename?password=thepasswd&auth=password";
        String usr = "thename"; 
        String pwd = "thepasswd";

        String query = "select kreis, name from locationdata where nummer<10";
        
        try 
	{  Class.forName( "postgresql.Driver" ); } 
        catch( Exception ex ) 
        {
	    d( "could not do theSatwebDBnect to SATWeb" + ex, 100 );
            Error( "DBError");        
	}
        try 
        {
            theSatwebDB = DriverManager.getConnection( url, usr, pwd );
        } 
        catch( SQLException ex ) 
        {
	    d("The connection to SATWeb failed:" +ex+"\n", 100);
        }
    }

 
Greetings, 

	Georg Ritter
 
---------------------------------------------------------------------
  student at department of physics
  University of Innsbruck, Austria            Georg.Ritter@uibk.ac.at




^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: [INTERFACES] Problems using, IE5 MS-VM and JDBC driver
@ 1999-06-26 11:02  Peter T Mount <peter@retep.org.uk>
  parent: Georg Ritter <Georg.Ritter@uibk.ac.at>
  0 siblings, 0 replies; 2+ messages in thread

From: Peter T Mount @ 1999-06-26 11:02 UTC (permalink / raw)
  To: Georg Ritter <Georg.Ritter@uibk.ac.at>; +Cc: pgsql-interfaces@hub.org

On Mon, 14 Jun 1999, Georg Ritter wrote:

[catching up with emails here]

> Hello, 
> 
> 
> I wrote a little Java applet which uses jdbc to connect to a 
> pg installed on a linux box. 
> 
> It works with Nectscape 4.5/6 but when I try to start
> the applet with IE5 ( JIT on and off ) I get the SQLException
> "No suitable driver found", thrown by the first try block (see
> program code below). 

> The driver is situated in a subdir of the applet: ..../applet/postgres/
> ( single .class files, structure as in the postgres dist. )

That should work (as it's the last resort)

> I used jdk1.2 port for linux for compiling the driver.

Ah, this may be a problem, as IE may not exactly be 1.2 compatible (I'm
not sure here).

> The code I use to load the driver:

>         String url = "jdbc:postgresql://a.b.c:5000/mydb?" +
>                      "user=thename?password=thepasswd&auth=password";

Drop the ? and the parameters, as you are supplying them in the
getConnection() method.

Also auth has not been implemented since 6.3 (when the new protocol came
into force), so it's wasting space here. Since 6.3, the protocol
determines the authentication scheme before the driver sends the user &
password.

>             theSatwebDB = DriverManager.getConnection( url, usr, pwd );

-- 
       Peter T Mount peter@retep.org.uk
      Main Homepage: http://www.retep.org.uk
PostgreSQL JDBC Faq: http://www.retep.org.uk/postgres
 Java PDF Generator: http://www.retep.org.uk/pdf




^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~1999-06-26 11:02 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1999-06-13 22:15 Problems using, IE5 MS-VM and JDBC driver Georg Ritter <Georg.Ritter@uibk.ac.at>
1999-06-26 11:02 ` Peter T Mount <peter@retep.org.uk>

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