Request with a GeoServer WFS and my geometry

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

Request with a GeoServer WFS and my geometry

Vbe

Dear all,

 

I try to make a request with a Filter between a geoserver WFS and a geometry.

I constructs the filter :

 

FilterFactory2 factory = (FilterFactory2) CommonFactoryFinder.getFilterFactory(GeoTools.getDefaultHints());

SimpleFeatureType schema = source.getSchema();

GeometryDescriptor geomDesc = schema.getGeometryDescriptor();

Name geomName = geomDesc.getName();

 

Intersects intersects = factory.intersects(factory.property(geomName), factory.literal(myGeom));

FeatureCollection<SimpleFeatureType, SimpleFeature> features = source.getFeatures(intersects);

Iterator<SimpleFeature> iterator = features.iterator();

while( iterator.hasNext() ){            

      SimpleFeature tabAssFeature = iterator.next();

                …

 

source.getFeatures(intersects) raises logs:

7 juin 2010 11:49:56 org.geotools.xml.XMLSAXHandler fatalError

GRAVE: FATAL Element or attribute do not match QName production: QName::=(NCName':')?NCName.

7 juin 2010 11:49:56 org.geotools.xml.XMLSAXHandler fatalError

GRAVE: col 616, line 1

7 juin 2010 11:49:56 org.geotools.data.wfs.v1_0_0.NonStrictWFSStrategy createFeatureReaderPOST

ATTENTION: java.io.IOException: org.xml.sax.SAXParseException: Element or attribute do not match QName production: QName::=(NCName':')?NCName.

7 juin 2010 11:49:56 org.geotools.xml.XMLSAXHandler fatalError

GRAVE: FATAL Element or attribute do not match QName production: QName::=(NCName':')?NCName.

7 juin 2010 11:49:56 org.geotools.xml.XMLSAXHandler fatalError

GRAVE: col 616, line 1

7 juin 2010 11:49:56 org.geotools.data.wfs.v1_0_0.NonStrictWFSStrategy createFeatureReaderGET

ATTENTION: java.io.IOException: org.xml.sax.SAXParseException: Element or attribute do not match QName production: QName::=(NCName':')?NCName.

 

and iterator.next raises an Exception :

7 juin 2010 11:49:56 org.geotools.data.wfs.v1_0_0.NonStrictWFSStrategy createFeatureReaderGET

ATTENTION: java.io.IOException: org.xml.sax.SAXParseException: Element or attribute do not match QName production: QName::=(NCName':')?NCName.

java.util.NoSuchElementException: Could not aquire feature:java.io.IOException: org.xml.sax.SAXParseException: Element or attribute do not match QName production: QName::=(NCName':')?NCName.

      at org.geotools.data.store.NoContentIterator.next(NoContentIterator.java:56)

      at org.geotools.data.store.NoContentIterator.next(NoContentIterator.java:41)

      at fr.magellium.kheper.etu_analyser.ui.views.ScenarioProductionView$6.widgetSelected(ScenarioProductionView.java:753)

      at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:228)

      at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)

      at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)

      at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3880)

      at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3473)

      at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405)

      at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)

      at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221)

      at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)

      at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)

      at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493)

      at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)

      at net.refractions.udig.internal.ui.UDIGApplication.start(UDIGApplication.java:136)

      at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)

      at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)

      at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)

      at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368)

      at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)

      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

      at java.lang.reflect.Method.invoke(Unknown Source)

      at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)

      at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)

      at org.eclipse.equinox.launcher.Main.run(Main.java:1311)

      at org.eclipse.equinox.launcher.Main.main(Main.java:1287)

Caused by: java.io.IOException: org.xml.sax.SAXParseException: Element or attribute do not match QName production: QName::=(NCName':')?NCName.

      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.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 fr.magellium.kheper.etu_analyser.ui.views.ScenarioProductionView$6.widgetSelected(ScenarioProductionView.java:750)

      ... 26 more

Caused by: org.xml.sax.SAXParseException: Element or attribute do not match QName production: QName::=(NCName':')?NCName.

      at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)

      at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)

      at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)

      at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)

      at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)

      at org.apache.xerces.impl.XMLEntityScanner.scanQName(Unknown Source)

      at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(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 org.apache.xerces.jaxp.SAXParserImpl.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)

 

I've readen this : http://www.mail-archive.com/geotools-gt2-users@.../msg07701.html

The WFS feature typename begins with a number (it's "1DC"), but I don't think it's the problem…

 

Could you help me please?

Thanks!

 

Regards,

 

Virginie BERRE - Ingénieur d'études et de développement

+33 (0)1 30 15 40 58 (n° direct)

[hidden email]


ZA Les Erables - bâtiment 4

66, route de Sartrouville
78230 Le Pecq
Tel: +33 (0)1 30 15 40 50 (standard)
Fax: +33 (0)1 30 15 40 60
www.magellium.fr

MAGELLIUM

MAGELLIUMPensez environnement ! N'imprimez ce mail que si c'est vraiment nécessaire !

 


_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel
Reply | Threaded
Open this post in threaded view
|

Re: Request with a GeoServer WFS and my geometry

Jesse Eichar
odd.  I wonder if the geoserver version is the problem.  The uDig WFS does not support 1.1.  Is it possible to check geoserver to see the requests that are made?  Or maybe verify the response?



On Mon, Jun 7, 2010 at 11:58 AM, Virginie BERRE <[hidden email]> wrote:

Dear all,

 

I try to make a request with a Filter between a geoserver WFS and a geometry.

I constructs the filter :

 

FilterFactory2 factory = (FilterFactory2) CommonFactoryFinder.getFilterFactory(GeoTools.getDefaultHints());

SimpleFeatureType schema = source.getSchema();

GeometryDescriptor geomDesc = schema.getGeometryDescriptor();

Name geomName = geomDesc.getName();

 

Intersects intersects = factory.intersects(factory.property(geomName), factory.literal(myGeom));

FeatureCollection<SimpleFeatureType, SimpleFeature> features = source.getFeatures(intersects);

Iterator<SimpleFeature> iterator = features.iterator();

while( iterator.hasNext() ){            

      SimpleFeature tabAssFeature = iterator.next();

                …

 

source.getFeatures(intersects) raises logs:

7 juin 2010 11:49:56 org.geotools.xml.XMLSAXHandler fatalError

GRAVE: FATAL Element or attribute do not match QName production: QName::=(NCName':')?NCName.

7 juin 2010 11:49:56 org.geotools.xml.XMLSAXHandler fatalError

GRAVE: col 616, line 1

7 juin 2010 11:49:56 org.geotools.data.wfs.v1_0_0.NonStrictWFSStrategy createFeatureReaderPOST

ATTENTION: java.io.IOException: org.xml.sax.SAXParseException: Element or attribute do not match QName production: QName::=(NCName':')?NCName.

7 juin 2010 11:49:56 org.geotools.xml.XMLSAXHandler fatalError

GRAVE: FATAL Element or attribute do not match QName production: QName::=(NCName':')?NCName.

7 juin 2010 11:49:56 org.geotools.xml.XMLSAXHandler fatalError

GRAVE: col 616, line 1

7 juin 2010 11:49:56 org.geotools.data.wfs.v1_0_0.NonStrictWFSStrategy createFeatureReaderGET

ATTENTION: java.io.IOException: org.xml.sax.SAXParseException: Element or attribute do not match QName production: QName::=(NCName':')?NCName.

 

and iterator.next raises an Exception :

7 juin 2010 11:49:56 org.geotools.data.wfs.v1_0_0.NonStrictWFSStrategy createFeatureReaderGET

ATTENTION: java.io.IOException: org.xml.sax.SAXParseException: Element or attribute do not match QName production: QName::=(NCName':')?NCName.

java.util.NoSuchElementException: Could not aquire feature:java.io.IOException: org.xml.sax.SAXParseException: Element or attribute do not match QName production: QName::=(NCName':')?NCName.

      at org.geotools.data.store.NoContentIterator.next(NoContentIterator.java:56)

      at org.geotools.data.store.NoContentIterator.next(NoContentIterator.java:41)

      at fr.magellium.kheper.etu_analyser.ui.views.ScenarioProductionView$6.widgetSelected(ScenarioProductionView.java:753)

      at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:228)

      at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)

      at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)

      at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3880)

      at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3473)

      at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405)

      at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)

      at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221)

      at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)

      at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)

      at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493)

      at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)

      at net.refractions.udig.internal.ui.UDIGApplication.start(UDIGApplication.java:136)

      at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)

      at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)

      at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)

      at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368)

      at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)

      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

      at java.lang.reflect.Method.invoke(Unknown Source)

      at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)

      at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)

      at org.eclipse.equinox.launcher.Main.run(Main.java:1311)

      at org.eclipse.equinox.launcher.Main.main(Main.java:1287)

Caused by: java.io.IOException: org.xml.sax.SAXParseException: Element or attribute do not match QName production: QName::=(NCName':')?NCName.

      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.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 fr.magellium.kheper.etu_analyser.ui.views.ScenarioProductionView$6.widgetSelected(ScenarioProductionView.java:750)

      ... 26 more

Caused by: org.xml.sax.SAXParseException: Element or attribute do not match QName production: QName::=(NCName':')?NCName.

      at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)

      at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)

      at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)

      at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)

      at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)

      at org.apache.xerces.impl.XMLEntityScanner.scanQName(Unknown Source)

      at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(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 org.apache.xerces.jaxp.SAXParserImpl.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)

 

I've readen this : http://www.mail-archive.com/geotools-gt2-users@.../msg07701.html

The WFS feature typename begins with a number (it's "1DC"), but I don't think it's the problem…

 

Could you help me please?

Thanks!

 

Regards,

 

Virginie BERRE - Ingénieur d'études et de développement

+33 (0)1 30 15 40 58 (n° direct)

[hidden email]


ZA Les Erables - bâtiment 4

66, route de Sartrouville
78230 Le Pecq
Tel: +33 (0)1 30 15 40 50 (standard)
Fax: +33 (0)1 30 15 40 60
www.magellium.fr

MAGELLIUM

MAGELLIUMPensez environnement ! N'imprimez ce mail que si c'est vraiment nécessaire !

 


_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel



_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel
Vbe
Reply | Threaded
Open this post in threaded view
|

Re: Request with a GeoServer WFS and my geometry

Vbe

Dear Jesse,

 

I already know this limitation so I set the version to 1.0.0.

My WFS creation code :

String capabilities = wfs_url+"?service=WFS&version=1.0.0&request=GetCapabilities";

Map<String, Serializable> connectionParameters = new HashMap<String, Serializable>();                                           

connectionParameters = new HashMap<String,Serializable>();

connectionParameters.put( WFSDataStoreFactory.URL.key, new URL(capabilities) );

connectionParameters.put( WFSDataStoreFactory.LENIENT.key, true );

connectionParameters.put( WFSDataStoreFactory.TRY_GZIP.key, true );                                            

DataStore wfsDataStore = DataStoreFinder.getDataStore( connectionParameters );         

FeatureSource<SimpleFeatureType, SimpleFeature> source = wfsDataStore.getFeatureSource( typeName );

 

 

The GeoServer log contains no error and is :

07 juin 15:26:19 INFO [geoserver.wfs] -

Request: getFeature

       handle = null

       service = WFS

       version = 1.0.0

       baseUrl = http://10.133.101.70:8082/geoserver/

       providedVersion = null

       query = [net.opengis.wfs.impl.QueryTypeImpl@13a7d3a (group: null, propertyName: null, function: null, filter: [[ the_geom intersects MULTIPOLYGON (((7.86855058 -3.4180264, 12.95751759 -3.4180264, 12.95751759 -0.5421683, 7.86855058 -0.5421683, 7.86855058 -3.4180264))) ] AND [ NOT [ the_geom within MULTIPOLYGON (((7.86855058 -3.4180264, 12.95751759 -3.4180264, 12.95751759 -0.5421683, 7.86855058 -0.5421683, 7.86855058 -3.4180264))) ] ]], sortBy: null, featureVersion: null, handle: null, srsName: null, typeName: [{http://www.magellium.fr}1DC])]

       maxFeatures = null

       outputFormat = GML2

       resultType = results

       traverseXlinkDepth = null

       traverseXlinkExpiry = null

       formatOptions = {}

 

Unfortunately, I've tried to rename the typename TEST1DC instead of 1DC and it works….

I've got a serious problem because the WFS is not mine…

 

Thank you.

 

Virginie BERRE - Ingénieur d'études et de développement

+33 (0)1 30 15 40 58

[hidden email]

MAGELLIUMPensez environnement ! N'imprimez ce mail que si c'est vraiment nécessaire !

 

De : [hidden email] [mailto:[hidden email]] De la part de Jesse Eichar
Envoyé : lundi 7 juin 2010 15:17
À : User-friendly Desktop Internet GIS
Objet : Re: [udig-devel] Request with a GeoServer WFS and my geometry

 

odd.  I wonder if the geoserver version is the problem.  The uDig WFS does not support 1.1.  Is it possible to check geoserver to see the requests that are made?  Or maybe verify the response?

 

 

On Mon, Jun 7, 2010 at 11:58 AM, Virginie BERRE <[hidden email]> wrote:

Dear all,

 

I try to make a request with a Filter between a geoserver WFS and a geometry.

I constructs the filter :

 

FilterFactory2 factory = (FilterFactory2) CommonFactoryFinder.getFilterFactory(GeoTools.getDefaultHints());

SimpleFeatureType schema = source.getSchema();

GeometryDescriptor geomDesc = schema.getGeometryDescriptor();

Name geomName = geomDesc.getName();

 

Intersects intersects = factory.intersects(factory.property(geomName), factory.literal(myGeom));

FeatureCollection<SimpleFeatureType, SimpleFeature> features = source.getFeatures(intersects);

Iterator<SimpleFeature> iterator = features.iterator();

while( iterator.hasNext() ){            

      SimpleFeature tabAssFeature = iterator.next();

                …

 

source.getFeatures(intersects) raises logs:

7 juin 2010 11:49:56 org.geotools.xml.XMLSAXHandler fatalError

GRAVE: FATAL Element or attribute do not match QName production: QName::=(NCName':')?NCName.

7 juin 2010 11:49:56 org.geotools.xml.XMLSAXHandler fatalError

GRAVE: col 616, line 1

7 juin 2010 11:49:56 org.geotools.data.wfs.v1_0_0.NonStrictWFSStrategy createFeatureReaderPOST

ATTENTION: java.io.IOException: org.xml.sax.SAXParseException: Element or attribute do not match QName production: QName::=(NCName':')?NCName.

7 juin 2010 11:49:56 org.geotools.xml.XMLSAXHandler fatalError

GRAVE: FATAL Element or attribute do not match QName production: QName::=(NCName':')?NCName.

7 juin 2010 11:49:56 org.geotools.xml.XMLSAXHandler fatalError

GRAVE: col 616, line 1

7 juin 2010 11:49:56 org.geotools.data.wfs.v1_0_0.NonStrictWFSStrategy createFeatureReaderGET

ATTENTION: java.io.IOException: org.xml.sax.SAXParseException: Element or attribute do not match QName production: QName::=(NCName':')?NCName.

 

and iterator.next raises an Exception :

7 juin 2010 11:49:56 org.geotools.data.wfs.v1_0_0.NonStrictWFSStrategy createFeatureReaderGET

ATTENTION: java.io.IOException: org.xml.sax.SAXParseException: Element or attribute do not match QName production: QName::=(NCName':')?NCName.

java.util.NoSuchElementException: Could not aquire feature:java.io.IOException: org.xml.sax.SAXParseException: Element or attribute do not match QName production: QName::=(NCName':')?NCName.

      at org.geotools.data.store.NoContentIterator.next(NoContentIterator.java:56)

      at org.geotools.data.store.NoContentIterator.next(NoContentIterator.java:41)

      at fr.magellium.kheper.etu_analyser.ui.views.ScenarioProductionView$6.widgetSelected(ScenarioProductionView.java:753)

      at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:228)

      at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)

      at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)

      at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3880)

      at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3473)

      at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405)

      at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)

      at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221)

      at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)

      at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)

      at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493)

      at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)

      at net.refractions.udig.internal.ui.UDIGApplication.start(UDIGApplication.java:136)

      at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)

      at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)

      at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)

      at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368)

      at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)

      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

      at java.lang.reflect.Method.invoke(Unknown Source)

      at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)

      at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)

      at org.eclipse.equinox.launcher.Main.run(Main.java:1311)

      at org.eclipse.equinox.launcher.Main.main(Main.java:1287)

Caused by: java.io.IOException: org.xml.sax.SAXParseException: Element or attribute do not match QName production: QName::=(NCName':')?NCName.

      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.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 fr.magellium.kheper.etu_analyser.ui.views.ScenarioProductionView$6.widgetSelected(ScenarioProductionView.java:750)

      ... 26 more

Caused by: org.xml.sax.SAXParseException: Element or attribute do not match QName production: QName::=(NCName':')?NCName.

      at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)

      at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)

      at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)

      at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)

      at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)

      at org.apache.xerces.impl.XMLEntityScanner.scanQName(Unknown Source)

      at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(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 org.apache.xerces.jaxp.SAXParserImpl.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)

 

I've readen this : http://www.mail-archive.com/geotools-gt2-users@.../msg07701.html

The WFS feature typename begins with a number (it's "1DC"), but I don't think it's the problem…

 

Could you help me please?

Thanks!

 

Regards,

 

Virginie BERRE - Ingénieur d'études et de développement

+33 (0)1 30 15 40 58 (n° direct)

[hidden email]


ZA Les Erables - bâtiment 4

66, route de Sartrouville
78230 Le Pecq
Tel: +33 (0)1 30 15 40 50 (standard)
Fax: +33 (0)1 30 15 40 60
www.magellium.fr

MAGELLIUM

MAGELLIUMPensez environnement ! N'imprimez ce mail que si c'est vraiment nécessaire !

 


_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel

 


_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel
Reply | Threaded
Open this post in threaded view
|

Re: Request with a GeoServer WFS and my geometry

Jody Garnett-2
In reply to this post by Jesse Eichar
uDig does support 1.1 (and in many ways the support is better). I think the trouble may be any difference between the CRS of myGeom and the actual CRS for your feature source.

You are correct that the typeName "1DC" is causing problems; it is because the system will try and make use of feature ids of the form "1DC.<NUMBER>" and that is not a valid id for an xml element.

Cheers,
Jody


On 07/06/2010, at 11:16 PM, Jesse Eichar wrote:

odd.  I wonder if the geoserver version is the problem.  The uDig WFS does not support 1.1.  Is it possible to check geoserver to see the requests that are made?  Or maybe verify the response?



On Mon, Jun 7, 2010 at 11:58 AM, Virginie BERRE <[hidden email]> wrote:

Dear all,

 

I try to make a request with a Filter between a geoserver WFS and a geometry.

I constructs the filter :

 

FilterFactory2 factory = (FilterFactory2) CommonFactoryFinder.getFilterFactory(GeoTools.getDefaultHints());

SimpleFeatureType schema = source.getSchema();

GeometryDescriptor geomDesc = schema.getGeometryDescriptor();

Name geomName = geomDesc.getName();

 

Intersects intersects = factory.intersects(factory.property(geomName), factory.literal(myGeom));

FeatureCollection<SimpleFeatureType, SimpleFeature> features = source.getFeatures(intersects);

Iterator<SimpleFeature> iterator = features.iterator();

while( iterator.hasNext() ){            

      SimpleFeature tabAssFeature = iterator.next();

                …

 

source.getFeatures(intersects) raises logs:

7 juin 2010 11:49:56 org.geotools.xml.XMLSAXHandler fatalError

GRAVE: FATAL Element or attribute do not match QName production: QName::=(NCName':')?NCName.

7 juin 2010 11:49:56 org.geotools.xml.XMLSAXHandler fatalError

GRAVE: col 616, line 1

7 juin 2010 11:49:56 org.geotools.data.wfs.v1_0_0.NonStrictWFSStrategy createFeatureReaderPOST

ATTENTION: java.io.IOException: org.xml.sax.SAXParseException: Element or attribute do not match QName production: QName::=(NCName':')?NCName.

7 juin 2010 11:49:56 org.geotools.xml.XMLSAXHandler fatalError

GRAVE: FATAL Element or attribute do not match QName production: QName::=(NCName':')?NCName.

7 juin 2010 11:49:56 org.geotools.xml.XMLSAXHandler fatalError

GRAVE: col 616, line 1

7 juin 2010 11:49:56 org.geotools.data.wfs.v1_0_0.NonStrictWFSStrategy createFeatureReaderGET

ATTENTION: java.io.IOException: org.xml.sax.SAXParseException: Element or attribute do not match QName production: QName::=(NCName':')?NCName.

 

and iterator.next raises an Exception :

7 juin 2010 11:49:56 org.geotools.data.wfs.v1_0_0.NonStrictWFSStrategy createFeatureReaderGET

ATTENTION: java.io.IOException: org.xml.sax.SAXParseException: Element or attribute do not match QName production: QName::=(NCName':')?NCName.

java.util.NoSuchElementException: Could not aquire feature:java.io.IOException: org.xml.sax.SAXParseException: Element or attribute do not match QName production: QName::=(NCName':')?NCName.

      at org.geotools.data.store.NoContentIterator.next(NoContentIterator.java:56)

      at org.geotools.data.store.NoContentIterator.next(NoContentIterator.java:41)

      at fr.magellium.kheper.etu_analyser.ui.views.ScenarioProductionView$6.widgetSelected(ScenarioProductionView.java:753)

      at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:228)

      at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)

      at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)

      at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3880)

      at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3473)

      at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405)

      at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)

      at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221)

      at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)

      at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)

      at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493)

      at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)

      at net.refractions.udig.internal.ui.UDIGApplication.start(UDIGApplication.java:136)

      at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)

      at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)

      at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)

      at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368)

      at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)

      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

      at java.lang.reflect.Method.invoke(Unknown Source)

      at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)

      at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)

      at org.eclipse.equinox.launcher.Main.run(Main.java:1311)

      at org.eclipse.equinox.launcher.Main.main(Main.java:1287)

