[Geoserver-devel] [jira] Created: (GEOS-2499) Geometry attributes fail to be recognized if the postgis metadata tables cannot be accessed

Geometry attributes fail to be recognized if the postgis metadata tables cannot be accessed
-------------------------------------------------------------------------------------------

                 Key: GEOS-2499
                 URL: http://jira.codehaus.org/browse/GEOS-2499
             Project: GeoServer
          Issue Type: Bug
          Components: PostGIS
    Affects Versions: 1.7.1, 1.6.5
            Reporter: Andrea Aime
            Assignee: Andrea Aime
             Fix For: 1.7.2

The followin stack trace:

{code}
2008-11-30 15:48:19,749 WARN [geoserver.filters] - Setting mimetype after acquiring stream! was:text/html;charset=UTF-8; set to: text/html; url was: http://map4change.org:8080/geoserver/config/data/typeEditorSubmit.do
2008-11-30 15:48:27,507 WARN [data.jdbc] - Error building attribute type. The column will be ignored
org.geotools.data.DataSourceException: ERROR: permission denied for relation spatial_ref_sys
  at org.geotools.data.postgis.referencing.PostgisAuthorityFactory.createCRS(PostgisAuthorityFactory.java:97)
  at org.geotools.data.postgis.PostgisDataStore.getGeometryAttribute(PostgisDataStore.java:1144)
  at org.geotools.data.postgis.PostgisDataStore.buildAttributeType(PostgisDataStore.java:1001)
  at org.geotools.data.jdbc.JDBC1DataStore.buildSchema(JDBC1DataStore.java:1183)
  at org.geotools.data.postgis.PostgisDataStore.buildSchema(PostgisDataStore.java:678)
  at org.geotools.data.jdbc.FeatureTypeHandler.getFeatureTypeInfo(FeatureTypeHandler.java:197)
  at org.geotools.data.jdbc.FeatureTypeHandler.getSchema(FeatureTypeHandler.java:165)
  at org.geotools.data.jdbc.JDBC1DataStore.getSchema(JDBC1DataStore.java:320)
  at org.geotools.data.postgis.PostgisDataStore.getSchema(PostgisDataStore.java:1966)
  at org.vfny.geoserver.form.data.TypesEditorForm.reset(TypesEditorForm.java:296)
{code}

Occurs when people store data in a namespace other than public and use a user that does not
have privileges to access the postgis metadata tables located in "public".

Fixes... hum, first of all we have to check that the postgis metadata tables really _have_ to
be located in public (seems a fair assumption since the geometry_colums table
has a schema column, if it was supposed to have of these per schema you probably
would not need it).
And then since we already have the srid, it's probably a good idea to just
decode EPSG:srid in case the table access fails.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira