From: | Mirko Zeibig <mirko(at)picard(dot)inka(dot)de> |
---|---|
To: | pgsql-jdbc(at)postgresql(dot)org |
Subject: | Re: newbie: retep wants to have username? |
Date: | 2001-02-16 20:00:21 |
Message-ID: | 20010216210021.A32448@picard.inka.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
On Fri, Feb 16, 2001 at 11:11:58AM -0500, Peter T Mount wrote:
> Quoting Mirko Zeibig <mirko(at)picard(dot)inka(dot)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(at)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(at)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(at)picard(dot)inka(dot)de
http://sites.inka.de/picard/
From | Date | Subject | |
---|---|---|---|
Next Message | Jarek | 2001-02-17 12:38:46 | Serialize |
Previous Message | Corey Mosher | 2001-02-16 19:32:13 | Re: Trouble With JDBC |