Thanks!  I added the idExpression in the mapping file and that did the
trick.  Using Layers Preview, I can now view the WMS for the app-schema WFS
service. It is extremely slow but at least it works.  A GetFeatureInfo
pulls additional fields separate from those defined in app-schema mapping.
 I believe these are from the 'parent' GML schema???  (not sure of
terminology.)

http://maps.dgs.udel.edu/geoserver/gsmlp/wms?service=WMS&version=1.1.0&request=GetMap&layers=gsmlp:GeologicUnitView&styles=&bbox=168047.207459393,50089.3156893812,232116.679903062,204218.617080925&width=212&height=512&srs=EPSG:26957&format=application/openlayers

As FYI, to create a valid idExpression (one without a leading integer and
not using a CQL function), I need to create a column in my database view to
represent the id.  An example output of id would be "fid.sand.898".  I
concatenated fields in my Postgres view as below.

CREATE myView AS
SELECT (('fid.'::text || datatable."formationCode"::text) || '.'::text) ||
spatialtable.gid AS id, .....


Thanks again.

- John


John Callahan
Research Scientist
Delaware Geological Survey
University of Delaware
http://www.dgs.udel.edu
[email protected]



On Mon, Sep 2, 2013 at 11:56 PM, <[email protected]> wrote:

>  Hi John,****
>
> ** **
>
> This looks like a bug when idExpression is not specified:
> https://jira.codehaus.org/browse/GEOT-4554.****
>
> While I’m fixing the bug, you can use a workaround by specifying
> idExpression to your database id column.****
>
>
> http://docs.geoserver.org/latest/en/user/data/app-schema/mapping-file.html#idexpression-optional
> ****
>
> ** **
>
> Cheers****
>
> Rini****
>
> ** **
>
> *From:* John Callahan [mailto:[email protected]]
> *Sent:* Monday, 2 September 2013 2:24 PM
> *To:* Angreani, Rini (CESRE, Kensington)
> *Cc:* [email protected]
> *Subject:* Re: [Geoserver-users] OpenLayers with App-Schemas****
>
> ** **
>
> I have the same problem as Christy.  The bug fix you reference looks
> promising.  As FYI., from looking in the geoserver log file, I see the
> following error:****
>
> ** **
>
> 2013-09-02 01:48:30,367 DEBUG [geotools.jdbc] - CREATE CONNECTION****
>
> 2013-09-02 01:48:30,367 TRACE [geotools.core] - ENTRY 4****
>
> 2013-09-02 01:48:30,367 DEBUG [geotools.filter] - exporting PropertyName**
> **
>
> 2013-09-02 01:48:30,367 DEBUG [geotools.filter] - exporting
> LiteralExpression****
>
> 2013-09-02 01:48:30,367 DEBUG [geotools.jdbc] - SELECT
> "public"."geosci_geolunitview100k"."identifier",encode(ST_AsEWKB("public"."geosci_geolunitview100k"."geom"),'base64')
> as "geom" FROM "public"."geosci_geolunitview100k" INNER JOIN ( SELECT
> DISTINCT  FROM "public"."geosci_geolunitview100k" WHERE "geom" &&
> ST_GeomFromText('POLYGON ((135058.6446566685 -28179.470173503414,
> 135058.6446566685 282487.40294382145, 265105.24270579155
> 282487.40294382145, 265105.24270579155 -28179.470173503414,
> 135058.6446566685 -28179.470173503414))', 26957) )
> "temp_alias_used_for_filter" ON (  ) ****
>
> 2013-09-02 01:48:30,382 DEBUG [geotools.jdbc] - CLOSE CONNECTION****
>
> 2013-09-02 01:48:30,382 ERROR [geotools.rendering] - java.io.IOException**
> **
>
> java.lang.RuntimeException: java.io.IOException****
>
>    at
> org.geotools.data.store.ContentFeatureCollection.features(ContentFeatureCollection.java:168)
> ****
>
>    ......****
>
>    ......****
>
>     ... 116 more****
>
> Caused by: org.postgresql.util.PSQLException: ERROR: syntax error at or
> near "FROM"****
>
>   Position: 206****
>
> ** **
>
> ** **
>
> I confirm this error by executing the SQL SELECT statement directly to
> postgis.  Coordinate ordering seems fine and the exact same data table
> works well through a non-app-schema based service.  ****
>
> ** **
>
> ** **
>
>
> ****
>
> - John****
>
> ** **
>
> ** **
>
> John Callahan****
>
> Research Scientist****
>
> Delaware Geological Survey****
>
> University of Delaware
> http://www.dgs.udel.edu****
>
> [email protected] ****
>
> ** **
>
> ** **
>
> On Mon, Sep 2, 2013 at 1:13 AM, Rini Angreani <[email protected]>
> wrote:****
>
> Hi Christy,
>
> Apart from Ben's suggestions, I also made a very recent bug fix relating to
> WMS with app-schema: https://jira.codehaus.org/browse/GEOT-4550.
> Please try the latest from trunk if you're not already using it.
>
> Cheers
> Rini
>
>
>
> --
> View this message in context:
> http://osgeo-org.1560.x6.nabble.com/OpenLayers-with-App-Schemas-tp5075263p5075509.html
> ****
>
> Sent from the GeoServer - User mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
> Discover the easy way to master current and previous Microsoft technologies
> and advance your career. Get an incredible 1,500+ hours of step-by-step
> tutorial videos with LearnDevNow. Subscribe today and save!
> http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
> _______________________________________________
> Geoserver-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geoserver-users****
>
> ** **
>
------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to