Skip site navigation (1) Skip section navigation (2)

Re: Linux/Postgres 6.5 problems using jdbc w/jdk1.2

From: Christian Denning <ChristianDenning(at)netscape(dot)net>
To: pgsql-hackers(at)postgresql(dot)org(dot)pgsql-bugs(at)postgresql(dot)org(dot)pgsql-docs(at)postgresql(dot)org(dot)pgsql-patches(at)postgresql(dot)org(dot)pgsql-ports(at)postgresql(dot)org(dot)pgsql-questions(at)postgreSQL(dot)org
Subject: Re: Linux/Postgres 6.5 problems using jdbc w/jdk1.2
Date: 1999-09-02 13:08:28
Message-ID: 37CE76CC.C341A8EE@netscape.net (view raw or flat)
Thread:
Lists: pgsql-bugspgsql-docspgsql-generalpgsql-hackerspgsql-ports
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.<init>(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(dot)Driver(at)a574f633]
> Connecting to Database URL = jdbc:postgresql:web
> DriverManager.getConnection("jdbc:postgresql:db1")
>     trying driver[className=postgresql.Driver,postgresql(dot)Driver(at)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.<init>(Compiled Code)
>  at postgresql.util.PSQLException.<init>(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.<init>(Compiled Code)
>  at example.basic.main(Compiled Code)
> 
> <-----------------------------------------------------
> 
> Anyone recognize these errors.

Attachment: ChristianDenning.vcf
Description: text/x-vcard (451 bytes)

Responses

pgsql-docs by date

Next:From: Jim EdwardsDate: 1999-09-04 01:43:53
Subject: Administrator's Manual feedback
Previous:From: Jose AparicioDate: 1999-08-31 15:43:01
Subject: Re: [DOCS] prob with pgaccess

pgsql-hackers by date

Next:From: Tom LaneDate: 1999-09-02 13:19:37
Subject: Re: [HACKERS] SELECT BUG
Previous:From: The Hermit HackerDate: 1999-09-02 13:05:41
Subject: Re: [HACKERS] Commercial question

pgsql-ports by date

Next:From: Piemme Internet ConsultantsDate: 1999-09-03 15:58:18
Subject: Help
Previous:From: Chuck WeinstockDate: 1999-09-01 19:53:08
Subject: Installation Problem

pgsql-bugs by date

Next:From: Bruce MomjianDate: 1999-09-02 15:13:37
Subject: Re: [BUGS] temp tables failes in transaction mode
Previous:From: hecongDate: 1999-09-02 09:22:05
Subject: Possible bug in postgres || libpq

pgsql-general by date

Next:From: Robert WagnerDate: 1999-09-02 14:12:07
Subject: Whence libpgtcl.so ??
Previous:From: David FuryDate: 1999-09-02 13:04:56
Subject: Join performance

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group