Opened 11 years ago

Closed 9 years ago

#1233 closed defect (fixed)

TinyOWS quickstart failure

Reported by: hamish Owned by: live-demo@…
Priority: critical Milestone: OSGeoLive9.5
Component: OSGeoLive Keywords: tinyows, pgrouting, qgis
Cc: pka, live-demo@…

Description

Hi,

no luck with the 7.0rc2 quickstart for TinyOWS, there are a couple of problems:

  • connect to pgrouting PostGIS database in QGIS works, but the ways table doesn't look very healthy, all links back to one spot. or maybe that is the shortest path from a->b? as-is doesn't look healthy anyway. see screenshot.
  • the quickstart asks you to enable the WFS plugin in QGIS but it doesn't exist. if you go to the Fetch plugins there is a WFS 2.0 Client v.0.8.4 by J. Weichland, but you get the same NameSpace error as below.
  • no matter, Add WFS Layer is available from the menu anyway, add name and url as per quickstart, then ok, then Connect. but it leads to this error:
      ErrorConfigFile: No layer NameSpace prefix defined
    

and that's as far as you get.

/usr/lib/cgi-bin/tinyows does exist in the filesystem.

Hamish

Attachments (4)

pgrouting_7.0rc2.png (96.2 KB ) - added by hamish 11 years ago.
pgrouting postgis ways table coming back to common point in the NE
tows_misalignment.png (434.4 KB ) - added by hamish 11 years ago.
tows data rendered 5cm off of the same layer loaded directly through PostGIS
tinyows.jpg (66.1 KB ) - added by kalxas 11 years ago.
tinyows1.jpg (109.6 KB ) - added by kalxas 11 years ago.

Download all attachments as: .zip

Change History (30)

by hamish, 11 years ago

Attachment: pgrouting_7.0rc2.png added

pgrouting postgis ways table coming back to common point in the NE

comment:1 by hamish, 11 years ago

Summary: TinyOWS quickstart failure on 7.0rc2TinyOWS quickstart failure on 7.0rc2, pgRouting PostGIS DB focal anomaly

just to confirm that the "all links back to one spot" problem in the pgrouting PostGIS db was not present in the 6.5 version of the live disc, so this is a new pgRouting problem too. (& perhaps a separate issue to the TinyOWS failure)

Hamish

comment:2 by hamish, 11 years ago

Summary: TinyOWS quickstart failure on 7.0rc2, pgRouting PostGIS DB focal anomalyTinyOWS quickstart failure on 7.0rc2

pgRouting import error moved into its own ticket, #1234.

Hamish

comment:3 by hamish, 11 years ago

Cc: pka added

