[
http://jira.codehaus.org/browse/GEOT-2681?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Mauricio Pazos reopened GEOT-2681:
----------------------------------
> CQL implementation doesn't handle large numbers
> -----------------------------------------------
>
> Key: GEOT-2681
> URL: http://jira.codehaus.org/browse/GEOT-2681
> Project: GeoTools
> Issue Type: Bug
> Components: core cql
> Affects Versions: 2.5.8, 2.6-RC1
> Reporter: Russell Petty
> Assignee: Mauricio Pazos
> Fix For: 2.6-RC1
>
>
> Hi Russell,
> We are currently using the geotools library to parse queries to our
> geological unit web service. We use the CQL libraries shipped with Geotools
> for this.
> We came across an issue with the CQL classes when we try to parse a query
> with a number which has 16 digits. For example if we try to parse something
> like
> Gmlid = 123456789012345
> Using CQL.toFilter () it fails with the following exception. I assume this is
> happening because geotools library is trying to store this large number as an
> integer. This is a very critical issue for our system as we use these large
> number every where in our systems as ids.
> Exception in thread "main" java.lang.NumberFormatException: For input string:
> "123456789012345"
> at java.lang.NumberFormatException.forInputString(Unknown Source)
> at java.lang.Integer.parseInt(Unknown Source)
> at java.lang.Integer.parseInt(Unknown Source)
> at
> org.geotools.filter.text.commons.AbstractFilterBuilder.buildLiteralInteger(AbstractFilterBuilder.java:369)
> at
> Regards
> Anuruddha
> ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
> Russell,
> it looks to me like an implementation limitation in the CQL parser. Much
> of this is autogenerated so it should be straightforward to fix.
> The database drivers and filter implementation support Java Long. There
> is no reason of which I am aware for the CQL implementation to not
> support at least Long. BigInteger will cause more trouble, but Long will
> give you 18 digits.
> The XSD spec requires a minimum of 18 digit support.
> http://www.w3.org/TR/xmlschema-2/#decimal
> Kind regards,
> Ben.
> ------------------------------------------------------------------------------------------------------------------------------------------------
> Could the code please be changed to handle at least Longs? This would be big
> enough for Anuruddha.
--
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
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel