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@xxxxxxxxxxxxxxxxxxxxx/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)
virginie.berre@xxxxxxxxxxxx
|
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
|

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