MapServer and Oracle Spatial

Rick Levine Richard_D_Levine at RAYTHEON.COM
Wed Jan 26 08:09:30 EST 2005


You must have the environment variable ORACLE_HOME set for the mapserv
process when it runs.  Setting ORACLE_SID is never a bad idea either.

Rick



                      Lyndon Tiu
                      <ltiu at ALUMNI.SFU.CA>        To:       MAPSERVER-USERS at LISTS.UMN.EDU
                      Sent by: UMN                cc:
                      MapServer Users List        Subject:  [UMN_MAPSERVER-USERS] MapServer and Oracle Spatial
                      <MAPSERVER-USERS at LIS
                      TS.UMN.EDU>


                      01/25/2005 07:05 PM
                      Please respond to
                      Lyndon Tiu






Hello,

I have:

1) Mapserver 4.4.1 on Linux compiled with oraclespatial support.

2) Oracle Spatial 10g on Solaris.

3) Tnsnames are configured properly and sqlplus from the Linux command
line can connect to Oracle database on Solaris box.

4) Listener and database have both been started and are both running on
Solaris box.

5) mapserver map file:

        LAYER
          NAME "oggma"
          CONNECTIONTYPE oraclespatial
          CONNECTION "user/pass at orasptl"
          DATA "GEOM FROM OGGMA USING SRID NULL"
          STATUS ON
          TYPE POLYGON
          CLASS
                STYLE
                        OUTLINECOLOR 0 0 0
                        COLOR 225 225 185
                END
          END
          PROJECTION
                        "init=epsg:42102"
        END
        END

The connect string:

user/pass at ora10g works fine from the command line and from Oracle
Enterprise Manager so I know tnsnames is configured properly.

Also, the table OGGMA and data are loaded and I can do a select * from
OGGMA and data would come back fine.


6) Pointing a web browser at mapserver produces the following error:

<?xml version='1.0' encoding="ISO-8859-1" standalone="no" ?>
<!DOCTYPE ServiceExceptionReport SYSTEM
"http://schemas.opengeospatial.net/wms/1.1.1/exception_1_1_1.dtd">
<ServiceExceptionReport version="1.1.1">
<ServiceException>
msDrawMap(): Image handling error. Failed to draw layer named
&#39;ogma&#39;.
msOracleSpatialLayerOpen(): OracleSpatial error. Cannot create OCI
Handlers. Connection failure. Check the connection string. Error: .
</ServiceException>
</ServiceExceptionReport>


Can someone help me with this issue?

Thank you for any tips and suggestions.

--
Lyndon Tiu



More information about the mapserver-users mailing list