jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • GeoServer
  • GEOS-2842

WFS-T feature insert Failure

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Critical Critical
  • Resolution: Not A Bug
  • Affects Version/s: 1.7.3
  • Fix Version/s: 1.7.5
  • Component/s: WFS
  • Labels:
    None
  • Environment:
    windows - openlayers

Description

after creating a new and fresh shapefile with QGIS, I use a WFS-T INSERT operation with OpenLayers and cusom attributes. when i use it in a single session in IE , I can add new features as I want. but , after closing IE and starting a new session , WFS- transaction response will be failed with this error :

Java.io.IO Exception : current fid index is null, next must call before write()

please help me to solve this problem.

  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. 1.PNG
    98 kB
    09/Apr/09 7:02 AM

Issue Links

depends upon

Improvement - An improvement or enhancement to an existing feature or task. GEOS-3117 Support validation of WFS-T requests

  • Major - Major loss of function.
  • Open - The issue is open and ready for the assignee to start work on it.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
brandon niemczyk added a comment - 10/Apr/09 2:54 PM

I'm experiencing the same issue with 1.7.2 (both windows and linux), I've tested with the states shapefile and the following xml request:

<wfs:Transaction service="WFS" version="1.1.0" xmlns:sde="http://edats.com/sde" xmlns:wfs="http://www.opengis.net/wfs" xmlns="http://www.opengis.net/ogc" xmlns:topp="http://www.openplans.org/topp" xmlns:gml="http://www.opengis.net/gml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/WFS-transaction.xsd"><wfs:Insert><topp:states><topp:the_geom><gml:MultiPolygon srsName="EPSG:4326"><gml:PolygonMember><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates decimal="." cs="," ts=" ">-121.663,47.464 -71.61,45.561 -98.829,27.526 -121.663,47.464</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></gml:PolygonMember></gml:MultiPolygon></topp:the_geom></topp:states></wfs:Insert></wfs:Transaction>

Show
brandon niemczyk added a comment - 10/Apr/09 2:54 PM I'm experiencing the same issue with 1.7.2 (both windows and linux), I've tested with the states shapefile and the following xml request: <wfs:Transaction service="WFS" version="1.1.0" xmlns:sde="http://edats.com/sde" xmlns:wfs="http://www.opengis.net/wfs" xmlns="http://www.opengis.net/ogc" xmlns:topp="http://www.openplans.org/topp" xmlns:gml="http://www.opengis.net/gml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/WFS-transaction.xsd"><wfs:Insert><topp:states><topp:the_geom><gml:MultiPolygon srsName="EPSG:4326"><gml:PolygonMember><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates decimal="." cs="," ts=" ">-121.663,47.464 -71.61,45.561 -98.829,27.526 -121.663,47.464</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></gml:PolygonMember></gml:MultiPolygon></topp:the_geom></topp:states></wfs:Insert></wfs:Transaction>
Hide
Permalink
Andrea Aime added a comment - 02/Jun/09 11:30 AM

Upping priorities for jiras we're looking forward to actually fix in 1.7.5

Show
Andrea Aime added a comment - 02/Jun/09 11:30 AM Upping priorities for jiras we're looking forward to actually fix in 1.7.5
Hide
Permalink
Andrea Aime added a comment - 03/Jun/09 7:58 AM

Brandon, looked into the transaction you provided, and it's invalid. You're using WFS version 1.1.0 yet you're expressing the geometry in GML2 instead of GML3.

Unfortunately GeoServer is not telling us so, by debugging I noticed that the polygon was empty, this is because the parser skips over the parts that it cannot undestand. And as far as I remember, WFS insertions cannot be validatated, thought I don't remember the exact reason (I think it is because the wfs schema basically says that any kind of element can be put inside the Insert one, but I'm not sure, Justin?), anyways, the inability to validate them means also we don't have a way to report back an error message.

This fixed transaction works:

<wfs:Transaction service="WFS" version="1.0.0"
	xmlns:sde="http://edats.com/sde" xmlns:wfs="http://www.opengis.net/wfs"
	xmlns="http://www.opengis.net/ogc" xmlns:topp="http://www.openplans.org/topp"
	xmlns:gml="http://www.opengis.net/gml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd
                        http://www.openplans.org/topp http://localhost:8080/geoserver/wfs?request=DescribeFeatureType&amp;service=wfs&amp;version=1.0.0&amp;typeName=topp:states">
	<wfs:Insert>
		<topp:states>
			<topp:the_geom>
				<gml:MultiPolygon srsName="EPSG:4326">
					<gml:polygonMember>
						<gml:Polygon srsName="EPSG:4326">
							<gml:outerBoundaryIs>
								<gml:LinearRing>
									<gml:coordinates decimal="." cs="," ts=" ">
										-121.663,47.464 -71.61,45.561 -98.829,27.526 -121.663,47.464
									</gml:coordinates>
								</gml:LinearRing>
							</gml:outerBoundaryIs>
						</gml:Polygon>
					</gml:polygonMember>
				</gml:MultiPolygon>
			</topp:the_geom>
		</topp:states>
	</wfs:Insert>
</wfs:Transaction>

So the main problem here is not in the code not working, but in the lack of proper error reporting.... which I don't know how we can put togheter thought, unless we find a way to validate the xml before using it.
Justin, maybe the parser could mark down what it skipped and that could be used to report an error message in strict=true mode?

Show
Andrea Aime added a comment - 03/Jun/09 7:58 AM Brandon, looked into the transaction you provided, and it's invalid. You're using WFS version 1.1.0 yet you're expressing the geometry in GML2 instead of GML3. Unfortunately GeoServer is not telling us so, by debugging I noticed that the polygon was empty, this is because the parser skips over the parts that it cannot undestand. And as far as I remember, WFS insertions cannot be validatated, thought I don't remember the exact reason (I think it is because the wfs schema basically says that any kind of element can be put inside the Insert one, but I'm not sure, Justin?), anyways, the inability to validate them means also we don't have a way to report back an error message. This fixed transaction works:
<wfs:Transaction service="WFS" version="1.0.0"
	xmlns:sde="http://edats.com/sde" xmlns:wfs="http://www.opengis.net/wfs"
	xmlns="http://www.opengis.net/ogc" xmlns:topp="http://www.openplans.org/topp"
	xmlns:gml="http://www.opengis.net/gml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd
                        http://www.openplans.org/topp http://localhost:8080/geoserver/wfs?request=DescribeFeatureType&amp;service=wfs&amp;version=1.0.0&amp;typeName=topp:states">
	<wfs:Insert>
		<topp:states>
			<topp:the_geom>
				<gml:MultiPolygon srsName="EPSG:4326">
					<gml:polygonMember>
						<gml:Polygon srsName="EPSG:4326">
							<gml:outerBoundaryIs>
								<gml:LinearRing>
									<gml:coordinates decimal="." cs="," ts=" ">
										-121.663,47.464 -71.61,45.561 -98.829,27.526 -121.663,47.464
									</gml:coordinates>
								</gml:LinearRing>
							</gml:outerBoundaryIs>
						</gml:Polygon>
					</gml:polygonMember>
				</gml:MultiPolygon>
			</topp:the_geom>
		</topp:states>
	</wfs:Insert>
</wfs:Transaction>
So the main problem here is not in the code not working, but in the lack of proper error reporting.... which I don't know how we can put togheter thought, unless we find a way to validate the xml before using it. Justin, maybe the parser could mark down what it skipped and that could be used to report an error message in strict=true mode?
Hide
Permalink
Andrea Aime added a comment - 03/Jun/09 11:42 AM

Closing as "not a bug" since the request was invalid. Yet, we'll open another jira to try to get better error reporting (will link to it when it's up)

Show
Andrea Aime added a comment - 03/Jun/09 11:42 AM Closing as "not a bug" since the request was invalid. Yet, we'll open another jira to try to get better error reporting (will link to it when it's up)
Hide
Permalink
Justin Deoliveira added a comment - 03/Jun/09 11:43 AM

Unfortunately doing validation of WFS-T requests is not by any means trivial to solve. ANd not really doable on 1.7.x unfortunately. It is fixable on trunk but still requires a bit of work. So I opened GEOS-3117. Unfortunately this will have to be pushed back to 2..x

Show
Justin Deoliveira added a comment - 03/Jun/09 11:43 AM Unfortunately doing validation of WFS-T requests is not by any means trivial to solve. ANd not really doable on 1.7.x unfortunately. It is fixable on trunk but still requires a bit of work. So I opened GEOS-3117. Unfortunately this will have to be pushed back to 2..x
Hide
Permalink
erfan nazari added a comment - 05/Jun/09 12:47 AM

I migrate to PostGIS and problem is solved automatically. I think it was beacause of a damaged shapefile. I used Quantum GIS to make this shapefile but, it seems invalid file format and geoserver couldnt insert new data into that. Thanks for your attention.

