Opened 19 years ago

Closed 19 years ago

#1109 closed defect (fixed)

[oracle] WMS GetFeatureInfo gives internal server error

Reported by: bartvde@… Owned by: fsimon@…
Priority: high Milestone:
Component: Input - Native Oracle Spatial Support Version: 4.4
Severity: normal Keywords:
Cc:

Description

The following request is used:

http://myserver/cgi-bin/oracle/mapserv.exe?map=%2Fms4w%2Fapps%2Fgeneral%2Fmap%2Foracle.map&LAYERS=Gemeentes&REQUEST=GetFeatureInfo&SERVICE=WMS&FORMAT=image%2Fpng&SLD_BODY=&STYLES=&HEIGHT=450&QUERY_LAYERS=Gemeentes&VERSION=1.1.0&SRS=EPSG%3A28992&WIDTH=750&BBOX=-116666.66666666701%2C284999.99999999983%2C441666.66666666698%2C620000.00000000023&TRANSPARENT=TRUE&INFO_FORMAT=application%2Fvnd.ogc.gml&X=450&EXCEPTIONS=application%2Fvnd.ogc.se_xml&Y=73

Only message in the error file is:
Premature end of script headers: mapserv.exe

Will attach test case (mapfile + Oracle 10 dump) later on.

Works fine with same data but then in shapefile.

Attachments (2)

mapserv (30.5 KB ) - added by fsimon@… 19 years ago.
Mapserver test
sqlresult.log (49.9 KB ) - added by bartvde@… 19 years ago.
sqlplus spool of query result

Download all attachments as: .zip

Change History (30)

comment:1 by bartvde@…, 19 years ago

Export created with a 10g client from a 10.1.0.3 database.
Export created with user mrg and array fetch buffer size: 30000.

Attachment is too bug for bugzilla so can be downloaded from:

ftp://ftp.vz.geodan.nl/pub/mapserver/bug1109.tgz

comment:2 by fsimon@…, 19 years ago

Hi Bart, just one little thing, did you defined the "USING UNIQUE column" for
your data string? Can you test it for the #1109 and #1110 bugs?

comment:3 by bartvde@…, 19 years ago

Hi Fernando,

this is the DATA statement I used, so USING UNIQUE is in there with a numerical
column:

DATA "LOCATIE FROM MRG_GEMEENTEN USING UNIQUE ID SRID 90112"

Bart

comment:4 by fsimon@…, 19 years ago

Status: newassigned
Ok, thanks.
Just one more info, how did you defined your layer? I want to reproduce the same
universe. 

comment:5 by bartvde@…, 19 years ago

This my LAYER definition:

  LAYER
      DATA "LOCATIE FROM MRG_GEMEENTEN USING UNIQUE ID SRID 90112"
      CONNECTIONTYPE oraclespatial
      CONNECTION "mrg/mrg@archis"
        METADATA
          WMS_TITLE "Gemeentes"
          WMS_ABSTRACT "Gemeentes via UMN Mapserver"
          WMS_SRS "EPSG:28992"
          WFS_TITLE "Gemeentes"
          wms_extent "10000 305000 280000 619000"
        END
      NAME "Gemeentes"
      SIZEUNITS PIXELS
      STATUS ON
      TOLERANCE 0
      TOLERANCEUNITS PIXELS
      TYPE POLYGON
      DUMP TRUE
      TEMPLATE "blank.html"
      UNITS METERS
        PROJECTION
          "init=epsg:28992"
        END


      CLASS
        NAME "Gemeentegrenzen"
        STYLE
          MAXSIZE 100
          MINSIZE 1
            OUTLINECOLOR 255 0 0
          SIZE 1
          SYMBOL 0
        END
      END
    END

comment:6 by fsimon@…, 19 years ago

Hi Bart,
    Can you test this for 4.4.1 version? (win binaries)
    Thanks.
Fernando Simon

comment:7 by bartvde@…, 19 years ago

Hi Fernando,

I checked with 4.4.1, same problem.

Bart

comment:8 by fsimon@…, 19 years ago

Hi Bart,
    Can be the same problem that EXTENT bug.
    Did you tested without Oracle conection?
    Thanks.

Fernando Simon

comment:9 by bartvde@…, 19 years ago

Hi Fernando,

if I use a shapefile datasource with the same MAP file all works fine.

Bart

