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

Поиск
Список
Период
Сортировка
От Christian Denning
Тема Re: Linux/Postgres 6.5 problems using jdbc w/jdk1.2
Дата
Msg-id 37CE76CC.C341A8EE@netscape.net
обсуждение исходный текст
Список pgsql-docs
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.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.<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.
Вложения

В списке pgsql-docs по дате отправления:

Предыдущее
От: "Jose Aparicio"
Дата:
Сообщение: Re: [DOCS] prob with pgaccess
Следующее
От: Jim Edwards
Дата:
Сообщение: Administrator's Manual feedback