problem with jdbc connection to postgesql

Поиск
Список
Период
Сортировка
От Phil Campaigne
Тема problem with jdbc connection to postgesql
Дата
Msg-id 401FC211.9030406@charter.net
обсуждение исходный текст
Ответы Re: problem with jdbc connection to postgesql
Re: problem with jdbc connection to postgesql
Список pgsql-general
Hi All,
I am seting up my web app with a tomcat/postgresql hosting service.
 From my psql client I type psql and then I am asked for my password.
This logs me into my hosted database just fine.

However, I can't log on from my webapp to the database thru jdbc like I
could when my webapp/Tomcat/postgresql were on my local machine. The
jdbc class only has a method with 3 parameters, url, user, password
parameters. The  hosting server is giving me the following error message:
 >Stack Trace:

 >java.sql.SQLException: FATAL 1:  Password authentication failed for
 >user "xxxxxx"

 >So, it looks like it is trying to connect using username xxxxxx,
 >not password yyyyyy.

I'm using the DriverManager.getConnection(url, user, password) method in
my connection class.

jdbc:postgresql://database.domain.org/databasename

username: xxxxxx
password: yyyyyy

It seems to be confused by the presence of the extra parameter 'user'.
I believe that the postgresql database wants just the password. How do I
give it just the url and password.  There is no getConnection method on
the DriverManager classd with just url and password?

Has anyone else experienced this problem? Any ideas?
thanks,
Phil


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

Предыдущее
От: Csaba Nagy
Дата:
Сообщение: Re: large crontab database design
Следующее
От: Francois Suter
Дата:
Сообщение: Anyone has nls activated on Mac OS X?