comment:10 by fsimon@…, 19 years ago

Resolution: fixed
Status: assignedclosed
Fixed in CVS version of maporaclespatial.c in Mapserver 4.5.
Thanks.
    

comment:11 by bartvde@…, 19 years ago

Fernando, do I need more than the last version of maporaclespatial.c to test this?

I tested just now with:

$Id: maporaclespatial.c,v 1.18 2005/02/04 13:10:46 rodrigo Exp $

But still have the same internal server error.

comment:12 by fsimon@…, 19 years ago

Hi,
   No, I defined the same layer that you defined. I saw little problems in my
server with projections, you can try without layer projection for test.
   I tested with and without extent metadata "wms_extent "10000 305000 280000
619000". And both worked correctly.
   You can try define your layer data as:
     DATA "LOCATIE FROM MRG_GEMEENTEN USING UNIQUE ID SRID 90112 VERSION 10g" if
you ar using Oracle 10g OR
     DATA "LOCATIE FROM MRG_GEMEENTEN USING UNIQUE ID SRID 90112 VERSION 9i" for
Oracle 9i.
   You can try to compile mapserver with "--enable-debug" and after define in
your layer the option "debug on". After this when you execute any request for
mapserver it return in error_log of apache many informations, and you can see
what function is generating the error.
   Thanks.
   

comment:13 by bartvde@…, 19 years ago

Hi Fernando,

I have debug on. For GetMap I get debug info. Using GetFeatureInfo I only get 1 
line in the Apache error log (premature end of script headers).

[Fri Feb 04 17:08:28 2005] [error] [client 192.168.3.4] 
msOracleSpatialLayerOpen called with: LOCATIE FROM (SELECT * FROM 
MRG_GEMEENTEN) USING UNIQUE ID SRID 90112 VERSION 10g\r
[Fri Feb 04 17:08:28 2005] [error] [client 192.168.3.4] 
msOracleSpatialLayerOpen. Shared connection not available. Creating one.\r
[Fri Feb 04 17:08:28 2005] [error] [client 192.168.3.4] msConnPoolRegister
(Gemeentes,mrg/mrg@archis,0076F450)\r
[Fri Feb 04 17:08:28 2005] [error] [client 192.168.3.4] 
msOracleSpatialLayerFreeItemInfo was called.\r
[Fri Feb 04 17:08:28 2005] [error] [client 192.168.3.4] 
msOracleSpatialLayerWhichShapes was called.\r
[Fri Feb 04 17:08:28 2005] [error] [client 192.168.3.4] 
msOracleSpatialLayerWhichShapes. Using this Sql to retrieve the data: SELECT 
ID, LOCATIE FROM (SELECT * FROM MRG_GEMEENTEN) WHERE SDO_FILTER( LOCATIE, 
MDSYS.SDO_GEOMETRY(2003, 90112, NULL,MDSYS.SDO_ELEM_INFO_ARRAY
(1,1003,3),MDSYS.SDO_ORDINATE_ARRAY
(79654.0736,448054.666,132934.815,480023.111) ),'querytype=window') = 'TRUE'\r
[Fri Feb 04 17:08:28 2005] [error] [client 192.168.3.4] 
msOracleSpatialLayerFreeItemInfo was called.\r
[Fri Feb 04 17:08:28 2005] [error] [client 192.168.3.4] 
msOracleSpatialLayerClose was called. Layer connection: mrg/mrg@archis\r
[Fri Feb 04 17:08:28 2005] [error] [client 192.168.3.4] 
msOracleSpatialLayerClose. Cleaning layerinfo handlers.\r
[Fri Feb 04 17:08:28 2005] [error] [client 192.168.3.4] 
msOracleSpatialLayerClose. Cleaning Oracle handlers.\r
[Fri Feb 04 17:08:28 2005] [error] [client 192.168.3.4] msConnPoolRelease
(Gemeentes,mrg/mrg@archis,0076F450)\r
[Fri Feb 04 17:08:28 2005] [error] [client 192.168.3.4] msConnPoolClose
(mrg/mrg@archis,0076F450)\r
[Fri Feb 04 17:08:28 2005] [error] [client 192.168.3.4] msDrawMap(): Layer 0 
(Gemeentes), 1.234s\r
[Fri Feb 04 17:08:28 2005] [error] [client 192.168.3.4] msDrawMap(): Drawing 
Label Cache, 0.000s\r
[Fri Feb 04 17:08:28 2005] [error] [client 192.168.3.4] msDrawMap() total time: 
1.234s\r
[Fri Feb 04 17:08:28 2005] [error] [client 192.168.3.4] 
msOracleSpatialLayerClose was called. Layer connection: mrg/mrg@archis\r
[Fri Feb 04 17:08:29 2005] [error] [client 192.168.3.4] Fri Feb 04 17:08:28 
2005 - msRASTERLayerOpen(): General error message. Attempt to open a RASTER 
layer, but this is only supported after a raster query.\r, referer: 
http://www.vz.geodan.nl:1111/geoservices/index.phtml
[Fri Feb 04 17:09:05 2005] [error] [client 192.168.3.4] Premature end of script 
headers: mapserv.exe, referer: 
http://www.vz.geodan.nl:1111/chameleon/widgets/GeoservicesQuery/GeoservicesQuery
Results.phtml?
sid=42039d80825e0&RADIUS=3&FEATURE_COUNT=5&include_empty=false&NAV_INPUT_COORDIN
ATES=506,238

Removing PROJECTION does not make any difference, same crash.

Any more ideas?


comment:14 by fsimon@…, 19 years ago

Hi,
   I tested with cvs version (today) and work correctly.
   I used this layer definition: (I changed this parameters for my local view:
data, projection, wms_extent, debug and processing) 
    LAYER
      data "coordenada from (select coordenada, nm_munic
nome_do_municipio_do_estado, objectid from politico_2001 where
(nm_munic='Irani')) using unique objectid filter version 10g"
      CONNECTIONTYPE oraclespatial
      connection 'xxxx/xxxx@xxxx'
        METADATA
          WMS_TITLE "Gemeentes"
          WMS_ABSTRACT "Gemeentes via UMN Mapserver"
          WMS_SRS "EPSG:4291"
          WFS_TITLE "Gemeentes"
          wms_extent "-52.01823 -27.13455 -51.8015 -26.92203"
        END
      NAME "Gemeentes"
      SIZEUNITS PIXELS
      STATUS off
      TOLERANCE 0
      TOLERANCEUNITS PIXELS
      TYPE POLYGON
      DUMP TRUE
      TEMPLATE "blank.html"
      UNITS METERS
      PROJECTION
         "init=epsg:4291"
      END
      debug on
      PROCESSING "CLOSE_CONNECTION=DEFER"
      CLASS
        NAME "Gemeentegrenzen"
        STYLE
          MAXSIZE 100
          MINSIZE 1
            OUTLINECOLOR 255 0 0
          SIZE 1
          SYMBOL 0
        END
      END
    END  

    I used this requests:
http://200.169.x.xxx/cgi-bin/mapserv?map=/home/apache/mapserv/maporaclespatial/maporaclespatial.map&LAYERS=Gemeentes&REQUEST=GetFeatureInfo&SERVICE=WMS&FORMAT=image/png&SLD_BODY=&STYLES=&HEIGHT=450&QUERY_LAYERS=Gemeentes&VERSION=1.1.0&SRS=EPSG:4291&WIDTH=750&BBOX=-52.090284879326,-27.1891766334,-51.739404280188,-26.836595016331&TRANSPARENT=TRUE&X=450&Y=73
http://200.169.x.xxx/cgi-bin/mapserv?map=/home/apache/mapserv/maporaclespatial/maporaclespatial.map&LAYERS=Gemeentes&REQUEST=GetFeatureInfo&SERVICE=WMS&FORMAT=image/png&SLD_BODY=&STYLES=&HEIGHT=450&QUERY_LAYERS=Gemeentes&VERSION=1.1.0&SRS=EPSG:4291&WIDTH=750&BBOX=-52.090284879326,-27.1891766334,-51.739404280188,-26.836595016331&TRANSPARENT=TRUE&X=-51.916078&Y=-27.023001
    And both returned this in the browser:
"GetFeatureInfo results:

  Search returned no results."

    In apache error_log the first request returned:
