pg.ddx.io pgsql-interfaces@postgresql.org mailing list archive
help / color / mirror / Atom feedJDBC connection problem while trying example.basic
7+ messages / 4 participants
[nested] [flat]
* JDBC connection problem while trying example.basic
@ 1999-07-12 18:02 Doug Thistlethwaite <doug@dupreeinc.com>
0 siblings, 0 replies; 7+ messages in thread
From: Doug Thistlethwaite @ 1999-07-12 18:02 UTC (permalink / raw)
To: pgsql-interfaces
Hello,
I am very new to using postgresql. I have a linux system at home
(Debian "slink" 2.0.36) which I have installed postgresql. The
postgresql on the linux system seems to be running fine and I can use
psql to test sql statements. I edited the init file and changed the
postmaster to accept tcp/ip connections.
My problem is when I try to talk to the database from a win95 system
using jdk1.2 and the sample program incloded with the JDBC driver. When
I run the program example.basic I get the following:
Connecting to Database URL = jdbc.postgresql://dragon:5432/doug
Exception caught.
java.sql.SQLException: No suitable driver
java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getConnection(Compiled Code)
at java.sql.DriverManager.getConnection(DriverManager.java:137)
at example.basic.<init>(basic.java:34)
at example.basic.main(basic.java:168)
Does this mean there is a problem with the driver? The postgresql.jar
file is in the classpath. The linux system I am using is called
dragon and it should be using the default port of 5432.
Any thoughts on what is going wrong?
Thank you,
Doug
^ permalink raw reply [nested|flat] 7+ messages in thread
* JDBC connection problem while trying example.basic
@ 1999-07-12 22:31 Doug Thistlethwaite <doug@dupreeinc.com>
0 siblings, 1 reply; 7+ messages in thread
From: Doug Thistlethwaite @ 1999-07-12 22:31 UTC (permalink / raw)
To: pgsql-interfaces
Hello,
I am very new to using postgresql. I have a linux system at home
(Debian "slink" 2.0.36) which I have installed postgresql. The
postgresql on the linux system seems to be running fine and I can use
psql to test sql statements. I edited the init file and changed the
postmaster to accept tcp/ip connections.
My problem is when I try to talk to the database from a win95 system
using jdk1.2 and the sample program incloded with the JDBC driver. When
I run the program example.basic I get the following:
Connecting to Database URL = jdbc.postgresql://dragon:5432/doug
Exception caught.
java.sql.SQLException: No suitable driver
java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getConnection(Compiled Code)
at java.sql.DriverManager.getConnection(DriverManager.java:137)
at example.basic.<init>(basic.java:34)
at example.basic.main(basic.java:168)
Does this mean there is a problem with the driver? The postgresql.jar
file is in the classpath. The linux system I am using is called
dragon and it should be using the default port of 5432.
Any thoughts on what is going wrong?
Thank you,
Doug
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: [INTERFACES] JDBC connection problem while trying example.basic
@ 1999-07-13 08:14 Herouth Maoz <herouth@oumail.openu.ac.il>
parent: Doug Thistlethwaite <doug@dupreeinc.com>
0 siblings, 0 replies; 7+ messages in thread
From: Herouth Maoz @ 1999-07-13 08:14 UTC (permalink / raw)
To: Doug Thistlethwaite <doug@dupreeinc.com>; pgsql-interfaces
At 01:31 +0300 on 13/07/1999, Doug Thistlethwaite wrote:
> Connecting to Database URL = jdbc.postgresql://dragon:5432/doug
This should be "jdbc:postgresql" - a colon, not a period. And I think you
can drop the port number since it is the default for Postgres.
Herouth
--
Herouth Maoz, Internet developer.
Open University of Israel - Telem project
http://telem.openu.ac.il/~herutma
^ permalink raw reply [nested|flat] 7+ messages in thread
* RE: [INTERFACES] JDBC connection problem while trying example.bas ic
@ 1999-07-13 08:49 Peter Mount <petermount@it.maidstone.gov.uk>
0 siblings, 1 reply; 7+ messages in thread
From: Peter Mount @ 1999-07-13 08:49 UTC (permalink / raw)
To: 'Herouth Maoz' <herouth@oumail.openu.ac.il>; Doug Thistlethwaite <doug@dupreeinc.com>; pgsql-interfaces
Yes, the driver defaults to 5432 if the port is absent, and localhost if
the host is absent.
Peter
--
Peter Mount
Enterprise Support
Maidstone Borough Council
Any views stated are my own, and not those of Maidstone Borough Council.
-----Original Message-----
From: Herouth Maoz [mailto:herouth@oumail.openu.ac.il]
Sent: 13 July 1999 09:15
To: Doug Thistlethwaite; pgsql-interfaces@postgreSQL.org
Subject: Re: [INTERFACES] JDBC connection problem while trying
example.basic
At 01:31 +0300 on 13/07/1999, Doug Thistlethwaite wrote:
> Connecting to Database URL = jdbc.postgresql://dragon:5432/doug
This should be "jdbc:postgresql" - a colon, not a period. And I think
you
can drop the port number since it is the default for Postgres.
Herouth
--
Herouth Maoz, Internet developer.
Open University of Israel - Telem project
http://telem.openu.ac.il/~herutma
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: [INTERFACES] JDBC connection problem while trying example.basic
@ 1999-07-13 17:23 Doug Thistlethwaite <doug@dupreeinc.com>
parent: Peter Mount <petermount@it.maidstone.gov.uk>
0 siblings, 0 replies; 7+ messages in thread
From: Doug Thistlethwaite @ 1999-07-13 17:23 UTC (permalink / raw)
To: Peter Mount <petermount@it.maidstone.gov.uk>; 'Herouth Maoz' <herouth@oumail.openu.ac.il>; Benoit.Foucher@francemel.com; +Cc: pgsql-interfaces
Thank you all for the quick reply. After looking into greater detail, this
problem probably should have been posted on the NOVICE mailing list... I
caught that problem myself and still received that same error message as
before. In reading the JDBC docs on the web site, I saw that the version I
has was compiled for jdk1.1.7. I downloaded a version for jdk1.2 and now I
get a new error message.
:\jdk1.2\DSNBrowse>java example.basic jdbc:postgresql://dragonl:5432/doug
doug password
PostgreSQL basic test v6.3 rev 1
Starting constructor for basic
continueing constructor for basic
Connecting to Database URL = jdbc:postgresql://dragonknoll:5432/doug
Exception caught.
Something unusual has occured to cause the driver to fail. Please report
this exception: {1}
Something unusual has occured to cause the driver to fail. Please report
this exception: {1}
at postgresql.Driver.connect(Driver.java:108)
at java.sql.DriverManager.getConnection(Compiled Code)
at java.sql.DriverManager.getConnection(DriverManager.java:137)
at example.basic.<init>(basic.java:34)
at example.basic.main(basic.java:168)
I think the above error message shows that I have now moved further into the
example program and it has shown another problem. The version of postgrSQL
available on the stable debian linux distribution is version 6.3. Am I
correct in assuming that I need v6.5 to work with the JDBC2 drivers? If
this is the case, I have two options. I can download a debian distribution
file for postgress 6.5 for the latest version (non stable) of the debian
OS. Alternately, I could compile it myself on the current version. Do any
of you have an opinion on which method would be the least painful?
Again, thank you for the information you have provided!
Doug Thistlethwaite
Peter Mount wrote:
> Yes, the driver defaults to 5432 if the port is absent, and localhost if
> the host is absent.
>
> Peter
>
> --
> Peter Mount
> Enterprise Support
> Maidstone Borough Council
> Any views stated are my own, and not those of Maidstone Borough Council.
>
> -----Original Message-----
> From: Herouth Maoz [mailto:herouth@oumail.openu.ac.il]
> Sent: 13 July 1999 09:15
> To: Doug Thistlethwaite; pgsql-interfaces@postgreSQL.org
> Subject: Re: [INTERFACES] JDBC connection problem while trying
> example.basic
>
> At 01:31 +0300 on 13/07/1999, Doug Thistlethwaite wrote:
>
> > Connecting to Database URL = jdbc.postgresql://dragon:5432/doug
>
> This should be "jdbc:postgresql" - a colon, not a period. And I think
> you
> can drop the port number since it is the default for Postgres.
>
> Herouth
>
> --
> Herouth Maoz, Internet developer.
> Open University of Israel - Telem project
> http://telem.openu.ac.il/~herutma
^ permalink raw reply [nested|flat] 7+ messages in thread
* RE: [INTERFACES] JDBC connection problem while trying example.bas ic
@ 1999-07-13 17:53 Peter Mount <petermount@it.maidstone.gov.uk>
0 siblings, 1 reply; 7+ messages in thread
From: Peter Mount @ 1999-07-13 17:53 UTC (permalink / raw)
To: 'Doug Thistlethwaite' <doug@dupreeinc.com>; Peter Mount <petermount@it.maidstone.gov.uk>; 'Herouth Maoz' <herouth@oumail.openu.ac.il>; Benoit.Foucher@francemel.com; +Cc: pgsql-interfaces
Hang fire. There was a bug that caused the exceptions to return {1}
instead of the correct result. I fixed this one, but it was after 6.5
was out (will be in 6.5.1).
I'll post a new compiled driver onto my web site in about 2 hours (when
I get home).
Peter
--
Peter Mount
Enterprise Support
Maidstone Borough Council
Any views stated are my own, and not those of Maidstone Borough Council.
-----Original Message-----
From: Doug Thistlethwaite [mailto:doug@dupreeinc.com]
Sent: 13 July 1999 18:23
To: Peter Mount; 'Herouth Maoz'; Benoit.Foucher@francemel.com
Cc: pgsql-interfaces@postgreSQL.org
Subject: Re: [INTERFACES] JDBC connection problem while trying
example.basic
Thank you all for the quick reply. After looking into greater detail,
this
problem probably should have been posted on the NOVICE mailing list...
I
caught that problem myself and still received that same error message as
before. In reading the JDBC docs on the web site, I saw that the
version I
has was compiled for jdk1.1.7. I downloaded a version for jdk1.2 and
now I
get a new error message.
:\jdk1.2\DSNBrowse>java example.basic
jdbc:postgresql://dragonl:5432/doug
doug password
PostgreSQL basic test v6.3 rev 1
Starting constructor for basic
continueing constructor for basic
Connecting to Database URL = jdbc:postgresql://dragonknoll:5432/doug
Exception caught.
Something unusual has occured to cause the driver to fail. Please report
this exception: {1}
Something unusual has occured to cause the driver to fail. Please report
this exception: {1}
at postgresql.Driver.connect(Driver.java:108)
at java.sql.DriverManager.getConnection(Compiled Code)
at java.sql.DriverManager.getConnection(DriverManager.java:137)
at example.basic.<init>(basic.java:34)
at example.basic.main(basic.java:168)
I think the above error message shows that I have now moved further into
the
example program and it has shown another problem. The version of
postgrSQL
available on the stable debian linux distribution is version 6.3. Am I
correct in assuming that I need v6.5 to work with the JDBC2 drivers? If
this is the case, I have two options. I can download a debian
distribution
file for postgress 6.5 for the latest version (non stable) of the debian
OS. Alternately, I could compile it myself on the current version. Do
any
of you have an opinion on which method would be the least painful?
Again, thank you for the information you have provided!
Doug Thistlethwaite
Peter Mount wrote:
> Yes, the driver defaults to 5432 if the port is absent, and localhost
if
> the host is absent.
>
> Peter
>
> --
> Peter Mount
> Enterprise Support
> Maidstone Borough Council
> Any views stated are my own, and not those of Maidstone Borough
Council.
>
> -----Original Message-----
> From: Herouth Maoz [mailto:herouth@oumail.openu.ac.il]
> Sent: 13 July 1999 09:15
> To: Doug Thistlethwaite; pgsql-interfaces@postgreSQL.org
> Subject: Re: [INTERFACES] JDBC connection problem while trying
> example.basic
>
> At 01:31 +0300 on 13/07/1999, Doug Thistlethwaite wrote:
>
> > Connecting to Database URL = jdbc.postgresql://dragon:5432/doug
>
> This should be "jdbc:postgresql" - a colon, not a period. And I think
> you
> can drop the port number since it is the default for Postgres.
>
> Herouth
>
> --
> Herouth Maoz, Internet developer.
> Open University of Israel - Telem project
> http://telem.openu.ac.il/~herutma
^ permalink raw reply [nested|flat] 7+ messages in thread
* RE: [INTERFACES] JDBC connection problem while trying example.bas ic
@ 1999-07-13 18:48 Peter T Mount <peter@retep.org.uk>
parent: Peter Mount <petermount@it.maidstone.gov.uk>
0 siblings, 0 replies; 7+ messages in thread
From: Peter T Mount @ 1999-07-13 18:48 UTC (permalink / raw)
To: Peter Mount <petermount@it.maidstone.gov.uk>; +Cc: 'Doug Thistlethwaite' <doug@dupreeinc.com>; 'Herouth Maoz' <herouth@oumail.openu.ac.il>; Benoit.Foucher@francemel.com; pgsql-interfaces
On Tue, 13 Jul 1999, Peter Mount wrote:
> Hang fire. There was a bug that caused the exceptions to return {1}
> instead of the correct result. I fixed this one, but it was after 6.5
> was out (will be in 6.5.1).
>
> I'll post a new compiled driver onto my web site in about 2 hours (when
> I get home).
I've just done this.
Peter
[snip]
--
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] 7+ messages in thread
end of thread, other threads:[~1999-07-13 18:48 UTC | newest]
Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1999-07-12 18:02 JDBC connection problem while trying example.basic Doug Thistlethwaite <doug@dupreeinc.com>
1999-07-12 22:31 JDBC connection problem while trying example.basic Doug Thistlethwaite <doug@dupreeinc.com>
1999-07-13 08:14 ` Herouth Maoz <herouth@oumail.openu.ac.il>
1999-07-13 08:49 RE: [INTERFACES] JDBC connection problem while trying example.bas ic Peter Mount <petermount@it.maidstone.gov.uk>
1999-07-13 17:23 ` Doug Thistlethwaite <doug@dupreeinc.com>
1999-07-13 17:53 RE: [INTERFACES] JDBC connection problem while trying example.bas ic Peter Mount <petermount@it.maidstone.gov.uk>
1999-07-13 18:48 ` RE: [INTERFACES] JDBC connection problem while trying example.bas ic 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