PostGIS error: relation does not exist

584 views
Skip to first unread message

Colin

unread,
Oct 26, 2008, 12:23:52 AM10/26/08
to openjump-users
Hi!

I've set up a postgis database but I'm having trouble loading the
data. I have loaded data into postgis and it can be viewed using QGIS.
I can open a shape file and save it to the postgis database and again
the data can be viewed using QGIS. When I try to open any of these
layers I get "java.sql.sqlexception: error: relation
"schemaName.RelationName" does not exist: (Runtime Exception)". I
don't think it is permissions because the QGIS uses the same
connection parameters.

I'm wondering if this is a schema recognition issue?

TIA

Colin

Colin

unread,
Oct 26, 2008, 12:27:49 AM10/26/08
to openjump-users
PS I also tried the SRID plugin without success.

Cheers

Colin

Colin

unread,
Oct 26, 2008, 8:36:39 AM10/26/08
to openjump-users
Hi,

I fixed the problem. I tried SRID plugin, which required a JDBC driver
and I found a post that refering to another however, the problem was
related to schemas. I used OGR2OGR to import my shape files but if I
put them into a schema other than the public schema then OJ can read
them. Perhaps support for Postgres schemas could be a future
inclusion.

Cheers

Colin
> > Colin- Hide quoted text -
>
> - Show quoted text -

Jukka Rahkonen

unread,
Oct 26, 2008, 1:36:47 PM10/26/08
to openjum...@googlegroups.com
Hi,

A few suggestions:

- Have you registered your table in the geometry_columns table? Check is
from psql window with:
select f_table_name from geometry_columns;
It is not necessary, but it makes using PostGIS tables a bit easier
because registered tables will appear on a selection list in OpenJUMP.

- Is your OpenJUMP PostGIS connection for sure OK? You'll see a green
light between the connection in the connection manager window if it is.
- Is you table included in the selection list?
- Check that the f_table_name is not misspelled in geometry_columns.

I made a test and I really got this error message if I queried a table
that does not exist.
Are your tables in some other schema than "public"?

-Jukka Rahkonen-

Stefan Steiniger

unread,
Oct 26, 2008, 1:59:32 PM10/26/08
to openjum...@googlegroups.com
Hi Colin,

thanx for reporting how to solve the problem :)

stefan

Colin schrieb:

Reply all
Reply to author
Forward
0 new messages