CGI Request 1 on process 2135
msWMSLoadGetMapParams(): enabling non-square pixels.msOracleSpatialLayerOpen
called with: coordenada from (select coordenada, nm_munic
nome_do_municipio_do_estado, objectid from politico_2001 where
(nm_munic='Irani')) using unique objectid filter version 10g
msOracleSpatialLayerOpen. Shared connection not available. Creating one.
msConnPoolRegister(Gemeentes,xxxx/xxxx@xxxx,0x822a140)
msOracleSpatialLayerFreeItemInfo was called.
msOracleSpatialLayerWhichShapes was called.
msOracleSpatialLayerWhichShapes. Using this Sql to retrieve the data: SELECT
objectid, coordenada FROM (select coordenada, nm_munic
nome_do_municipio_do_estado, objectid from politico_2001 where
(nm_munic='Irani')) WHERE SDO_FILTER( coordenada, MDSYS.SDO_GEOMETRY(2003, NULL,
NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3),MDSYS.SDO_ORDINATE_ARRAY(-51.8798033,-26.8940562,-51.8798033,-26.8940562)
),'querytype=window') = 'TRUE'
msOracleSpatialLayerFreeItemInfo was called.
msOracleSpatialLayerClose was called. Layer connection: xxxx/xxxx@xxxx
msOracleSpatialLayerClose. Cleaning layerinfo handlers.
msOracleSpatialLayerClose. Cleaning Oracle handlers.
msConnPoolRelease(Gemeentes,xxxx/xxxx@xxxx,0x822a140)
msOracleSpatialLayerClose was called. Layer connection: xxxx/xxxx@xxxx
msOracleSpatialLayerClose was called. Layer connection: xxxx/xxxx@xxxx
msOracleSpatialLayerClose was called. Layer connection: xxxx/xxxx@xxxx
msOracleSpatialLayerClose was called. Layer connection: xxxx/xxxx@xxxx
msOracleSpatialLayerClose was called. Layer connection: xxxx/xxxx@xxxx
msOracleSpatialLayerClose was called. Layer connection: xxxx/xxxx@xxxx
msOracleSpatialLayerClose was called. Layer connection: xxxx/xxxx@xxxx
msOracleSpatialLayerClose was called. Layer connection: xxxx/xxxx@xxxx
msOracleSpatialLayerClose was called. Layer connection: xxxx/xxxx@xxxx
msOracleSpatialLayerClose was called. Layer connection: xxxx/xxxx@xxxx
msConnPoolClose(xxxx/xxxx@xxxx,0x822a140)

    And the second:
CGI Request 1 on process 2137
msWMSLoadGetMapParams(): enabling non-square pixels.msOracleSpatialLayerOpen
called with: coordenada from (select coordenada, nm_munic
nome_do_municipio_do_estado, objectid from politico_2001 where
(nm_munic='Irani')) using unique objectid filter version 10g
msOracleSpatialLayerOpen. Shared connection not available. Creating one.
msConnPoolRegister(Gemeentes,xxxx/xxxx@xxxx,0x822a230)
msOracleSpatialLayerFreeItemInfo was called.
msOracleSpatialLayerWhichShapes was called.
msOracleSpatialLayerWhichShapes. Using this Sql to retrieve the data: SELECT
objectid, coordenada FROM (select coordenada, nm_munic
nome_do_municipio_do_estado, objectid from politico_2001 where
(nm_munic='Irani')) WHERE SDO_FILTER( coordenada, MDSYS.SDO_GEOMETRY(2003, NULL,
NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3),MDSYS.SDO_ORDINATE_ARRAY(-52.114307,-26.8158609,-52.114307,-26.8158609)
),'querytype=window') = 'TRUE'
msOracleSpatialLayerFreeItemInfo was called.
msOracleSpatialLayerClose was called. Layer connection: xxxx/xxxx@xxxx
msOracleSpatialLayerClose. Cleaning layerinfo handlers.
msOracleSpatialLayerClose. Cleaning Oracle handlers.
msConnPoolRelease(Gemeentes,xxxx/xxxx@xxxx,0x822a230)
msOracleSpatialLayerClose was called. Layer connection: xxxx/xxxx@xxxx
msOracleSpatialLayerClose was called. Layer connection: xxxx/xxxx@xxxx
msOracleSpatialLayerClose was called. Layer connection: xxxx/xxxx@xxxx
msOracleSpatialLayerClose was called. Layer connection: xxxx/xxxx@xxxx
msOracleSpatialLayerClose was called. Layer connection: xxxx/xxxx@xxxx
msOracleSpatialLayerClose was called. Layer connection: xxxx/xxxx@xxxx
msOracleSpatialLayerClose was called. Layer connection: xxxx/xxxx@xxxx
msOracleSpatialLayerClose was called. Layer connection: xxxx/xxxx@xxxx
msOracleSpatialLayerClose was called. Layer connection: xxxx/xxxx@xxxx
msOracleSpatialLayerClose was called. Layer connection: xxxx/xxxx@xxxx
msConnPoolClose(xxxx/xxxx@xxxx,0x822a230)

    If I used the &INFO_FORMAT=application/Fvnd.ogc.gml and
&EXCEPTIONS=application/vnd.ogc.se_xml parameters mapserver returned this:

<?xml version='1.0' encoding="ISO-8859-1" standalone="no" ?>
<!DOCTYPE ServiceExceptionReport SYSTEM
"http://schemas.opengeospatial.net/wms/1.1.0/exception_1_1_0.dtd">
<ServiceExceptionReport version="1.1.0">
<ServiceException>
msWMSFeatureInfo(): WMS server error. Unsupported INFO_FORMAT value
(application/Fvnd.ogc.gml).
msQueryByPoint(): Search returned no results. No matching record(s) found.
</ServiceException>
</ServiceExceptionReport>

    Can you test with the last cvs version?
    Thanks.

comment:15 by bartvde@…, 19 years ago

Hi Fernando,

I tried again with latest CVS, same crash.

I can see the following differences between our testcases:
-my table has an SRID so I need to use USING SRID in the DATA statement
-my x and y coordinates in the request do result in features found, yours don't.

Note that x and y are in pixel coordinates, so you could look on your map image 
to find a location which will result in a feature found.

If I provide an x and y coordinate which have no results, I don't get a crash, 
so that's the same behaviour as you:
msQueryByPoint(): Search returned no results. No matching record(s) found.

But the problem is probably in the case when features ARE found on the x and y 
location.

Also, it is:
application/vnd.ogc.gml and not application/Fvnd.ogc.gml.


comment:16 by fsimon@…, 19 years ago

Resolution: fixed
Status: closedreopened
Hi,
   Ok, I tested with your hints and the problem appeared.
   I will commit the new code today.
   Thanks.

comment:17 by fsimon@…, 19 years ago

Hi,
    I tested and fixed the problem, in my tests work correctly. Can you test
with the cvs version (1.19) of maporaclespatial.c?
    I used this requests for test:
http://200.169.x.xxx/cgi-bin/mapserv?map=/home/apache/mapserv/maporaclespatial/maporaclespatial.map&LAYERS=Gemeentes&REQUEST=GetFeatureInfo&SERVICE=WMS&FORMAT=image/png&SLD_BODY=&STYLES=&HEIGHT=555&QUERY_LAYERS=Gemeentes&VERSION=1.1.0&SRS=EPSG:4291&WIDTH=555&BBOX=-52.090284879326,-27.1891766334,-51.739404280188,-26.836595016331&TRANSPARENT=TRUE&INFO_FORMAT=application/vnd.ogc.gml&X=250&EXCEPTIONS=application/vnd.ogc.se_xml&Y=250
http://200.169.x.xxx/cgi-bin/mapserv?map=/home/apache/mapserv/maporaclespatial/maporaclespatial.map&LAYERS=Gemeentes&REQUEST=GetFeatureInfo&SERVICE=WMS&FORMAT=image/png&SLD_BODY=&STYLES=&HEIGHT=555&QUERY_LAYERS=Gemeentes&VERSION=1.1.0&SRS=EPSG:4291&WIDTH=555&BBOX=-52.090284879326,-27.1891766334,-51.739404280188,-26.836595016331&TRANSPARENT=TRUE&X=250&Y=250
    Thanks.

comment:18 by bartvde@…, 19 years ago

Hi Fernando,

I recompiled with revision 1.19 of maporaclespatial.c. I still get an internal 
server error. The same layer using a shapefile works.

The only thing I get in the error log is:

[Fri Feb 11 10:40:46 2005] [error] [client 192.168.3.4] Premature end of script 
headers: mapserv.exe, referer: http://www.vz.geodan.nl:
1111/chameleon/widgets/GeoservicesQuery/GeoservicesQueryResults.phtml?
sid=420c7bb64e00b&RADIUS=3&FEATURE_COUNT=5&include_empty=false&NAV_INPUT_COORDIN
ATES=474,109

Is there any other way to debug this problem? Is there a way to find out which 
function call fails?

by fsimon@…, 19 years ago

Attachment: mapserv added

Mapserver test

comment:19 by fsimon@…, 19 years ago

Hi Bart,
    I tested again the cvs version and worked correctly again.
    For this request mapserver returned the attahed file (id=283):
http://200.169.x.xxx/cgi-bin/mapserv?map=/home/apache/mapserv/maporaclespatial/maporaclespatial.map&LAYERS=Gemeentes&REQUEST=GetFeatureInfo&SERVICE=WMS&FORMAT=image/png&SLD_BODY=&STYLES=&HEIGHT=555&QUERY_LAYERS=Gemeentes&VERSION=1.1.0&SRS=EPSG:4291&WIDTH=555&BBOX=-52.090284879326,-27.1891766334,-51.739404280188,-26.836595016331&TRANSPARENT=TRUE&INFO_FORMAT=application/vnd.ogc.gml&X=250&EXCEPTIONS=application/vnd.ogc.se_xml&Y=250
    For this another request Mapserver returned information to the browser:
http://200.169.x.xxx/cgi-bin/mapserv?map=/home/apache/mapserv/maporaclespatial/maporaclespatial.map&LAYERS=Gemeentes&REQUEST=GetFeatureInfo&SERVICE=WMS&FORMAT=image/png&SLD_BODY=&STYLES=&HEIGHT=555&QUERY_LAYERS=Gemeentes&VERSION=1.1.0&SRS=EPSG:4291&WIDTH=555&BBOX=-52.090284879326,-27.1891766334,-51.739404280188,-26.836595016331&TRANSPARENT=TRUE&X=250&Y=250
GetFeatureInfo results:

Layer 'Gemeentes'
  Feature 100: 
    NOME_DO_MUNICIPIO_DO_ESTADO = 'Irani'
    OBJECTID = '100'

    I used the same layer definition that I defined in comment #14.
    Did you add the DEBUG ON for the layer?
    Thanks.

comment:20 by bartvde@…, 19 years ago

Hi Fernando,

this is the query which is generated by Mapserver, it does look correct:

SELECT ID, LOCATIE FROM (SELECT * FROM MRG_GEMEENTEN) WHERE SDO_FILTER( LOCATIE,
MDSYS.SDO_GEOMETRY(2003, 90112,
NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3),MDSYS.SDO_ORDINATE_ARRAY(234614.83,433930.247,234614.83,433930.247)
),'querytype=window') = 'TRUE'

The result also looks okay, will attach that to the bug report.

by bartvde@…, 19 years ago

Attachment: sqlresult.log added

sqlplus spool of query result

comment:21 by bartvde@…, 19 years ago

Hi Fernando,

I found out the following:

If I use:
data "locatie from (select locatie, id from mrg_gemeenten where (id=197)) using
unique id srid 90112 filter version 10g"

it works.

But if I use:
data "locatie from (select * from mrg_gemeenten where (id=197)) using unique id
srid 90112 filter version 10g"

It does not work. If I add a third column to the select it does not work either,
in any combination.

Any ideas what could be causing this?

SQL> desc mrg_gemeenten;
 Naam                                      Null?    Type
 ----------------------------------------- -------- ----------------------------

 ID                                        NOT NULL NUMBER(10)
 PVE_CODE                                  NOT NULL VARCHAR2(2)
 NAAM                                      NOT NULL VARCHAR2(35)
 LOCATIE                                            MDSYS.SDO_GEOMETRY

comment:22 by fsimon@…, 19 years ago

Hi,
    Here I tested using this another data string (with SRID):
data "coordenada from (select * from municipios where (nome_ofici='Irani'))
using unique id srid 82295 filter version 10g"
    And mapserver worked correctly and returned:
GetFeatureInfo results:

