Re: JDBC connection problem - Mailing list pgsql-jdbc
From | Brian Tomaszewski |
---|---|
Subject | Re: JDBC connection problem |
Date | |
Msg-id | 4df751bf0802050517qf027f50xd50d90de9166db1c@mail.gmail.com Whole thread Raw |
In response to | Re: JDBC connection problem (Guy Rouillier <guyr-ml1@burntmail.com>) |
Responses |
Re: JDBC connection problem
|
List | pgsql-jdbc |
Guy,
Thanks for the response. See below for clarifications:
Thanks for the response. See below for clarifications:
On Feb 5, 2008 1:05 AM, Guy Rouillier <guyr-ml1@burntmail.com> wrote:
I can run psql (the command line tool) on Debian and using the psql tool on Debian see/query the database that is always being reported as not existing when the app connects.
On my Windows box, I use pgAdmin interface. I also develop the Java Code for the app on windows and then upload it to the server to run/tes. Also, I built the inital database on the windows box, and then uploaded and restored it to the debian postgres running there
yes, we do have tomcat running on the database server (i.e the debian server), is that a bad thing?
My thought with using localhost on the debain is that is that is how the tomcat could easily connect
I have done this on windows. Every thing for my app on windows is on the same box (tomcat, postgres etc). When I port the app up to the debian server, the connection fails
Ok, so is the real issue then having tomcat and postgres on the same server? Should they be physically separate? If they are not, what do you need to consider in terms of configuration
Thank you for your time
Brian
Brian Tomaszewski wrote:I'm trying to follow your runtime environment, but some pieces are
> I am having trouble connecting to a psql database running on Debian
> GNU/Linux system
>
> The version of psql I am using in the system is 8.2.6.
>
> No matter what I do, I continually am getting the error:
>
> /Backend start-up failed: FATAL: database "RW_GEO" does not exist
>
> /when my JDBC component tries to connect using a URL like this:
>
> jdbc:postgresql://localhost:5432/RW_GEO
>
> from a tomcat app
>
> I have confirmed that the database RW_GEO does in fact exist as I can
> see/query tables from it from psql.
>
> Also, when I run my app on my development machine (windows), I can
> connect via tomcat with no problems to my local psql server.
missing. When you say you can query the database running on Debian
using psql, is that psql running on your Windows box or on the Debian
box?
I can run psql (the command line tool) on Debian and using the psql tool on Debian see/query the database that is always being reported as not existing when the app connects.
On my Windows box, I use pgAdmin interface. I also develop the Java Code for the app on windows and then upload it to the server to run/tes. Also, I built the inital database on the windows box, and then uploaded and restored it to the debian postgres running there
I don't think this has anything to do with JDBC. The URL you show
above has "localhost" as the server for the DB. That's probably not
right, is it? I wouldn't think you'd have Tomcat running on your
database server.
yes, we do have tomcat running on the database server (i.e the debian server), is that a bad thing?
My thought with using localhost on the debain is that is that is how the tomcat could easily connect
So, run psql from whatever box is running Tomcat, and figure out how to
connect it to your DB server.
I have done this on windows. Every thing for my app on windows is on the same box (tomcat, postgres etc). When I port the app up to the debian server, the connection fails
Once you've done that, you should be able
to just transfer the connection settings to JDBC. I'm anticipating once
you attempt to do that, you'll encounter a connection error. That's
because you need to update pg_hba.conf to allow access to your database
from remote hosts.
Ok, so is the real issue then having tomcat and postgres on the same server? Should they be physically separate? If they are not, what do you need to consider in terms of configuration
Thank you for your time
Brian
--
Guy Rouillier
---------------------------(end of broadcast)---------------------------
TIP 7: You can help support the PostgreSQL project by donating at
http://www.postgresql.org/about/donate
pgsql-jdbc by date: