uDig does not like multiple namespaces?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

uDig does not like multiple namespaces?

Rahkonen Jukka
Hi,

I have a TinyOWS server configured to have feature types in two namespaces tows: and lv:
I can get the tows: feature types on uDig map but not the lv: feature types.  The error uDig version 1.2 gives is as follows:

!ENTRY net.refractions.udig.project 1 0 2011-06-20 20:14:43.187
!MESSAGE municipalities rendering error:java.lang.Exception: Error rendering feature
!STACK 0
java.lang.Exception: Error rendering feature
        at org.geotools.renderer.lite.StreamingRenderer.drawOptimized(StreamingRenderer.java:1956)
        at org.geotools.renderer.lite.StreamingRenderer.processStylers(StreamingRenderer.java:1815)
        at org.geotools.renderer.lite.StreamingRenderer.paint(StreamingRenderer.java:722)
        at org.geotools.renderer.lite.StreamingRenderer.paint(StreamingRenderer.java:547)
        at net.refractions.udig.render.internal.feature.basic.BasicFeatureRenderer.render(BasicFeatureRenderer.java:359)
        at net.refractions.udig.render.internal.feature.basic.BasicFeatureRenderer.render(BasicFeatureRenderer.java:222)
        at net.refractions.udig.project.internal.render.impl.RenderJob.startRendering(RenderJob.java:108)
        at net.refractions.udig.project.internal.render.impl.RenderJob.run(RenderJob.java:213)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: java.util.NoSuchElementException: Could not aquire feature:java.io.IOException: org.xml.sax.SAXException: cannot merge two target namespaces. http://www.tinyows.org/ http://latuviitta.fi/
        at org.geotools.data.store.NoContentIterator.next(NoContentIterator.java:56)
        at org.geotools.data.store.NoContentIterator.next(NoContentIterator.java:41)
        at org.geotools.renderer.lite.StreamingRenderer.drawOptimized(StreamingRenderer.java:1948)
        ... 8 more
Caused by: java.io.IOException: org.xml.sax.SAXException: cannot merge two target namespaces. http://www.tinyows.org/ http://latuviitta.fi/
        at org.geotools.xml.gml.FCBuffer.hasNext(FCBuffer.java:326)
        at org.geotools.data.wfs.v1_0_0.WFSFeatureReader.loadElement(WFSFeatureReader.java:189)
        at org.geotools.data.wfs.v1_0_0.WFSFeatureReader.hasNext(WFSFeatureReader.java:178)
        at org.geotools.data.ReTypeFeatureReader.hasNext(ReTypeFeatureReader.java:192)
        at org.geotools.data.wfs.v1_0_0.NonStrictWFSStrategy.createFeatureReaderGET(NonStrictWFSStrategy.java:134)
        at org.geotools.data.wfs.v1_0_0.NonStrictWFSStrategy.createFeatureReader(NonStrictWFSStrategy.java:101)
        at org.geotools.data.wfs.v1_0_0.NonStrictWFSStrategy.getFeatureReader(NonStrictWFSStrategy.java:72)
        at org.geotools.data.wfs.v1_0_0.WFS_1_0_0_DataStore.getFeatureReader(WFS_1_0_0_DataStore.java:747)
        at org.geotools.data.DefaultFeatureResults.reader(DefaultFeatureResults.java:210)
        at org.geotools.data.store.DataFeatureCollection.openIterator(DataFeatureCollection.java:224)
        at org.geotools.data.store.DataFeatureCollection.iterator(DataFeatureCollection.java:194)
        at org.geotools.renderer.lite.StreamingRenderer.drawOptimized(StreamingRenderer.java:1931)
        ... 8 more
Caused by: org.xml.sax.SAXException: cannot merge two target namespaces. http://www.tinyows.org/ http://latuviitta.fi/
        at org.geotools.xml.SchemaFactory$MergedSchema.<init>(SchemaFactory.java:492)
        at org.geotools.xml.SchemaFactory.merge(SchemaFactory.java:386)
        at org.geotools.xml.SchemaFactory.getRealInstance(SchemaFactory.java:322)
        at org.geotools.xml.SchemaFactory.getInstance(SchemaFactory.java:277)
        at org.geotools.xml.handlers.ElementHandlerFactory.startPrefixMapping(ElementHandlerFactory.java:86)
        at org.geotools.xml.XMLSAXHandler.startElement(XMLSAXHandler.java:373)
        at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
        at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
        at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
        at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
        at javax.xml.parsers.SAXParser.parse(Unknown Source)
        at javax.xml.parsers.SAXParser.parse(Unknown Source)
        at org.geotools.xml.DocumentFactory.getInstance(DocumentFactory.java:140)
        at org.geotools.data.wfs.v1_0_0.WFSFeatureReader.run(WFSFeatureReader.java:125)

My server is open at http://188.64.1.61/cgi-bin/tinyows.  I can use all my WFS feature types with the following WFS clients: ArcGIS, MapInfo, Kosmo GIS, QGis, gvSIG, Cadcorp SIS Map Browser and Gaia.

Regards,

-Jukka Rahkonen-
_______________________________________________
udig-users mailing list
[hidden email]
http://lists.refractions.net/mailman/listinfo/udig-users
Reply | Threaded
Open this post in threaded view
|

Re: uDig does not like multiple namespaces?

Andrea Antonello
Hi Rahkonen,
good to see you around here. I am afraid I am not a WFS freak, so I am
of few help. Maybe one of the WFS wizards might jump in here?

Ciao,
Andrea

On Mon, Jun 20, 2011 at 8:25 PM, Rahkonen Jukka
<[hidden email]> wrote:

> Hi,
>
> I have a TinyOWS server configured to have feature types in two namespaces tows: and lv:
> I can get the tows: feature types on uDig map but not the lv: feature types.  The error uDig version 1.2 gives is as follows:
>
> !ENTRY net.refractions.udig.project 1 0 2011-06-20 20:14:43.187
> !MESSAGE municipalities rendering error:java.lang.Exception: Error rendering feature
> !STACK 0
> java.lang.Exception: Error rendering feature
>        at org.geotools.renderer.lite.StreamingRenderer.drawOptimized(StreamingRenderer.java:1956)
>        at org.geotools.renderer.lite.StreamingRenderer.processStylers(StreamingRenderer.java:1815)
>        at org.geotools.renderer.lite.StreamingRenderer.paint(StreamingRenderer.java:722)
>        at org.geotools.renderer.lite.StreamingRenderer.paint(StreamingRenderer.java:547)
>        at net.refractions.udig.render.internal.feature.basic.BasicFeatureRenderer.render(BasicFeatureRenderer.java:359)
>        at net.refractions.udig.render.internal.feature.basic.BasicFeatureRenderer.render(BasicFeatureRenderer.java:222)
>        at net.refractions.udig.project.internal.render.impl.RenderJob.startRendering(RenderJob.java:108)
>        at net.refractions.udig.project.internal.render.impl.RenderJob.run(RenderJob.java:213)
>        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
> Caused by: java.util.NoSuchElementException: Could not aquire feature:java.io.IOException: org.xml.sax.SAXException: cannot merge two target namespaces. http://www.tinyows.org/ http://latuviitta.fi/
>        at org.geotools.data.store.NoContentIterator.next(NoContentIterator.java:56)
>        at org.geotools.data.store.NoContentIterator.next(NoContentIterator.java:41)
>        at org.geotools.renderer.lite.StreamingRenderer.drawOptimized(StreamingRenderer.java:1948)
>        ... 8 more
> Caused by: java.io.IOException: org.xml.sax.SAXException: cannot merge two target namespaces. http://www.tinyows.org/ http://latuviitta.fi/
>        at org.geotools.xml.gml.FCBuffer.hasNext(FCBuffer.java:326)
>        at org.geotools.data.wfs.v1_0_0.WFSFeatureReader.loadElement(WFSFeatureReader.java:189)
>        at org.geotools.data.wfs.v1_0_0.WFSFeatureReader.hasNext(WFSFeatureReader.java:178)
>        at org.geotools.data.ReTypeFeatureReader.hasNext(ReTypeFeatureReader.java:192)
>        at org.geotools.data.wfs.v1_0_0.NonStrictWFSStrategy.createFeatureReaderGET(NonStrictWFSStrategy.java:134)
>        at org.geotools.data.wfs.v1_0_0.NonStrictWFSStrategy.createFeatureReader(NonStrictWFSStrategy.java:101)
>        at org.geotools.data.wfs.v1_0_0.NonStrictWFSStrategy.getFeatureReader(NonStrictWFSStrategy.java:72)
>        at org.geotools.data.wfs.v1_0_0.WFS_1_0_0_DataStore.getFeatureReader(WFS_1_0_0_DataStore.java:747)
>        at org.geotools.data.DefaultFeatureResults.reader(DefaultFeatureResults.java:210)
>        at org.geotools.data.store.DataFeatureCollection.openIterator(DataFeatureCollection.java:224)
>        at org.geotools.data.store.DataFeatureCollection.iterator(DataFeatureCollection.java:194)
>        at org.geotools.renderer.lite.StreamingRenderer.drawOptimized(StreamingRenderer.java:1931)
>        ... 8 more
> Caused by: org.xml.sax.SAXException: cannot merge two target namespaces. http://www.tinyows.org/ http://latuviitta.fi/
>        at org.geotools.xml.SchemaFactory$MergedSchema.<init>(SchemaFactory.java:492)
>        at org.geotools.xml.SchemaFactory.merge(SchemaFactory.java:386)
>        at org.geotools.xml.SchemaFactory.getRealInstance(SchemaFactory.java:322)
>        at org.geotools.xml.SchemaFactory.getInstance(SchemaFactory.java:277)
>        at org.geotools.xml.handlers.ElementHandlerFactory.startPrefixMapping(ElementHandlerFactory.java:86)
>        at org.geotools.xml.XMLSAXHandler.startElement(XMLSAXHandler.java:373)
>        at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
>        at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
>        at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source)
>        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
>        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
>        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
>        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
>        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
>        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
>        at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
>        at javax.xml.parsers.SAXParser.parse(Unknown Source)
>        at javax.xml.parsers.SAXParser.parse(Unknown Source)
>        at org.geotools.xml.DocumentFactory.getInstance(DocumentFactory.java:140)
>        at org.geotools.data.wfs.v1_0_0.WFSFeatureReader.run(WFSFeatureReader.java:125)
>
> My server is open at http://188.64.1.61/cgi-bin/tinyows.  I can use all my WFS feature types with the following WFS clients: ArcGIS, MapInfo, Kosmo GIS, QGis, gvSIG, Cadcorp SIS Map Browser and Gaia.
>
> Regards,
>
> -Jukka Rahkonen-
> _______________________________________________
> udig-users mailing list
> [hidden email]
> http://lists.refractions.net/mailman/listinfo/udig-users
>
_______________________________________________
udig-users mailing list
[hidden email]
http://lists.refractions.net/mailman/listinfo/udig-users
Reply | Threaded
Open this post in threaded view
|