Layer 'Gemeentes'
  Feature 565253: 
    ID = '565253'
    AREA = '318.769459'
    DATA = '565253'
    CODIGO = '420780'
    NOME = 'IRANI'
    NOME_OFICI = 'Irani'
    CDIGO_UF = '42'
    NOME_UF = 'SANTA CATARINA'
    SIGLA_UF = 'SC'
    REGIO = 'SUL'
    CDIGO_MESO = '01'
    NOME_MESOR = 'OESTE CATARINENSE'
    CDIGO_MICR = '05'
    NOME_MICRO = 'CONCORDIA'
    POPULAO_97 = '7943'
    POPULAO_96 = '8153'
    POPULAO_UR = '3960'
    RENDA_PER_ = '234.3743'
    RENDA_POR_ = '980.4279'
    TOTAL_DOMI = '1949'
    DOMICLIOS_ = '748'
    DOMICLIOS1 = '517'
    DOMICLIOS2 = '398'
    DOMICLIOS3 = '162'
    DOMICLIOS4 = '125'
    RENMENDOMI = '1910854'
    RENMENDOM1 = '139864'
    RENMENDOM2 = '252533'
    RENMENDOM3 = '396731'
    RENMENDOM4 = '311838'
    RENMENDOM5 = '809889'
    RECMUNANUA = '1669315'
    RECMUNANU1 = '1542477'
    RECMUNANU2 = '99873'
    RECMUNANU3 = '1375625'
    INDDESENVH = '.592'
    QUIN = '22'
    BANH = '1326'
    ESG = '0'
    GERAL = '14261020'
    ALIM = '2611990'
    FARM = '505468'
    TEC = '2455673'
    ELET = '782812'
    VEIC = '0'
    COMB = '5860937'
    FERR = '505468'
    PAP = '31250'
    TOTAL = '8101'
    GELADEIRA = '1202'
    FREEZER = '636'
    MQUINA_DE_ = '210'
    ASPIRADOR_ = '50'
    TV_COLORID = '231'
    AUTOMVEIS_ = '395'
    IPC_A = '.004'
    IPC_B = '.004'
    IPC_C = '.004'
    IPC_D = '.004'
    IPC_E = '.004'
    IPC_T = '.004'
    ICC = '.794'
    REGIONAL = 'REGIONAL SUL'

    If I use this layer data:
data "coordenada from (select coordenada, id, area, data, codigo from municipios
where (nome_ofici='Irani')) using unique id srid 82295 filter version 10g"
    work too.

    Are you tring to compile all the cvs or only the maporaclespatial.c?
    Thanks

comment:23 by bartvde@…, 19 years ago

Hi Fernando,

I have compiled Mapserver CVS sources from yesterday. I only updated
maporaclespatial.c today and recompiled.

If I use a corrupt data statement to see the query statement generated by Mapserver:

data "locatie from (select locatie, id, pve_code, naam from mrg_gemeenten_)
using unique id srid 90112 filter version 10g"

I get:
msOracleSpatialLayerWhichShapes(): OracleSpatial error. Error: ORA-00942: table
or view does not exist . Query statement: SELECT id, locatie FROM (select
locatie, id, pve_code, naam from mrg_gemeenten_) WHERE SDO_FILTER( locatie,
MDSYS.SDO_GEOMETRY(2003, 90112,
NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3),MDSYS.SDO_ORDINATE_ARRAY(234614.83,433930.247,234614.83,433930.247)
),'querytype=window') = 'TRUE' . Check your data statement. 

Shouldn't the pve_code and the naam column also be in the first SELECT (SELECT
id, locatie FROM) statement?

comment:24 by fsimon@…, 19 years ago

Hi,
   I don't believe that the problem is with a wrong data string, can be another
problem. When you try to execute the GetFeatureInfo what appear in apache
error_log? The problem in 1.18 maporaclespatial version was in
msOracleSpatialLayerGetItems function, I fixed it, tested and after it worked I
commited in CVS.
   I will try with your data, but I believe that will work. I believe that the
best way to debug is compiling mapserver with --enable-debug flag and DEBUG ON
in layer definition. Did you compiled mapserver with debug flag?
   Thanks.
   
   

comment:25 by bartvde@…, 19 years ago

Hi Fernando,

Apache error log I get on GetFeatureInfo:

[Fri Feb 11 15:12:36 2005] [error] [client 192.168.3.4] Premature end of script
headers: mapserv.exe

I have Mapserver compiled with MSDEBUG:

c:\ms4w\cgi-bin\bart>mapserv -v
MapServer version 4.5 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP SUPPORTS=PRO
J SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT INPUT=ORACLESPATIAL
INPUT=SHAPEFILE DEBUG=MSDEBUG

comment:26 by fsimon@…, 19 years ago

