WFS - decimal feature attributes too restrictive for decimal places
-------------------------------------------------------------------
Key: GEOT-845
URL: http://jira.codehaus.org/browse/GEOT-845
Project: GeoTools
Type: Improvement
Components: xml, wfs
Environment: JRE 1.5, Win XP, udig version 1.1M7
Reporter: Michal Galet
Assigned to: David Zwiers
The exception is thrown when trying to parse large attributes in WFS response
like:
<ber:at_26071>406446400000000000360</ber:at_26071>
Where attribute is defined(DesctibeFeatureType) as:
<xsd:element name="at_26071" nillable="true" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:decimal">
<xsd:totalDigits value="38"/>
<xsd:fractionDigits value="0"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
There is no restriction in WFS1.0 specification for decimal length, however it
could be good to check the data type and consider using java.math.BigDecimal or
other suitable data type. I haven't found where is the max number for decimal
types defined.
Exception stack:
java.io.IOException: org.xml.sax.SAXException: Too many decimal places
at org.geotools.xml.gml.FCBuffer.hasNext(FCBuffer.java:305)
at
org.geotools.data.wfs.WFSFeatureReader.loadElement(WFSFeatureReader.java:170)
at
org.geotools.data.wfs.WFSFeatureReader.hasNext(WFSFeatureReader.java:154)
at
org.geotools.data.wfs.WFSDataStore.getFeatureReader(WFSDataStore.java:749)
at
org.geotools.data.DefaultFeatureResults.reader(DefaultFeatureResults.java:147)
at
net.refractions.udig.tool.info.internal.DataStoreDescribeLayer.info2(DataStoreDescribeLayer.java:71)
at
net.refractions.udig.tool.info.internal.InfoView2.searchImplementation(InfoView2.java:190)
at net.refractions.udig.ui.SearchPart$1.run(SearchPart.java:472)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:76)
Caused by: org.xml.sax.SAXException: Too many decimal places
at org.geotools.xml.XMLSAXHandler.endElement(XMLSAXHandler.java:230)
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.DTDConfiguration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.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.WFSFeatureReader.run(WFSFeatureReader.java:124)
--
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
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel