Error - NoSuchElementException - Could not aquire 
feature:org.geotools.data.DataSourceException
-----------------------------------------------------------------------------------------------

                 Key: GEOS-3404
                 URL: http://jira.codehaus.org/browse/GEOS-3404
             Project: GeoServer
          Issue Type: Bug
          Components: WFS
    Affects Versions: 1.7.6
         Environment: 1.7.6, windows Vista
            Reporter: Jonathan
            Assignee: Andrea Aime


I have a vector dataset stored in a MySQL table and am trying to do a WFS 
request on it with this URL:

http://localhost:8080/geoserver/wfs?request=getfeature&service=wfs&version=1.1.0&typename=urban_region&outputFormat=GML3&cql_filter=INTERSECT(spatial_data,POLYGON((52.78429031372057
 -3.8953366279600257,52.78429031372057 -2.6543542064157517,51.812992538486576 
-2.6543542064157517,51.812992538486576 -3.8953366279600257,52.78429031372057 
-3.8953366279600257)))

However I get back this error:

   <ows:ExceptionText>java.util.NoSuchElementException: Could not aquire 
feature:org.geotools.data.DataSourceException: Error Performing SQL query: 
SELECT id_primary, CODE, LEGEND, FILE_NAME, NUMBER, NAME, NUMBER0, ADMIN_NAME, 
TYPE, FERRY_FROM, FERRY_TO, FERRY_TIME, FERRY_TYPE, RESTRICTIO, ACCESS, 
AMENDED, USAGE, LOCATION, GIS, OWNER, NORTH, SOUTH, EAST, WEST, CLOCKWISE, 
ANTICLOCKW, IMPERIAL, METRIC,
AsText(spatial_data) AS spatial_data FROM urban_region Could not aquire 
feature:org.geotools.data.DataSourceException: Error Performing SQL query: 
SELECT id_primary, CODE, LEGEND, FILE_NAME, NUMBER, NAME, NUMBER0, ADMIN_NAME, 
TYPE, FERRY_FROM, FERRY_TO, FERRY_TIME, FERRY_TYPE, RESTRICTIO, ACCESS, 
AMENDED, USAGE, LOCATION, GIS, OWNER, NORTH, SOUTH, EAST, WEST, CLOCKWISE, 
ANTICLOCKW, IMPERIAL, METRIC, AsText(spatial_data) AS spatial_data FROM 
urban_region Error Performing SQL query: SELECT id_primary, CODE, LEGEND, 
FILE_NAME, NUMBER, NAME, NUMBER0, ADMIN_NAME, TYPE, FERRY_FROM, FERRY_TO, 
FERRY_TIME, FERRY_TYPE, RESTRICTIO, ACCESS, AMENDED, USAGE, LOCATION, GIS, 
OWNER, NORTH, SOUTH, EAST, WEST, CLOCKWISE, ANTICLOCKW, IMPERIAL, METRIC, 
AsText(spatial_data) AS spatial_data FROM urban_region 
You have an error in your SQL syntax; check the manual that corresponds to your 
MySQL server version for the right syntax to use near &amp;apos;USAGE, 
LOCATION, GIS, OWNER, NORTH, SOUTH, EAST, WEST, CLOCKWISE, ANTICLOCKW, 
IM&amp;apos; at line 1</ows:ExceptionText>



Strangely, if I change output format to GML2 (all other formats produce the 
first error, above), I get a slightly different error:



<ows:ExceptionText>
 error:Translator error Translator error Error reading Features Could not 
aquire feature:org.geotools.data.DataSourceException: Error Performing SQL 
query: SELECT id_primary, CODE, LEGEND, FILE_NAME, NUMBER, NAME, NUMBER0, 
ADMIN_NAME, TYPE, FERRY_FROM, FERRY_TO, FERRY_TIME, FERRY_TYPE, RESTRICTIO, 
ACCESS, AMENDED, USAGE, LOCATION, GIS, OWNER, NORTH, SOUTH, EAST, WEST, 
CLOCKWISE, ANTICLOCKW, IMPERIAL, METRIC, AsText(spatial_data) AS spatial_data 
FROM urban_region
Error Performing SQL query: SELECT id_primary, CODE, LEGEND, FILE_NAME, NUMBER, 
NAME, NUMBER0, ADMIN_NAME, TYPE, FERRY_FROM, FERRY_TO, FERRY_TIME, FERRY_TYPE, 
RESTRICTIO, ACCESS, AMENDED, USAGE, LOCATION, GIS, OWNER, NORTH, SOUTH, EAST, 
WEST, CLOCKWISE, ANTICLOCKW, IMPERIAL, METRIC, AsText(spatial_data) AS 
spatial_data FROM urban_region
You have an error in your SQL syntax; check the manual that corresponds to your 
MySQL server version for the right syntax to use near  &apos;USAGE, LOCATION, 
GIS, OWNER, NORTH, SOUTH, EAST, WEST, CLOCKWISE, ANTICLOCKW, IM&apos; at line 1
</ows:ExceptionText>


I should note that the data displays fine in WMS, and that the same URL works 
perfectly when I use a different layer instead of urban_region.
This may be an error with the dataset (again, it display fine in WMS though), 
but a quick google search shows this error has occured before in GeoServer 
before being fixed.

-- 
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
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to