[MapServer-users] Error in msplugin_oracle.dll / maporaclespatial.c

Richard Duivenvoorde rdmailings at duif.net
Thu Jul 25 02:52:28 PDT 2024


Maybe msStringConcatenate has issues?

Could you create a reproducable issue from it?
( preferably without needing an Oracle db :-) )

Also: is this only one data statement? Or are the more (in your mapfiles)?
Is this happening only in Oracle data?

Could it be some 'magic chars' around it? Like utf-special quotes (those tricky Windows double quotes, or tabs or ...)

Sorry for not able to be more helpful

Regards,

Richard Duivenvoorde

On 7/25/24 09:23, Kulawik, Robert wrote:
> Hi Richard,
> 
> thank you for your answer.
> 
> I'm not alone with this problem, two other users also reported it
> 
> You are right, the code in maporaclespatial.c looks good for me too.
> 
> And yes, when I insert an "x" in the data statement like DATA 'xGEOMETRIE....' then I get SELECTxGEOMETRIE
> Putting one or more spaces instead of "x", the the spaces are removed and I get SELECTGEOMETRIE again.
> 
> Maybe a space ist missing when passing parameters between maporaclespatial.c and msOracleSpatialLayerGetExtent() or another funktion?
> 
> Best regards / viele Grüße
> Robert Kulawik
> 
> 
> -----Ursprüngliche Nachricht-----
> Von: Richard Duivenvoorde <rdmailings at duif.net>
> Gesendet: Mittwoch, 24. Juli 2024 16:42
> An: Kulawik, Robert <KulawikR at eba.bund.de>; mapserver-users at lists.osgeo.org
> Betreff: Re: [MapServer-users] Error in msplugin_oracle.dll / maporaclespatial.c
> 
> Searching in the mapserver code, based on your errors you will end up around here:
> 
> https://github.com/MapServer/MapServer/blob/rel-8-2-1/src/maporaclespatial.c
> 
> it does not look like there something can insert 'SELECT' into the query.
> 
> Are you 100% sure that the SELECTGEOMETRIE does not come from (one of) your mapfiles?
> 
> Another thing I would try: can you insert some spaces into your DATA string:
> 
> DATA '  GEOMETRIE from (select OID, KLASSE, GEOMETRIE from MYTABLE) USING UNIQUE OID SRID 25832'
> 
> of for testing:
> 
> DATA 'xGEOMETRIE from (select OID, KLASSE, GEOMETRIE from MYTABLE) USING UNIQUE OID SRID 25832'
> 
> and see if you'll end up with SELECTxGEOMETRIE then?
> 
> Else, try to run a container maybe with the same map file (but other Mapserver version)?
> 
> Regards,
> 
> Richard Duivenvoorde
> 
> 
> 
> On 7/24/24 10:29, Kulawik, Robert via MapServer-users wrote:
>> Hi,
>>
>> as answer to Seth G and Sven S fron other reply:
>>
>> the suggestion to use that Statment : DATA "GEOM FROM (SELECT * FROM TEST_TABLE) AS tbl USING UNIQUE ObjectId USING SRID=25832"
>> is not working,
>>
>> "(SELECT * FROM TEST_TABLE) AS tbl" and/or "SRID=25832" both produce this error:
>> Error parsing OracleSpatial DATA variable. Must be: 'geometry_column FROM table_name [USING UNIQUE <column> SRID srid# FUNCTION]' or 'geometry_column FROM (SELECT stmt) [USING UNIQUE <column> SRID srid# FUNCTION]'. If want to set the FUNCTION statement you can use: FILTER, RELATE, GEOMRELATE or NONE.
>>
>> the space is simply missing in Mapserver request SELECTGEOMETRIE
>> "osAggrGetExtent was called: SELECT SDO_AGGR_MBR(GEOMETRIE) AS GEOM from (SELECTGEOMETRIE FROM (select OID, KLASSE, GEOMETRIE from MYTABLE))"
>> Statement
>>
>> Does somebody has any idea?
>>
>> Best regards / viele Grüße
>> Robert Kulawik
>>
>>
>> -----Ursprüngliche Nachricht-----
>> Von: MapServer-users <mapserver-users-bounces at lists.osgeo.org> Im Auftrag von Kulawik, Robert via MapServer-users
>> Gesendet: Dienstag, 23. Juli 2024 10:48
>> An: mapserver-users at lists.osgeo.org
>> Betreff: [MapServer-users] Error in msplugin_oracle.dll / maporaclespatial.c
>>
>> Hello Mapserver community,
>>
>> I've been getting an error since Mapserserver 8.X with Oracle Spatial 19c request using the function "osAggrGetExtent" when I reference a database table:
>> [Mon Jul 22 18:42:36 2024].226000 osAggrGetExtent was called: SELECT SDO_AGGR_MBR(GEOMETRIE) AS GEOM from (SELECTGEOMETRIE FROM (select OID, KLASSE, GEOMETRIE from MYTABLE)).
>>
>> There is no space inserted between SELECT and GEOMETRIE (see SELECTGEOMETRIE FROM.)
>>
>> this produces an error:
>> [Mon Jul 22 18:42:36 2024].227000 Error: ORA-00907: Rechte Klammer fehlt (Right bracket missing)
>> . Query statement: SELECT SDO_AGGR_MBR(GEOMETRIE) AS GEOM from (SELECTGEOMETRIE FROM (select OID, KLASSE, GEOMETRIE from MYTABLE)) .Check your data statement.in msOracleSpatialLayerGetExtent()
>> [Mon Jul 22 18:42:36 2024].227000 msOracleSpatialLayerGetExtent(): OracleSpatial error. Check your data statement and server logs
>>
>> The result is that the layer is not loaded.
>>
>> My request in the mapfile ist:
>> DATA 'GEOMETRIE from (select OID, KLASSE, GEOMETRIE from MYTABLE) USING UNIQUE OID SRID 25832'
>>
>> the connection uses the oci plugin "msplugin_oracle.dll"
>> I use the mapserver 8.2.0 with GDAL 3.9.1 from gisinternals.com for now under Win Server 2019
>> https://gisinternals.com/query.html?content=filelist&file=release-1930-x64-gdal-3-9-1-mapserver-8-2-0.zip
>>
>> does anyone have a solution for this problem?
>>
>> thanks in advance
>>
>> Best regards / viele Grüße
>>
>> Robert Kulawik
>>
>>    
>>
>> _______________________________________________
>> MapServer-users mailing list
>> MapServer-users at lists.osgeo.org
>> https://lists.osgeo.org/mailman/listinfo/mapserver-users
> 



More information about the MapServer-users mailing list