Hi all,
I work to build a visualization tool for the Government of Canada. We want to use OpenLayers with geoserver to access our new PostGIS database.
I’m doing tests to see what it has to offer. Everything is fine so far, but I have so trouble with the GetFeatureInfo function.
When I make a manual request in Firefox I always get an empty html table.
/*******Code
<html><body>
<table border='1'>
<tr><th colspan=
2
scope='col'>
villes
</th></tr>
<tr>
<td>
name
</td>
<td>
geom
</td>
</tr>
</table>
<p>
</body></html>
CODE **********/
The rows are named properly so I guess that the query to the database is well made.
I checked the log file of geoserver, and the output is below for the request. I can’t see if it is successful or not. Like, if the query in the table gave what it was supposed to. The last 3 lines of the output doesn’t clearly indicate that the query was well made.
I would like to know what is going wrong with the request, why the returned html table is empty like that.
Any help will be greatly appreciated.
Thanks a lot!
Marc
The log file in Geoserver give me this:
355129 [FINE] org.vfny.geoserver.servlets.AbstractService - reading request: LAYERS=topp%3Avilles&FORMAT=image%2Fpng&TRANSPARENT=true&REPROJECT=true&TILED=true&QUERYFLAG=true&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_xml&SRS=EPSG%3A4326&BBOX=-168.222656%2C21.09375%2C-4.746094%2C73.828125&X=1109&Y=315&INFO_FORMAT=text%2Fhtml&QUERY_LAYERS=topp%3Avilles&REDIUS=20&WIDTH=1860&HEIGHT=600
355130 [FINEST] org.vfny.geoserver.util.requests.readers.KvpRequestReader - adding simple element -168.222656
355130 [FINEST] org.vfny.geoserver.util.requests.readers.KvpRequestReader - adding simple element 21.09375
355130 [FINEST] org.vfny.geoserver.util.requests.readers.KvpRequestReader - adding simple element -4.746094
355131 [FINEST] org.vfny.geoserver.util.requests.readers.KvpRequestReader - adding simple element 73.828125
355131 [FINEST] org.vfny.geoserver.util.requests.readers.KvpRequestReader - adding simple element topp:villes
355131 [FINE] org.vfny.geoserver.global.Data - getting type topp:villes
355132 [FINEST] org.vfny.geoserver.util.requests.readers.KvpRequestReader - adding simple element topp:villes
355557 [FINE] org.vfny.geoserver.global.Data - getting type topp:villes
355558 [FINER] org.vfny.geoserver.servlets.AbstractService - serviceRequest provided with HttpServletRequest: GET /geoserver/wms?LAYERS=topp%3Avilles&FORMAT=image%2Fpng&TRANSPARENT=true&REPROJECT=true&TILED=true&QUERYFLAG=true&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_xml&SRS=EPSG%3A4326&BBOX=-168.222656%2C21.09375%2C-4.746094%2C73.828125&X=1109&Y=315&INFO_FORMAT=text%2Fhtml&QUERY_LAYERS=topp%3Avilles&REDIUS=20&WIDTH=1860&HEIGHT=600 HTTP/1.1
Host: ulysse.cmc.ec.gc.ca:8081
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.4) Gecko/20070515 Firefox/2.0.0.4
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,/;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Cookie: JSESSIONID=enfn8rcqyurs; SITESERVER=ID=ee005ec8438c88fcad73313e67f93517; MANTIS_VIEW_ALL_COOKIE=47; MANTIS_PROJECT_COOKIE=10
Cache-Control: max-age=0
355559 [INFO] org.vfny.geoserver.servlets.AbstractService - handling request: org.vfny.geoserver.wms.requests.GetFeatureInfoRequest@anonymised.com
355559 [FINE] org.vfny.geoserver.servlets.AbstractService - strategy is: PARTIAL-BUFFER2
355560 [FINER] org.vfny.geoserver.servlets.AbstractService - executing request
355560 [FINER] org.vfny.geoserver.wms.responses.GetFeatureInfoResponse - ENTRY org.vfny.geoserver.wms.requests.GetFeatureInfoRequest@anonymised.com
355561 [FINER] org.vfny.geoserver.wms.responses.GetFeatureInfoResponse - request format is text/html
355561 [FINER] org.vfny.geoserver.wms.responses.GetFeatureInfoResponse - found GetFeatureInfoDelegate class org.vfny.geoserver.wms.responses.featureInfo.HTMLTableFeatureInfoResponse
355562 [FINE] org.geotools.data.postgis.PostgisDataStore - get Feature source called on villes
355562 [FINE] org.geotools.data.postgis.PostgisDataStore - returning pg feature locking
355563 [FINER] ExpressionAttribute - ENTRY geom
355563 [FINEST] org.geotools.filter.AttributeExpressionImpl - schema: DefaultFeatureType [name=villes , namespace=http://www.openplans.org/topp , abstract=false , types=(DefaultAttributeType [name=name , type=class java.lang.String , nillable=true, min=1, max=1],DefaultAttributeType [name=geom , type=class com.vividsolutions.jts.geom.Point , nillable=true, min=1, max=1],)]
attribute: geom
355564 [FINE] org.geotools.data.postgis.PostgisDataStore - get Feature source called on villes
355564 [FINE] org.geotools.data.postgis.PostgisDataStore - returning pg feature locking
355565 [FINE] org.geotools.data.postgis.PostgisDataStore - get Feature source called on villes
355565 [FINE] org.geotools.data.postgis.PostgisDataStore - returning pg feature locking
355566 [FINE] org.geotools.data.postgis.PostgisDataStore - get Feature source called on villes
355566 [FINE] org.geotools.data.postgis.PostgisDataStore - returning pg feature locking
355567 [FINER] org.vfny.geoserver.servlets.AbstractService - execution succeed
355567 [FINEST] org.vfny.geoserver.servlets.AbstractService - getting strategy output
355568 [FINER] org.vfny.geoserver.servlets.AbstractService - strategy output is: org.vfny.geoserver.util.PartialBufferedOutputStream2
355568 [FINE] org.vfny.geoserver.servlets.AbstractService - mime type is: text/html;charset=UTF-8
355568 [FINER] org.vfny.geoserver.wms.responses.GetFeatureInfoResponse - asking delegate for write to org.vfny.geoserver.util.PartialBufferedOutputStream2@anonymised.com
355569 [FINEST] org.geotools.filter.GeometryFilterImpl - filter type match:true; in:7; out:7
355571 [FINEST] org.geotools.filter.GeometryFilterImpl - left geom match:true; in:POLYGON ((-70.92773442258064 46.318359375, -70.57617192365592 46.318359375, -70.57617192365592 45.966796875, -70.92773442258064 45.966796875, -70.92773442258064 46.318359375)); out:POLYGON ((-70.92773442258064 46.318359375, -70.57617192365592 46.318359375, -70.57617192365592 45.966796875, -70.92773442258064 45.966796875, -70.92773442258064 46.318359375))
355571 [FINEST] org.geotools.filter.GeometryFilterImpl - right geom match:true; in:null; out:null
355572 [FINE] org.geotools.data.jdbc.JDBC1DataStore - calling sql builder with filter Filter.NONE
355572 [FINER] AbstractFilter - ENTRY 12,345
355573 [FINE] org.geotools.data.jdbc.JDBC1DataStore - sql is SELECT “id”, “name”, encode(AsBinary(force_2d(“geom”), ‘XDR’),‘base64’) FROM “public”.“villes” WHERE TRUE
355573 [FINE] org.geotools.data.jdbc.JDBC1DataStore - About to execute query: SELECT “id”, “name”, encode(AsBinary(force_2d(“geom”), ‘XDR’),‘base64’) FROM “public”.“villes” WHERE TRUE
355574 [FINE] org.geotools.data.jdbc.ConnectionPool - Getting available connection.
355577 [FINE] org.geotools.data.jdbc.ConnectionPool$ConnectionListManager - Connection closed - adding to available connections.
355579 [INFO] org.vfny.geoserver.servlets.AbstractService - Service handled