AppletTalk.com Forum Index AppletTalk.com
Java discussions newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

localhost - connection problem

 
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java and Databases
View previous topic :: View next topic  
Author Message
Pawel
Guest





PostPosted: Fri May 20, 2005 1:22 pm    Post subject: localhost - connection problem Reply with quote



Hi,

I have a problem with java and PostgreSQL. When I type:

connection =
DriverManager.getConnection("jdbc:postgresql://"+host+":"+postgresPort+"/thesis",
user, password);

as long as the host equals "localhost" everything is ok. But when I
type: "laptop" which is the real name of my machine (where in fact
PostgreSQL is installed) it throws an SQLException.

I have a line: listen_addresses = '*' in my postgresql.conf file.

If someone could explain me that problem I would be grateful.

Thanks for any help
Pawel
Back to top
Thomas Kellerer
Guest





PostPosted: Fri May 20, 2005 1:26 pm    Post subject: Re: localhost - connection problem Reply with quote



On 20.05.2005 15:22 Pawel wrote:
Quote:
Hi,

I have a problem with java and PostgreSQL. When I type:

connection =
DriverManager.getConnection("jdbc:postgresql://"+host+":"+postgresPort+"/thesis",
user, password);

as long as the host equals "localhost" everything is ok. But when I
type: "laptop" which is the real name of my machine (where in fact
PostgreSQL is installed) it throws an SQLException.

I have a line: listen_addresses = '*' in my postgresql.conf file.

If someone could explain me that problem I would be grateful.


(This is really a PG question rather then a Java question.)

Which hosts are enabled in pg_hba.conf?

For details see:
http://www.postgresql.org/docs/8.0/static/client-authentication.html

Thomas

Back to top
Display posts from previous:   
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java and Databases All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.