Re: Not able to connect to postgresql database
| От | Manohar Bhattarai |
|---|---|
| Тема | Re: Not able to connect to postgresql database |
| Дата | |
| Msg-id | AANLkTikpQQXQc5-u_ifaZqpJK423PAQbnv7smVeQDfwd@mail.gmail.com обсуждение исходный текст |
| Ответ на | Re: Not able to connect to postgresql database (dmp <danap@ttc-cmc.net>) |
| Ответы |
Re: Not able to connect to postgresql database
|
| Список | pgsql-jdbc |
On Wed, Jun 2, 2010 at 9:09 PM, dmp <danap@ttc-cmc.net> wrote:
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.If you are using Eclipse, and during the initial configuration of the projectManohar 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
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.
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.
Can I follow this link ==> https://help.ubuntu.com/community/PostgreSQL
--
Regards,
Manohar Bhattarai (मनोहर भट्टराई)
Blogs:
http://manoharbhattarai.wordpress.com/
http://manoharbhattarai.posterous.com/
http://manoharbhattarai.blogspot.com/
Microblogs:
Twitter :- http://twitter.com/manoharmailme
Identi.ca :- http://identi.ca/manoharbhattarai
В списке pgsql-jdbc по дате отправления: