wfs-t insert fails due to empty GML attribute tag
-------------------------------------------------
Key: GEOT-2943
URL: http://jira.codehaus.org/browse/GEOT-2943
Project: GeoTools
Issue Type: Bug
Affects Versions: 2.6.0
Environment: server Linux RHEL 2.6.18 java 1.5
client WinXP SP3
my architecture looks like this : uDig1.2M9 --> geoserver-2.0.0 -->
ArcSDE-Datastore-2.6
Reporter: Rudi Hochmeister
I dont know if i should open this issue in geotools or geoserver domain, so
please forgive
when i am in the wrong project:
If I commit a native udig-PointTool Insert-operation, udig sends following
request (according to geoserver-logging):
<?xml version="1.0" encoding="UTF-8"?>
<Transaction xmlns="http://www.opengis.net/wfs"
xmlns:vienna="http://www.wien.gv.at/ows/wfs/gml"
xmlns:gml="http://www.opengis.net/gml"
xmlns:ogc="http://www.opengis.net/ogc"
version="1.0.0" service="WFS" lockAction="ALL">
<Insert>
<vienna:BAGIS_HILFSPUNKTE
fid="newvienna:BAGIS_HILFSPUNKTE.9223372036854775807">
<vienna:OBJECTID>0</vienna:OBJECTID>
<vienna:KOMMENTAR></vienna:KOMMENTAR>
<vienna:BA_MA21_ID></vienna:BA_MA21_ID>
<vienna:STATUS></vienna:STATUS>
<vienna:SHAPE>
<gml:Point srsName="EPSG:31256">
<gml:coordinates decimal="." cs="," ts="
">8055.168286854523,345160.1841013599</gml:coordinates>
</gml:Point>
</vienna:SHAPE>
<vienna:MOD_USER></vienna:MOD_USER>
</vienna:BAGIS_HILFSPUNKTE>
</Insert>
</Transaction>
but geoserver fails with StringIndexOutOfBoundsException:
java.lang.RuntimeException: Parsing failed for STATUS:
java.lang.StringIndexOutOfBoundsException: String index out of range: 0
at org.geotools.xml.impl.ParseExecutor.visit(ParseExecutor.java:158)
at
org.geotools.xml.impl.BindingWalker$BindingExecutionChain.execute(BindingWalker.java:216)
at org.geotools.xml.impl.BindingWalker.walk(BindingWalker.java:182)
at
org.geotools.xml.impl.ElementHandlerImpl.endElement(ElementHandlerImpl.java:222)
at
org.geotools.xml.impl.ParserHandler.endElement(ParserHandler.java:607)
at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown
Source)
at
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(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.geotools.xml.Parser.parse(Parser.java:223)
at org.geotools.xml.Parser.parse(Parser.java:169)
at org.geoserver.wfs.xml.v1_0_0.WfsXmlReader.read(WfsXmlReader.java:72)
at org.geoserver.ows.Dispatcher.parseRequestXML(Dispatcher.java:1154)
at org.geoserver.ows.Dispatcher.dispatch(Dispatcher.java:446)
at
org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:206)
....
Seems that the empty STATUS-attribute tag causes this exception.
Because when I manually (STATUS-tag commented out) run the underlying request
from geoserver demo request site:
<Transaction version="1.0.0" service="WFS" lockAction="ALL"
xmlns="http://www.opengis.net/wfs"
xmlns:vienna="http://www.wien.gv.at/ows/wfs/gml"
xmlns:gml="http://www.opengis.net/gml"
xmlns:ogc="http://www.opengis.net/ogc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Insert>
<vienna:BAGIS_HILFSPUNKTE
fid="newvienna:BAGIS_HILFSPUNKTE.9223372036854775807">
<vienna:OBJECTID>0</vienna:OBJECTID>
<vienna:KOMMENTAR></vienna:KOMMENTAR>
<vienna:BA_MA21_ID></vienna:BA_MA21_ID>
<!--<vienna:STATUS></vienna:STATUS>-->
<vienna:SHAPE>
<gml:Point srsName="EPSG:31256">
<gml:coordinates decimal="." cs="," ts="
">8055.168286854523,345160.1841013599</gml:coordinates>
</gml:Point>
</vienna:SHAPE>
<vienna:MOD_USER></vienna:MOD_USER>
</vienna:BAGIS_HILFSPUNKTE>
</Insert>
</Transaction>
I get a SUCCESS.
some more infos:
FeatureType-Definition of Attribute 'STATUS' is Integer - its the only Integer
in the schema :
<attribute>
<name>STATUS</name>
<minOccurs>0</minOccurs>
<maxOccurs>1</maxOccurs>
<nillable>true</nillable>
</attribute>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel