Joshua, does the user you are connecting with have permission to select from the view geography_columns (introduced when support for geographies was added)?
Can you "select * from geography_columns" as this user? For GeoServer to recognise geometry columns in views, they must be registered in geometry_columns. I suspect a similar rule may apply to geography columns. Kind regards, Ben. On 02/03/12 12:41, Joshua Groom wrote: > Hi, > I am using > - Geoserver 2.1.2 (have replicated this issue on 2.1.3 as well) > - PostgreSQL 9.1.3 on x86_64-pc-linux-gnu, compiled by gcc-4.6.real > (Ubuntu/Linaro 4.6.1-9ubuntu3) 4.6.1, 64-bit > - POSTGIS="1.5.3" GEOS="3.2.2-CAPI-1.6.2" PROJ="Rel. 4.7.1, 23 September > 2009" LIBXML="2.7.8" USE_STATS > - Sun Java(TM) SE Runtime Environment (build 1.6.0_26-b03) > > I have no problem creating layers by directly publishing tables from Postgis > or Oracle 11g and can create SQL Views in oracle 11g but not Postgis. > > I am having issues with SQL views connecting to a Postgis datasource with a > table defined like so: > > CREATE TABLE lightning ( > id integer primary key, > timestamp text, > amplitude real, > duration integer, > type text, > strike_location geography(POINT, 4326) > ); > > CREATE INDEX lightning_gix ON lightning USING GIST ( strike_location ); > > However when I try to create an SQL view, for example: > > select * from lightning > > Then the geography column strike_location is not picked up and I see the log > message: > > WARN [geotools.jdbc] - Could not find mapping for 'strike_location', ignoring > the column and setting the feature type read only > > The layer can be created if I manually specify SRS and bounding Box it does > not appear to have a location associated with it, layer preview doesn't work > and GML contains no lat lon information. > > Any help would be appreciated. > > Thanks, > Josh > > -- Ben Caradoc-Davies <ben.caradoc-dav...@csiro.au> Software Engineer CSIRO Earth Science and Resource Engineering Australian Resources Research Centre ------------------------------------------------------------------------------ Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ _______________________________________________ Geoserver-users mailing list Geoserver-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-users