Hi Bart,
    Did you add the DEBUG ON for your layer and for your map? here for my map
file I defined DEBUG ON, and for the layer I defined DEBUG ON too. If you don't
define this parameters don't appear any messages in apache error_log.
    When I execute this request this appear in error_log:
CGI Request 1 on process 11538
msWMSLoadGetMapParams(): enabling non-square pixels.msOracleSpatialLayerOpen
called with: coordenada from (select coordenada, id, area, data, codigo from
municipios where (nome_ofici='Irani')) using unique id srid 82295 filter version 10g
msOracleSpatialLayerOpen. Shared connection not available. Creating one.
msConnPoolRegister(Gemeentes,xxxx/xxxxx,0x8229ab0)
msOracleSpatialLayerFreeItemInfo was called.
msOracleSpatialLayerWhichShapes was called.
msOracleSpatialLayerWhichShapes. Using this Sql to retrieve the data: SELECT id,
coordenada FROM (select coordenada, id, area, data, codigo from municipios where
(nome_ofici='Irani')) WHERE SDO_FILTER( coordenada, MDSYS.SDO_GEOMETRY(2003,
82295,
NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3),MDSYS.SDO_ORDINATE_ARRAY(408347.111,7010868.95,408347.111,7010868.95)
),'querytype=window') = 'TRUE'
msOracleSpatialLayerFreeItemInfo was called.
msOracleSpatialLayerClose was called. Layer connection: xxxx/xxxx
msOracleSpatialLayerClose. Cleaning layerinfo handlers.
msOracleSpatialLayerClose. Cleaning Oracle handlers.
msConnPoolRelease(Gemeentes,xxxx/xxxx,0x8229ab0)
msOracleSpatialLayerOpen called with: coordenada from (select coordenada, id,
area, data, codigo from municipios where (nome_ofici='Irani')) using unique id
srid 82295 filter version 10g
msConnPoolRequest(Gemeentes,xxxx/xxxx) -> got 0x8229ab0
msOracleSpatialLayerFreeItemInfo was called.
msOracleSpatialLayerGetItems was called.
msOracleSpatialLayerInitItemInfo was called.
msOracleSpatialLayerGetShape was called. Using the record = 565253.
msOracleSpatialLayerGetShape. Sql: SELECT ID, AREA, DATA, CODIGO, coordenada
FROM (select coordenada, id, area, data, codigo from municipios where
(nome_ofici='Irani')) WHERE id = 565253
msOracleSpatialLayerFreeItemInfo was called.
msOracleSpatialLayerClose was called. Layer connection: xxxx/xxxx
msOracleSpatialLayerClose. Cleaning layerinfo handlers.
msOracleSpatialLayerClose. Cleaning Oracle handlers.
msConnPoolRelease(Gemeentes,xxxx/xxxx,0x8229ab0)
msOracleSpatialLayerClose was called. Layer connection: xxxx/xxxx
msOracleSpatialLayerClose was called. Layer connection: xxxx/xxxx
msOracleSpatialLayerClose was called. Layer connection: xxxx/xxxx
msOracleSpatialLayerClose was called. Layer connection: xxxx/xxxx
msOracleSpatialLayerClose was called. Layer connection: xxxx/xxxx
msOracleSpatialLayerClose was called. Layer connection: xxxx/xxxx
msOracleSpatialLayerClose was called. Layer connection: xxxx/xxxx
msOracleSpatialLayerClose was called. Layer connection: xxxx/xxxx
msOracleSpatialLayerClose was called. Layer connection: xxxx/xxxx
msOracleSpatialLayerClose was called. Layer connection: xxxx/xxxx
msConnPoolClose(xxxx/xxxx,0x8229ab0)

    Did you defined the DEBUG ON you your mapfile(and layer)?
    Msn? ICQ? Can be more easy and quickly.
    Thanks.

comment:27 by bartvde@…, 19 years ago

Hi Fernando,

I have DEBUG ON on my MAP and LAYER.

MSN would be a good idea :), my account is bartvde@hotmail.com

comment:28 by bartvde@…, 19 years ago

Resolution: fixed
Status: reopenedclosed
Hi Fernando,

I checked this finally with a new compile on a different machine using VC 7.1
instead of VC 6 and now it works.

Setting status to fixed.

Thanks again.

Bart
Note: See TracTickets for help on using tickets.