Show
erfan nazari added a comment - 05/Jun/09 12:47 AM I migrate to PostGIS and problem is solved automatically. I think it was beacause of a damaged shapefile. I used Quantum GIS to make this shapefile but, it seems invalid file format and geoserver couldnt insert new data into that. Thanks for your attention.
Hide
Permalink
Surya Pratap added a comment - 23/Aug/11 6:19 AM

I get this error in GeoServer 2.1.1

when trying to create a new feature using the below query:

<wfs:Transaction
xmlns:wfs="http://www.opengis.net/wfs" service="WFS" version="1.0.0"
xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<wfs:Insert>
<feature:Roads xmlns:feature="http://localhost:8080/geoserver/moz">
<feature:the_geom>
<gml:LineString xmlns:gml="http://www.opengis.net/gml" srsName="EPSG:4326">
<gml:coordinates decimal="." cs="," ts=" ">
35.584319755,-16.256021505 35.647538505,-16.233177755 35.679944755,-16.218302755
</gml:coordinates>
</gml:LineString>
</feature:the_geom>
</feature:Roads>
</wfs:Insert>
<wfs:Insert>
<feature:Roads xmlns:feature="http://localhost:8080/geoserver/moz">
<feature:the_geom>
<gml:LineString xmlns:gml="http://www.opengis.net/gml" srsName="EPSG:4326">
<gml:coordinates decimal="." cs="," ts=" ">
35.679944755,-16.218302755 35.696944755,-16.239552755
</gml:coordinates>
</gml:LineString>
</feature:the_geom>
</feature:Roads>
</wfs:Insert>
</wfs:Transaction>

the following error is returned:
<?xml version="1.0" ?>
<ServiceExceptionReport
version="1.2.0"
xmlns="http://www.opengis.net/ogc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/ogc http://schemas.opengis.net/wfs/1.0.0/OGC-exception.xsd">
<ServiceException>
java.io.IOException: Current fid index is null, next must be called before write()
Current fid index is null, next must be called before write()
</ServiceException>
</ServiceExceptionReport>

Show
Surya Pratap added a comment - 23/Aug/11 6:19 AM I get this error in GeoServer 2.1.1 when trying to create a new feature using the below query: <wfs:Transaction xmlns:wfs="http://www.opengis.net/wfs" service="WFS" version="1.0.0" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <wfs:Insert> <feature:Roads xmlns:feature="http://localhost:8080/geoserver/moz"> <feature:the_geom> <gml:LineString xmlns:gml="http://www.opengis.net/gml" srsName="EPSG:4326"> <gml:coordinates decimal="." cs="," ts=" "> 35.584319755,-16.256021505 35.647538505,-16.233177755 35.679944755,-16.218302755 </gml:coordinates> </gml:LineString> </feature:the_geom> </feature:Roads> </wfs:Insert> <wfs:Insert> <feature:Roads xmlns:feature="http://localhost:8080/geoserver/moz"> <feature:the_geom> <gml:LineString xmlns:gml="http://www.opengis.net/gml" srsName="EPSG:4326"> <gml:coordinates decimal="." cs="," ts=" "> 35.679944755,-16.218302755 35.696944755,-16.239552755 </gml:coordinates> </gml:LineString> </feature:the_geom> </feature:Roads> </wfs:Insert> </wfs:Transaction> the following error is returned: <?xml version="1.0" ?> <ServiceExceptionReport version="1.2.0" xmlns="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/ogc http://schemas.opengis.net/wfs/1.0.0/OGC-exception.xsd"> <ServiceException> java.io.IOException: Current fid index is null, next must be called before write() Current fid index is null, next must be called before write() </ServiceException> </ServiceExceptionReport>
Hide
Permalink
Andrea Aime added a comment - 23/Aug/11 7:30 AM

This requires a new jira, you also need to report which data store you are using, provide a full stack trace (which you will get if you enable "verbose exception reporting" in the "server" configuration panel) and provide a sample data set (it may be empty, we just need the structure) to allow the developers to reproduce the issue

Show
Andrea Aime added a comment - 23/Aug/11 7:30 AM This requires a new jira, you also need to report which data store you are using, provide a full stack trace (which you will get if you enable "verbose exception reporting" in the "server" configuration panel) and provide a sample data set (it may be empty, we just need the structure) to allow the developers to reproduce the issue

People

  • Assignee:
    Andrea Aime
    Reporter:
    erfan nazari
Vote (1)
Watch (3)

Dates

  • Created:
    09/Apr/09 7:02 AM
    Updated:
    23/Aug/11 7:30 AM
    Resolved:
    03/Jun/09 11:42 AM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.