Caused by: java.io.IOException: org.xml.sax.SAXParseException: Element or attribute do not match QName production: QName::=(NCName':')?NCName.

      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.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 fr.magellium.kheper.etu_analyser.ui.views.ScenarioProductionView$6.widgetSelected(ScenarioProductionView.java:750)

      ... 26 more

Caused by: org.xml.sax.SAXParseException: Element or attribute do not match QName production: QName::=(NCName':')?NCName.

      at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)

      at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)

      at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)

      at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)

      at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)

      at org.apache.xerces.impl.XMLEntityScanner.scanQName(Unknown Source)

      at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(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 org.apache.xerces.jaxp.SAXParserImpl.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)

 

I've readen this : http://www.mail-archive.com/geotools-gt2-users@.../msg07701.html

The WFS feature typename begins with a number (it's "1DC"), but I don't think it's the problem…

 

Could you help me please?

Thanks!

 

Regards,

 

Virginie BERRE - Ingénieur d'études et de développement

+33 (0)1 30 15 40 58 (n° direct)

[hidden email]


ZA Les Erables - bâtiment 4

66, route de Sartrouville
78230 Le Pecq
Tel: +33 (0)1 30 15 40 50 (standard)
Fax: +33 (0)1 30 15 40 60
www.magellium.fr

<image001.gif>

<image002.gif>Pensez environnement ! N'imprimez ce mail que si c'est vraiment nécessaire !

 

_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel


_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel


_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel