[mapserver-users] Memory access error when accessing Oracle database
Stefan Schantz
SSchantz at BfS.de
Mon Oct 22 08:10:37 PDT 2012
Hi,
I try to use MapServer 6.2.0-rc1 to display data from an Oracle database.
*mapserv -v*
MapServer version 6.2.0-rc1 OUTPUT = GIF OUTPUT = PNG OUTPUT = JPEG
SUPPORTS = PROJ SUPPORTS = AGG SUPPORTS SUPPORTS = DG = FREETYPE
SUPPORTS = ICONV SUPPORTS = WMS_SERVER SUPPORTS = WMS_CLIENT SUPPORTS =
WFS_SERVER SUPPORTS = WFS_CLIENT SUPPORTS = WCS_SERVER SUPPORTS =
FastCGI SUPPORTS = THREADS SUPPORTS = GEOS INPUT = JPEG INPUT =
ORACLESPATIAL INPUT = OGR INPUT = GDAL INPUT = SHAPEFILE
*Error message:*
shp2img-m. / png oracle.map-i-o. / output.png s 500-500-5-l test all_debug
msLoadMap (): 0.011s
msDrawMap (): rendering using outputFormat named png (AGG / PNG).
msDrawMap (): WMS / WFS set-up and query, 0.000s
msOracleSpatialLayerOpen called with: GEOM FROM USING
IMIS_GEO.TRAPKT_16386 NONE (Layer pointer 0x14dbad0)
msOracleSpatialLayerOpen. Shared connection not available. Creating one.
msConnPoolRegister (test, imis_geo / xxxxx @ IMISXENT, 0x1523f50)
msOracleSpatialLayerFreeItemInfo was called.
msOracleSpatialLayerWhichShapes was called.
msOracleSpatialLayerWhichShapes. Using this Sql to retrieve the data:
SELECT rownum, GEOM FROM IMIS_GEO.TRAPKT_16386
msOracleSpatialLayerWhichShapes. Bind values: srid: -1 minx: -90.000000
miny: -90.000000 maxx: 90.000000 maxy: 90.000000
msOracleSpatialLayerWhichShapes getting ordinate definition.
msOracleSpatialLayerWhichShapes converting to OCIColl.
msOracleSpatialLayerWhichShapes bind by name and object.
msOracleSpatialLayerWhichShapes name and object now bound.
msOracleSpatialLayerNextShape on layer 0x14dbad0 row_num,: 0
Segfaulting
*My mapfile:*
...
LAYER
NAME "test"
TYPE POINT
STATUS ON
CONNECTIONTYPE oraclespatial
CONNECTION "imis_geo / xxxxxxx @ IMISXENT"
DATA "GEOM FROM USING IMIS_GEO.TRAPKT_16386 NONE"
# CONNECTIONTYPE OGR
# CONNECTION "OCI: imis_geo / xxxxxx @ IMISXENT: imis_geo.TRAPKT_16386"
# DATA "IMIS_GEO.TRAPKT_16386"
PROJECTION
"Init = epsg: 4326"
END
...
When I use the Connectiontype OGR I get a *different error*:
shp2img-m. / png oracle.map-i-o. / output.png s 500-500-5-l test all_debug
msLoadMap (): 0.020s
msDrawMap (): rendering using outputFormat named png (AGG / PNG).
msDrawMap (): WMS / WFS set-up and query, 0.000s
msOGRFileOpen (OCI: imis_geo / xxxxx @ IMISXENT: imis_geo.TRAPKT_16386) ...
OGROPen (OCI: imis_geo / xxxxx @ IMISXENT: imis_geo.TRAPKT_16386)
(test, OCI: imis_geo / xxxxx @ IMISXENT: imis_geo.TRAPKT_16386,
0x1c09c40) msConnPoolRegister
msOGRFileWhichShapes: Setting spatial filter to -90.000000 -90.000000
90.000000 90.000000
msOGRFileNextShape: Returning shape tile = 0, = 0
msOGRFileNextShape: Returning shape tile = 1, = 0
msOGRFileNextShape: Returning shape tile = 2, = 0
msOGRFileNextShape: Returning shape tile = 3, = 0
msOGRFileNextShape: Returning shape tile = 4, = 0
msOGRFileNextShape: Returning shape tile = 5, = 0
msOGRFileNextShape: Returning shape tile = 6, = 0
msOGRFileNextShape (): OGR error. ORA-29902: error during execution of
routine ODCIIndexStart ()
ORA-13208: Internal error when parsing operator [window SRID does not
match layer SRID]
ORA-06512: at "MDSYS.SDO_INDEX_METHOD_10I", line 333
in SELECT COUNT(*) FROM imis_geo.TRAPKT_16386 WHERE sdo_filter(GEOM,
MDSYS.SDO_GEOMETRY(2003,NULL,NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,1),MDSYS.SDO_ORDINATE_ARRAY(-90.00000000000001,-90.00000000000001,90.00000000000001,-90.00000000000001,90.00000000000001,90.00000000000001,-90.00000000000001,90.00000000000001,-90.00000000000001,-90.00000000000001)),
'querytype=window') = 'TRUE'
msOGRLayerClose (OCI: @ imis_geo/xxxxIMISXENT: imis_geo.TRAPKT_16386).
msOGRFileClose (OCI: imis_geo / xxxxx @ IMISXENT: imis_geo.TRAPKT_16386, 0).
msConnPoolRelease (test, OCI: imis_geo / xxxxx @ IMISXENT:
imis_geo.TRAPKT_16386, 0x1c09c40)
msConnPoolClose (OCI: imis_geo / xxxxx @ IMISXENT:
imis_geo.TRAPKT_16386, 0x1c09c40)
msDrawMap (): Image handling error. Failed to draw layer named 'test'.
msDrawMap (): Image handling error. Failed to draw layer named 'test'. <br>
msOGRFileNextShape (): OGR error. ORA-29902: error during execution of
routine ODCIIndexStart ()
ORA-13208: Internal error when parsing operator [window SRID does not
match layer SRID]
ORA-06512: at "MDSYS.SDO_INDEX_METHOD_10I", line 333
in SELECT COUNT(*) FROM imis_geo.TRAPKT_16386 WHERE sdo_filter(GEOM,
MDSYS.SDO_GEOMETRY(2003,NULL,NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,1),MDSYS.SDO_ORDINATE_ARRAY(-90.00000000000001,-90.00000000000001,90.00000000000001,-90.00000000000001,90.00000000000001,90.00000000000001,-90.00000000000001,90.00000000000001,-90.00000000000001,-90.00000000000001)),
'querytype=window') = 'TRUE' <br>
msFreeMap (): freeing map at 0x1bbb400.
free layer (): freeing layer at 0x1bc3ad0.
free layer (): freeing layer at 0x1bc56d0.
As far as I see it, the problem is the lack of SRID (zero instead of 4326)
*The data from the database:*
ogrinfo OCI: imis / xxxxx @ imisxent: IMIS_GEO.TRAPKT_16386 -al -ro
INFO: Open of `OCI: imis / xxxxx @ imisxent: IMIS_GEO.TRAPKT_16386 '
using driver `OCI 'successful.
Layer name: IMIS_GEO.TRAPKT_16386
Geometry: 3D Unknown (any)
Feature Count: 7
Extent: (8.000000, 50.000000) - (16.000000, 56.000000)
Layer SRS WKT:
GEOGCS ["WGS 84",
DATUM ["World Geodetic System 1984 (EPSG ID 6326)",
SPHEROID ["WGS 84 (EPSG ID 7030)", 6378137.0,298.257223563]]
PRIMEM ["Greenwich", 0.000000],
UNIT ["Decimal Degree", 0.0174532925199433],
AUTHORITY ["EPSG. See 3D CRS for original information source.", "4326"]]
Geometry Column = GEOM
ID: Real (0.0)
Trajectory: Real (0.0)
STARTING TIME: Date (0.0)
HOURS: Real (0.0)
OUTPUT HEIGHT: Real (0.0)
HEIGHT: Real (0.0)
OGRFeature (IMIS_GEO.TRAPKT_16386): 0
ID (Real) = 1
Trajectory (Real) = 1
TIME OUT (Date) = 17/10/2012
HOURS (Real) = 0
OUTPUT HEIGHT (Real) = 632
HEIGHT (Real) = 632
POINT (8.73333 50.11667 0)
OGRFeature (IMIS_GEO.TRAPKT_16386): 1
ID (Real) = 2
Trajectory (Real) = 1
TIME OUT (Date) = 17/10/2012
HOURS (Real) = 12
OUTPUT HEIGHT (Real) = 632
HEIGHT (Real) = 584
POINT (12.7 56.15 0)
OGRFeature (IMIS_GEO.TRAPKT_16386): 2
ID (Real) = 3
Trajectory (Real) = 2
TIME OUT (Date) = 17/10/2012
HOURS (Real) = 0
OUTPUT HEIGHT (Real) = 1632
HEIGHT (Real) = 1632
POINT (8.73333 50.11667 0)
OGRFeature (IMIS_GEO.TRAPKT_16386): 3
ID (Real) = 4
Trajectory (Real) = 2
TIME OUT (Date) = 17/10/2012
HOURS (Real) = 12
OUTPUT HEIGHT (Real) = 1632
HEIGHT (Real) = 1400
POINT (15.6 54.0 0)
OGRFeature (IMIS_GEO.TRAPKT_16386): 4
ID (Real) = 5
Trajectory (Real) = 3
TIME OUT (Date) = 17/10/2012
HOURS (Real) = 0
OUTPUT HEIGHT (Real) = 3132
HEIGHT (Real) = 3132
POINT (8.73333 50.11667 0)
OGRFeature (IMIS_GEO.TRAPKT_16386): 5
ID (Real) = 6
Trajectory (Real) = 3
TIME OUT (Date) = 17/10/2012
HOURS (Real) = 12
OUTPUT HEIGHT (Real) = 3132
HEIGHT (Real) = 3036
POINT (16.86667 53.7 0)
OGRFeature (IMIS_GEO.TRAPKT_16386): 6
ID (Real) = 7
Trajectory (Real) = 4
TIME OUT (Date) = 17/10/2012
HOURS (Real) = 0
OUTPUT HEIGHT (Real) = 5132
HEIGHT (Real) = 5132
POINT (8.73333 50.11667 0)
May anybody help me?
Regards,
Stefan
--
Mit freundlichen Grüßen
Stefan Schantz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20121022/0fbe1197/attachment.htm>
More information about the MapServer-users
mailing list