Re: Not able to connect to postgresql database - Mailing list pgsql-jdbc

From Manohar Bhattarai
Subject Re: Not able to connect to postgresql database
Date
Msg-id AANLkTikpQQXQc5-u_ifaZqpJK423PAQbnv7smVeQDfwd@mail.gmail.com
Whole thread Raw
In response to Re: Not able to connect to postgresql database  (dmp <danap@ttc-cmc.net>)
Responses Re: Not able to connect to postgresql database  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
List pgsql-jdbc


On Wed, Jun 2, 2010 at 9:09 PM, dmp <danap@ttc-cmc.net> wrote:
Manohar Bhattarai <manoharbhattarai@gmail.com> wrote: 
> I have added the jar in classpath also in the CLASSPATH variable
> of /etc/environment file. Still I am getting exception :
> java.lang.ClassNotFoundException: org.postgresql.Driver.   
 
You said you were using Eclipse, which I believe sets its own
classpath for each runnable you set up within it.  Look for the
entry under the "Run..." or "Debug..." menu item and set it up
there.
-Kevin

If you are using Eclipse, and during the initial configuration of the project
the PostgreSQL driver was not present in the project directory then it will
needed to be added. To set that:

Highlight the Project:   Project  |  Properties  |  Java Build Path  |  Libraries  |  Add JARs.

danap.
I had added the jar files already but it was giving same exception. But now the Driver is found. :) Thanks all. It was solved by adding the jar file to CATALINA_HOME/lib/ directory. Then it found the driver.
But now a new exception is :
org.postgresql.util.PSQLException: FATAL: password authentication failed for user "postgres"

I am giving the line for connection that i am using
connection = DriverManager.getConnection(connectionURL, "postgres", "mypasswordhere");

But the password is the same that i use to login postgres user in the terminal.
What could be the problem?

Can you please give me the steps to set up new user and create new database after a fresh install of postgresql? I have doubts seeing different sites giving different methods.


pgsql-jdbc by date:

Previous
From: dmp
Date:
Subject: Re: Not able to connect to postgresql database
Next
From: "Kevin Grittner"
Date:
Subject: Re: Not able to connect to postgresql database