Re: uDig does not like multiple namespaces?

Jody Garnett-2
In reply to this post by Rahkonen Jukka
If you like I can open up a report on the GeoTools library we use for WFS support.

All the clients you mention do not really handle xml the same way we do; we literally use the schema to understand what is going on (and as a result are very fragile if the schema is wrong. Although I think gvSig is based on our design ...).

There are some details here:

Can I ask you to try WFS 1.1 - it uses GML3 which is far more consistent with respect to application schema handling.

-- 
Jody Garnett

On Tuesday, 21 June 2011 at 4:25 AM, Rahkonen Jukka wrote:

Hi,

I have a TinyOWS server configured to have feature types in two namespaces tows: and lv:
I can get the tows: feature types on uDig map but not the lv: feature types. The error uDig version 1.2 gives is as follows:

Caused by: java.io.IOException: org.xml.sax.SAXException: cannot merge two target namespaces. http://www.tinyows.org/ http://latuviitta.fi/
at org.geotools.xml.gml.FCBuffer.hasNext(FCBuffer.java:326)
at org.geotools.data.wfs.v1_0_0.WFSFeatureReader.loadElement(WFSFeatureReader.java:189)
at org.geotools.data.wfs.v1_0_0.WFSFeatureReader.hasNext(WFSFeatureReader.java:178)
at org.geotools.data.ReTypeFeatureReader.hasNext(ReTypeFeatureReader.java:192)
at org.geotools.data.wfs.v1_0_0.NonStrictWFSStrategy.createFeatureReaderGET(NonStrictWFSStrategy.java:134)
at org.geotools.data.wfs.v1_0_0.NonStrictWFSStrategy.createFeatureReader(NonStrictWFSStrategy.java:101)
at org.geotools.data.wfs.v1_0_0.NonStrictWFSStrategy.getFeatureReader(NonStrictWFSStrategy.java:72)
at org.geotools.data.wfs.v1_0_0.WFS_1_0_0_DataStore.getFeatureReader(WFS_1_0_0_DataStore.java:747)
at org.geotools.data.DefaultFeatureResults.reader(DefaultFeatureResults.java:210)
at org.geotools.data.store.DataFeatureCollection.openIterator(DataFeatureCollection.java:224)
at org.geotools.data.store.DataFeatureCollection.iterator(DataFeatureCollection.java:194)
at org.geotools.renderer.lite.StreamingRenderer.drawOptimized(StreamingRenderer.java:1931)
... 8 more
Caused by: org.xml.sax.SAXException: cannot merge two target namespaces. http://www.tinyows.org/ http://latuviitta.fi/
at org.geotools.xml.SchemaFactory$MergedSchema.<init>(SchemaFactory.java:492)
at org.geotools.xml.SchemaFactory.merge(SchemaFactory.java:386)
at org.geotools.xml.SchemaFactory.getRealInstance(SchemaFactory.java:322)
at org.geotools.xml.SchemaFactory.getInstance(SchemaFactory.java:277)
at org.geotools.xml.handlers.ElementHandlerFactory.startPrefixMapping(ElementHandlerFactory.java:86)
at org.geotools.xml.XMLSAXHandler.startElement(XMLSAXHandler.java:373)
at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)

