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

Richard Duivenvoorde rdmailings at duif.net
Wed Jul 24 07:42:02 PDT 2024


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