Re: newbie: retep wants to have username?

Поиск
Список
Период
Сортировка
От Mirko Zeibig
Тема Re: newbie: retep wants to have username?
Дата
Msg-id 20010216210021.A32448@picard.inka.de
обсуждение исходный текст
Ответ на Re: newbie: retep wants to have username?  (Peter T Mount <peter@retep.org.uk>)
Список pgsql-jdbc
On Fri, Feb 16, 2001 at 11:11:58AM -0500, Peter T Mount wrote:
> Quoting Mirko Zeibig <mirko@picard.inka.de>:
> > The user property is missing. It is mandatory.
>
> Yes, its asking for the postgresql username.
>
> There's three ways of supplying it.
>
> 1: use: .getConnection(url,user,password);
> 2: use: .getConnection(url) with user/password in the url
> 3: use: .getConnection(url,props) where props is a Properties with the
> user/password in it.
>
> for 2 use: jdbc:postgresql:db?user=PETER&password=SECRET
>
> for 3 have properties called user & password
>

Thanks a lot! Now I get a connect to the database, but XMLExport is
choking with an error:

[mirko@romulan jars]$ java -cp ./retepTools.jar \
uk.org.retep.xml.test.XMLExport -Dorg.postgresql.Driver \
-J"jdbc:postgresql:mirko?user=mirko&password=XXXXX" -S
Now using JDBC Driver: org.postgresql.Driver
Opened jdbc:postgresql:mirko?user=mirko&password=XXXXX
Generating XML Schema of database
java.lang.NullPointerException
        at
org.postgresql.jdbc2.DatabaseMetaData.getTables(DatabaseMetaData.java:1707)
        at
uk.org.retep.xml.jdbc.XMLDatabase.writeDatabase(XMLDatabase.java:222)
        at
uk.org.retep.xml.jdbc.XMLDatabase.writeDatabase(XMLDatabase.java:188)
        at uk.org.retep.xml.test.XMLExport.<init>(XMLExport.java:83)
        at uk.org.retep.xml.test.XMLExport.main(XMLExport.java:186)
[mirko@romulan jars]$

If you need more information I am happy to send a more complete transcript
with -verbose enabled.


> >
> > I studied the jdbc-interface documentation and did not see this syntax
> > mentioned anywhere.
>
> Doesn't exist ;-)

Maybe this syntax should be documented anywhere? I knew about 1: but have
not seen 2: or 3: :-).

Best Regards
Mirko
--
mirko@picard.inka.de
http://sites.inka.de/picard/

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

Предыдущее
От: Bob Kline
Дата:
Сообщение: Re: Trouble With JDBC
Следующее
От: Corey Mosher
Дата:
Сообщение: Re: Trouble With JDBC