My server is open at http://188.64.1.61/cgi-bin/tinyows. I can use all my WFS feature types with the following WFS clients: ArcGIS, MapInfo, Kosmo GIS, QGis, gvSIG, Cadcorp SIS Map Browser and Gaia.

Regards,

-Jukka Rahkonen-
_______________________________________________
udig-users mailing list
[hidden email]
http://lists.refractions.net/mailman/listinfo/udig-users


_______________________________________________
udig-users mailing list
[hidden email]
http://lists.refractions.net/mailman/listinfo/udig-users
Reply | Threaded
Open this post in threaded view
|

Re: uDig does not like multiple namespaces?

Rahkonen Jukka
Hi,

I need to do more work for isolating the problem before making a report. Meanwhile I tried uDig with WFS 1.1.0 and I can use at least most of the feature types now.  By the way, it is not obvious that the selection of the version is done by writing it to the server URL but I have used uDig before.

No other WFS client that I know of is using WFS in the uDig way (well, OpenLayers does but I mean GIS clients) by sending new GetFeatures with BBOX filter every time the user is panning or zooming. It means whole lot of requests and it did not suit at all our WFS-T based production system. Therefore we are using our own query based WFS connector for uDig and so far we have not been utilising the uDig native WFS connector at all.  In the future we may have use also for the standard uDig connector for adding WFS data from other WFS servers than our own and therefore I have been experimenting with it now.

The uDig way is understandable when many people are doing WFS-T against more or less unknown WFS servers. Our own uDig application reads data only on demand from WFS and after that uses cached vectors. Because of that we had to make the backend database to handle the locking, version check of the edited features etc. and it works for us but not for any general use.  However, looking the situation behind a WFS server I would like to see in uDig an alternative "Run WFS Query - Create static layer from cached data" method for those users who do not need WFS-T.

Most of the WFS clients in my list are doing schema validation but I am not sure about MapInfo. Gaia and SIS Map Browser let user to select a validating or non-validating mode. Deegree based clients iGeoDesktop and OpenJUMP WFS plugin were not on my list because they do not read data from that demo server. Both are very strict with validating and deegree tends to think WFS sometimes in a bit differently than others. In WFS there are far too many ways to do things is a bit different but still standard compliant ways and it means sometimes goodbye for interoperability.

Situation with WFS GIS clients and servers seems to be that WFS 1.0.0 is not very reliable especially with attribute and spatial filters because of a bunch of bugs. They will perhaps never be corrected because people are developing WFS 1.1.0.  And I would be surprised if there is one WFS system in the world handling the WFS 1.1.0 axis order thing correctly in all possible cases.  But anyway, there has been a huge development during the last year and finally there begins to be real interoperability between WFS servers and clients.