comment:4 by pka, 11 years ago

  • WFS is a core C++ plugin - so no download necessary
  • Is PG DB fixed in OSGeo Live 7.0 (#1234)?
  • "ErrorConfigFile: No layer NameSpace prefix defined" is caused by an invalid tinyows config. Too late to fix for OSGeo Live 7.0?

in reply to:  4 ; comment:5 by hamish, 11 years ago

Replying to pka:

  • WFS is a core C++ plugin - so no download necessary

ok, I dropped the plugin manager enable step from the quickstart in trunk r10845.

  • Is PG DB fixed in OSGeo Live 7.0 (#1234)?

nope, not yet.

tinyows config. Too late to fix for OSGeo Live 7.0?

For 7.0.0 yes, the DVD has already been sent to the printers for FOSS4G 2013, but for those looking how to fix tinyOWS by hand or a workshop-fixit script it would be good to get the fix into svn ASAP. We have a short window of opportunity (~ a week?) where a 7.0.1 bug fix release is still a possibility, but without more testers than we've had it's hard to be confident that new problems haven't arrived in new build. For me, I'd feel bad to have known bugs fixed in svn for 6 months while still shipping the old iso.

Hamish

in reply to:  4 ; comment:6 by hamish, 11 years ago

Replying to pka:

invalid tinyows config.

is there a change to /etc/tinyows.xml needed? or is it elsewhere?

https://trac.osgeo.org/osgeo/browser/livedvd/gisvm/trunk/app-conf/tinyows/tinyows.xml

thanks, Hamish

in reply to:  5 ; comment:7 by pka, 11 years ago

Replying to hamish:

Replying to pka:

  • WFS is a core C++ plugin - so no download necessary

ok, I dropped the plugin manager enable step from the quickstart in trunk r10845.

*Enabling* the plugin is still necessary!

in reply to:  6 ; comment:8 by pka, 11 years ago

Replying to hamish:

Replying to pka:

invalid tinyows config.

is there a change to /etc/tinyows.xml needed? or is it elsewhere?

https://trac.osgeo.org/osgeo/browser/livedvd/gisvm/trunk/app-conf/tinyows/tinyows.xml

Config options have changed: prefix -> ns_prefix, server -> ns_uri

in reply to:  8 comment:9 by hamish, 11 years ago

Replying to pka:

Config options have changed: prefix -> ns_prefix, server -> ns_uri

ok, thanks. changed applied in trunk r10853.

I can now load the data as per the quick start. Some other troubles I notice:

  • the data is offset from the PostGIS layer by 5cm (see attached screenshot tows_misalignment.png)
  • quickstart:
  1. Check Only request features overlapping the current view extent.

where? doesn't exist in the qgis 1.8.0 add WFS layer dialog.

  1. Press OK.

(seems to be "Apply" now)

Edit data:

[select by rectangle, select all nodes at pgrouting bug convergence spot, click "Delete selected"]

  1. Click Layer --> Save edits.
Error: Could not commit changes to layer tows:ways
Error: ERROR: 2489 feature(s) not deleted.

permissions problem?

Hamish

by hamish, 11 years ago

Attachment: tows_misalignment.png added

tows data rendered 5cm off of the same layer loaded directly through PostGIS

in reply to:  7 comment:10 by hamish, 11 years ago

Replying to pka:

*Enabling* the plugin is still necessary!

is it? Looking on the 7.0.0 iso qgis session I don't see the option.

typing "wfs" into the QGIS Plugin Manager's filter textbox results in an empty set. "Add WFS Layer..." is available from the Layer menu at startup time.

?

thanks, Hamish

comment:11 by kalxas, 11 years ago

Milestone: OSGeoLive7.0OSGeoLive7.9
Summary: TinyOWS quickstart failure on 7.0rc2TinyOWS quickstart failure

Just tested the TinyOWS quickstart: Since it depends to pgrouting db, it is affected from #1281 The layers configuration seems empty (see attachment)

by kalxas, 11 years ago

Attachment: tinyows.jpg added

comment:12 by kalxas, 11 years ago

Priority: criticalmajor

I was able to use the quickstart on build [11138]. I can add WFS layer from PostGIS through TinyOWS. The problem happens when I edit and try to commit (see attachment tinyows1.jpg)

by kalxas, 11 years ago

Attachment: tinyows1.jpg added

comment:13 by hamish, 10 years ago

Milestone: OSGeoLive7.9OSGeoLive8.0

comment:14 by kalxas, 10 years ago

Milestone: OSGeoLive8.0OSGeoLive8.5

Saving commits still fails in 8.0

comment:15 by kalxas, 9 years ago

Milestone: OSGeoLive8.5OSGeoLive9.0

Ticket retargeted after milestone closed

comment:16 by kalxas, 9 years ago

Milestone: OSGeoLive9.0OSGeoLive9.5

Ticket retargeted after milestone closed

comment:17 by kalxas, 9 years ago

Cc: live-demo@… added
Priority: majorcritical

Just tested this again on 9.5beta1. I get the following error when I try to commit a change in QGIS through TinyOWS:

Could not commit changes to layer tows:ways

Errors: ERROR: 1 geometries not changed.
  
  Provider errors:
      WFS exception report (code=InvalidParameterValue text=Operation parameter must be set)

comment:18 by kalxas, 9 years ago

Keywords: qgis added

Had the chance to look deeper in this issue today with help from Olivier, Even and Bruno, from both TinyOWS and QGIS sides.

There seem to be different issues with creating new features and modifying existing ones:

  1. Modifying an existing feature on pgrouting "ways" table leads to an empty WFS-T request from the QGIS side:
(apache error log)
[Thu Feb 25 11:41:24 2016] [QUERY] <Transaction xmlns="http://www.opengis.net/wfs" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0.0" service="WFS" xsi:schemaLocation="http://www.tinyows.org/ http://localhost/cgi-bin/tinyows?SERVICE=WFS&amp;VERSION=1.0.0&amp;REQUEST=DescribeFeatureType&amp;TYPENAME=tows:ways&amp;SRSNAME=EPSG:4326" xmlns:gml="http://www.opengis.net/gml" xmlns:tows="http://www.tinyows.org/"/>
  1. Creating a new feature on "ways" table leads to a non-empty request that fails to validate properly:
[Thu Feb 25 11:43:43 2016] [QUERY] <Transaction xmlns="http://www.opengis.net/wfs" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0.0" service="WFS" xsi:schemaLocation="http://www.tinyows.org/ http://localhost/cgi-bin/tinyows?SERVICE=WFS&amp;VERSION=1.0.0&amp;REQUEST=DescribeFeatureType&amp;TYPENAME=tows:ways&amp;SRSNAME=EPSG:4326" xmlns:gml="http://www.opengis.net/gml" xmlns:tows="http://www.tinyows.org/"><Insert xmlns="http://www.opengis.net/wfs"><ways xmlns="http://www.tinyows.org/"><gid xmlns="http://www.tinyows.org/">767867</gid><the_geom xmlns="http://www.tinyows.org/"><gml:LineString srsName="EPSG:4326"><gml:coordinates cs="," ts=" ">-122.32138113889824638,37.55778686663296639 -122.32125577770811731,37.55769052423684684 -122.32140203242992982,37.55756748455024763</gml:coordinates></gml:LineString></the_geom></ways></Insert></Transaction>

and the following validation error:

[Thu Feb 25 11:43:43 2016] [EVENT] == TINYOWS STARTUP ==
[Thu Feb 25 11:43:43 2016] [EVENT] == Connection PostGIS ==
[Thu Feb 25 11:43:44 2016] [EVENT] == Filling Storage ==
[Thu Feb 25 11:43:44 2016] [EVENT] == FCGI START ==
[Thu Feb 25 11:43:44 2016] [QUERY] service=WFS&request=DescribeFeatureType&version=1.0.0
[Thu Feb 25 11:43:44 2016] [EVENT] == FCGI SHUTDOWN ==
[Thu Feb 25 11:43:44 2016] [EVENT] == TINYOWS SHUTDOWN ==
[Thu Feb 25 11:43:44 2016] [ERROR] Element '{http://www.w3.org/2001/XMLSchema}import': Skipping import of schema located at 'http://schemas.opengis.net/gml/2.1.2/feature.xsd' for the namespace 'http://www.opengis.net/gml', since this namespace was already imported with the schema located at '/usr/share/tinyows/schema/gml/2.1.2/feature.xsd'.

[Thu Feb 25 11:43:44 2016] [ERROR] Element '{http://www.tinyows.org/}the_geom': This element is not expected. Expected is ( {http://www.tinyows.org/}class_id ).

[Thu Feb 25 11:43:44 2016] [ERROR] XML request isn't valid

We might need to consider using another WFS client (OpenLayers?) to demonstrate WFS-T until the above issues are addressed.

comment:19 by kalxas, 9 years ago

I also just realized that we are at tinyows version 1.1.0 while there is a new upstream release 1.1.1. I wonder if that would make any difference...

in reply to:  19 comment:20 by Bas Couwenberg, 9 years ago

Replying to kalxas:

I also just realized that we are at tinyows version 1.1.0 while there is a new upstream release 1.1.1. I wonder if that would make any difference...

It is unlikely to make a difference, but upgrading is a good idea any way. You can easily rebuild the tinyows source package from Debian GIS for OSGeo-Live. It may be worthwhile to wait for the 1.1.2 release that is expected to result from the sprint activity.

comment:21 by kalxas, 9 years ago

Yes, I am watching the mapserver table :)

comment:22 by kalxas, 9 years ago

tinyows has been updated to 1.1.1 in our nightly ppa. 1.1.2 version is not going to be released now, there is some extra work to be done.

I disabled the strict xml validation for tinyows and I was able to move forward, actually I got an error related to the pgrouting table missing a primary key and after I added one, I got a int size error on the psql commit part, so that means the commit reached the database.

I think the safe choice would be to create a simple new postgis table including some sample data and play around with it within tinyows quickstart. There are some 17k demo shp data from the upstream project that we can use actually...

https://github.com/mapserver/tinyows/tree/master/demo

comment:24 by kalxas, 9 years ago

Quickstart fix to reflect recent changes in TinyOWS setup:

https://github.com/OSGeo/OSGeoLive-doc/pull/81

comment:25 by kalxas, 9 years ago

After switching to the latest version (1.1.1), and using the TinyOWS demo dataset in PosgreSQL, the quickstart is now working again...

I will test with the next nightly build and close this ticket.

Best, Angelos

comment:26 by kalxas, 9 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.