Received: (from news@localhost) by hub.org (8.9.3/8.9.3) id JAA85350; Thu, 2 Sep 1999 09:07:06 -0400 (EDT) (envelope-from news) X-Authentication-Warning: hub.org: news set sender to using -f From: Christian Denning X-Newsgroups: comp.databases.postgresql.bugs, comp.databases.postgresql.docs, comp.databases.postgresql.hackers, comp.databases.postgresql.patches, comp.databases.postgresql.ports, comp.databases.postgresql.questions, linux.postgres Subject: Re: Linux/Postgres 6.5 problems using jdbc w/jdk1.2 Date: Thu, 02 Sep 1999 14:08:28 +0100 Organization: RemarQ http://www.remarQ.com Lines: 95 Message-ID: <37CE76CC.C341A8EE@netscape.net> References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------E9628914BE19B20C6DA63E7C" X-Trace: 936277619 .RTKIN3VEB202C248C uk21.supernews.com X-Complaints-To: newsabuse@remarq.com X-Mailer: Mozilla 4.61 [en] (Win98; I) X-Accept-Language: sk,en-GB,de-DE To: pgsql-hackers@postgresql.org.pgsql-bugs@postgresql.org.pgsql-docs@postgresql.org.pgsql-patches@postgresql.org.pgsql-ports@postgresql.org.pgsql-questions@postgreSQL.org This is a multi-part message in MIME format. --------------E9628914BE19B20C6DA63E7C Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Your database url is wrong. A postgres database needs the following URL: jdbc:postgresql://theComputerName/thePostgresDatabaseName if you omit something, you get your NullPointerException Christian EA wrote: > > Here are the errors I get while running the example classes provided by > Postgres: > > 1. Without Debug > <--------------------------------------------------- > PostgreSQL basic test v6.3 rev 1 > > Connecting to Database URL = jdbc:postgresql:db1 > 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(Compiled Code) > at java.sql.DriverManager.getConnection(Compiled Code) > at java.sql.DriverManager.getConnection(Compiled Code) > at example.basic.(Compiled Code) > at example.basic.main(Compiled Code) > <----------------------------------------------------- > 2. With Debug > <--------------------------------------------------- > PostgreSQL basic test v6.3 rev 1 > > DriverManager.initialize: jdbc.drivers = null > JDBC DriverManager initialized > registerDriver: > driver[className=postgresql.Driver,postgresql.Driver@a574f633] > Connecting to Database URL = jdbc:postgresql:web > DriverManager.getConnection("jdbc:postgresql:db1") > trying driver[className=postgresql.Driver,postgresql.Driver@a574f633] > -- listing properties -- > password=start123 > user=db1 > PGDBNAME=db1 > Protocol=postgresql > Using postgresql.jdbc2.Connection > Exception caught. > java.lang.NullPointerException > java.lang.NullPointerException > at java.io.Writer.write(Compiled Code) > at java.io.PrintStream.write(Compiled Code) > at java.io.PrintStream.print(Compiled Code) > at java.io.PrintStream.println(Compiled Code) > at java.lang.Throwable.printStackTrace(Compiled Code) > at java.sql.SQLException.(Compiled Code) > at postgresql.util.PSQLException.(Compiled Code) > at postgresql.Driver.connect(Compiled Code) > at java.sql.DriverManager.getConnection(Compiled Code) > at java.sql.DriverManager.getConnection(Compiled Code) > at example.basic.(Compiled Code) > at example.basic.main(Compiled Code) > > <----------------------------------------------------- > > Anyone recognize these errors. --------------E9628914BE19B20C6DA63E7C Content-Type: text/x-vcard; charset=us-ascii; name="ChristianDenning.vcf" Content-Transfer-Encoding: 7bit Content-Description: Card for Christian Denning Content-Disposition: attachment; filename="ChristianDenning.vcf" begin:vcard n:Denning;Christian tel;cell:+44-7970-008855 tel;fax:+44-1225-484944 tel;home:+44-1453-836652 tel;work:+44-1225-484449 x-mozilla-html:FALSE url:http://iecl.iuscomp.org/cd org:e-net Software version:2.1 email;internet:ChristianDenning@netscape.net title:Software Development Manager adr;quoted-printable:;;Shear's Cottage=0D=0AWatledge;Nailsworth;Gloucestershire;GL6 0AR;United Kingdom x-mozilla-cpt:;-26992 fn:Christian Denning end:vcard --------------E9628914BE19B20C6DA63E7C--