Regards,

-Jukka Rahkonen-



________________________________________
Lähettäjä: Jody Garnett [[hidden email]]
Lähetetty: 23. kesäkuuta 2011 7:58
Vastaanottaja: Rahkonen Jukka
Kopio: [hidden email]
Aihe: Re: [udig-users] uDig does not like multiple namespaces?

If you like I can open up a report on the GeoTools library we use for WFS support.
- https://jira.codehaus.org/browse/GEOT-3665

All the clients you mention do not really handle xml the same way we do; we literally use the schema to understand what is going on (and as a result are very fragile if the schema is wrong. Although I think gvSig is based on our design ...).

There are some details here:
- http://docs.geotools.org/latest/userguide/library/xml/internal/overview.html

Can I ask you to try WFS 1.1 - it uses GML3 which is far more consistent with respect to application schema handling.

--
Jody Garnett


On Tuesday, 21 June 2011 at 4:25 AM, Rahkonen Jukka wrote:

Hi,

I have a TinyOWS server configured to have feature types in two namespaces tows: and lv:
I can get the tows: feature types on uDig map but not the lv: feature types. The error uDig version 1.2 gives is as follows:

Caused by: java.io.IOException: org.xml.sax.SAXException: cannot merge two target namespaces. http://www.tinyows.org/ http://latuviitta.fi/
at org.geotools.xml.gml.FCBuffer.hasNext(FCBuffer.java:326)
at org.geotools.data.wfs.v1_0_0.WFSFeatureReader.loadElement(WFSFeatureReader.java:189)
at org.geotools.data.wfs.v1_0_0.WFSFeatureReader.hasNext(WFSFeatureReader.java:178)
at org.geotools.data.ReTypeFeatureReader.hasNext(ReTypeFeatureReader.java:192)
at org.geotools.data.wfs.v1_0_0.NonStrictWFSStrategy.createFeatureReaderGET(NonStrictWFSStrategy.java:134)
at org.geotools.data.wfs.v1_0_0.NonStrictWFSStrategy.createFeatureReader(NonStrictWFSStrategy.java:101)
at org.geotools.data.wfs.v1_0_0.NonStrictWFSStrategy.getFeatureReader(NonStrictWFSStrategy.java:72)
at org.geotools.data.wfs.v1_0_0.WFS_1_0_0_DataStore.getFeatureReader(WFS_1_0_0_DataStore.java:747)
at org.geotools.data.DefaultFeatureResults.reader(DefaultFeatureResults.java:210)
at org.geotools.data.store.DataFeatureCollection.openIterator(DataFeatureCollection.java:224)
at org.geotools.data.store.DataFeatureCollection.iterator(DataFeatureCollection.java:194)
at org.geotools.renderer.lite.StreamingRenderer.drawOptimized(StreamingRenderer.java:1931)
... 8 more
Caused by: org.xml.sax.SAXException: cannot merge two target namespaces. http://www.tinyows.org/ http://latuviitta.fi/
at org.geotools.xml.SchemaFactory$MergedSchema.<init>(SchemaFactory.java:492)
at org.geotools.xml.SchemaFactory.merge(SchemaFactory.java:386)
at org.geotools.xml.SchemaFactory.getRealInstance(SchemaFactory.java:322)
at org.geotools.xml.SchemaFactory.getInstance(SchemaFactory.java:277)
at org.geotools.xml.handlers.ElementHandlerFactory.startPrefixMapping(ElementHandlerFactory.java:86)
at org.geotools.xml.XMLSAXHandler.startElement(XMLSAXHandler.java:373)
at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)

My server is open at http://188.64.1.61/cgi-bin/tinyows. I can use all my WFS feature types with the following WFS clients: ArcGIS, MapInfo, Kosmo GIS, QGis, gvSIG, Cadcorp SIS Map Browser and Gaia.

Regards,

-Jukka Rahkonen-
_______________________________________________
udig-users mailing list
[hidden email]<mailto:[hidden email]>
http://lists.refractions.net/mailman/listinfo/udig-users

_______________________________________________
udig-users mailing list
[hidden email]
http://lists.refractions.net/mailman/listinfo/udig-users