[mapserver-users] oraclespatial connect error
Yu-Hsin Chen
ychen at yorktel.com
Sat Feb 23 16:12:19 PST 2002
Thanks, Rod. Looks like that was it. I'm using MapServer CGI and after
I modified the httpd conf file now I'm getting "msOCIConnect() in
msOracleSpatialLayerOpen(): OracleSpatial error. ORA-04043: object
MDSYS.SDO_GEOMETRY does not exist". I think I'm in the database and now
I'm dealing with spatial cartridge.
It appears that I have to deal with SDO schemas, right? I was hoping I
can avoid it with my simple need. My application have many rooms which
belong to different customers. I'd like to display different service
status using maps. I don't have the Oracle Spatial user's guide with me
right now so I don't know what question to ask. My original thinking
was that I have a table storing the latitude and longitude data for the
rooms and if I join that table with my service table based on room_id
I'll have all the service data and geographic data I need. Now I'm not
sure I have to go to the office on Monday read the SDO guide and work on
it.
Thanks for your help.
Yu-Hsin
-----Original Message-----
From: Rodrigo Cabral
Sent: Sat 2/23/2002 12:16 PM
To: Yu-Hsin Chen; PARVILLERS
Cc: mapserver-users at lists.gis.umn.edu
Subject: Re: [mapserver-users] oraclespatial connect error
Okay, we can sort your application out later on. Let's first make things
work. Not sure if you're using MapServer CGI or MapScript... But either
tnsnames.ora doesn't have your database address defined (but you can use
sqlplus in your clientside, which is strange); or the ORACLE_HOME
environment variable is not defined in the runtime shell mapserver is
executing (but you can access oracle through a CGI program, which is
also
strange).
However, the 2nd option is my best guess. My hint comes from the error
message itself -- Error while trying to retrieve text for error
ORA-12541 --
which means the client doesn't have access to the error string table
which
probably stays in the client within of ORACLE_HOME. Briefly: no
ORACLE_HOME
defined, no error message can be retrieved (let alone connecting to the
database).
I'm also running SDO in a Red Hat Linux environment. Becase httpd
daemons
usually run in their own shell, we had to setup Apache with an extra
section
defining ORACLE variables. This is it:
(in httpd.conf)
<IfModule mod_env.c>
SetEnv ORACLE_SID g10
SetEnv ORACLE_BASE /u01/app/oracle
SetEnv ORACLE_HOME /u01/app/oracle/product/8.1.7
SetEnv ORA_NLS33 /u01/app/oracle/product/8.1.7/ocommon/nls/admin/data
SetEnv NLS_LANG "brazilian portuguese"
</IfModule>
Cheers,
Rod.
----- Original Message -----
From: "Yu-Hsin Chen" <ychen at yorktel.com>
To: "Rodrigo Cabral" <cabral at yadata.net>; "PARVILLERS"
<hugues at parvillers.com>
Cc: <mapserver-users at lists.gis.umn.edu>
Sent: Saturday, February 23, 2002 12:16 PM
Subject: RE: [mapserver-users] oraclespatial connect error
I'm on Mandrake Linux ProSuite 8.0. Oracle is 8i 8.1.7 for Linux. I
can access my remote database through sqlplus or a perl cgi program
without problems. Mapserver was compiled with oraclespatial and the
path was pointing to the correct $ORACLE_HOME path.
I won't be able to try anything until Monday. So I will create a local
database to see if I at least can conquer the connect problem.
After that I'd have to work with the spatial issues. I'm not familiar
with Oracle spatial implementation. My need is simple: I'd like to be
able to retrieve locations from the database based on certain criteria
and plot them on the map. That's why in my original message I put the
'DATA' statement that way. I thought I could pull the latitude and
longitude data and plot them as circles (that's how I understood the
Mapserver reference manual) with that statement. If that's not the
case, Rod, I think I'll need assistance later.
Thanks.
Yu-Hsin
-----Original Message-----
From: Rodrigo Cabral
Sent: Sat 2/23/2002 8:20 AM
To: PARVILLERS; Yu-Hsin Chen
Cc: mapserver-users at lists.gis.umn.edu
Subject: Re: [mapserver-users] oraclespatial connect error
Which binary of mapserver are you using? Windows or Unix? -- just for
curiosity
Also, you could try to track the error by running sqlplus and trying to
connect to the database. You should get the same TNS error when you try
to
connect.
Rod.
----- Original Message -----
From: "PARVILLERS" <hugues at parvillers.com>
Sent: Saturday, February 23, 2002 4:40 AM
Subject: Re: [mapserver-users] oraclespatial connect error
Hello,
don't you have more than one Oracle install on your local server ? May
be
the
Oci don't look in the right tnsnames.ora file ?
Yu-Hsin Chen a écrit :
> Well, my problem is that the database is not on the local machine. I
> guess I could create the local database and test it out. If that is
> successful I can always create database link in Oracle to access the
> real data.
>
> Thanks for the tip on DATA. I will have more questions back on this
> item.
>
> Yu-Hsin
>
> -----Original Message-----
> From: Rodrigo Cabral
> Sent: Fri 2/22/2002 7:32 PM
> To: Yu-Hsin Chen; mapserver-users at lists.gis.umn.edu
> Cc:
> Subject: Re: [mapserver-users] oraclespatial connect error
>
> Your error means that the Oracle client cannot find the database
> (service)
> to connect. Try using simply 'username/password' for CONNECTION to see
> if
> the default service works.
>
> Also, your DATA statement is not going to work. 'circle' must be in
the
> select list. Like "circle from (select circle...)". BUT, why are you
> doing
> that? Try this:
>
> DATA "circle FROM room_geoloc"
> or
> DATA "circle FROM room_geoloc USING SRID <srid#>" if you have an srid
> number
> defined.
>
> Rod.
>
> ----- Original Message -----
> From: "Yu-Hsin Chen" <ychen at yorktel.com>
> To: <mapserver-users at lists.gis.umn.edu>
> Sent: Friday, February 22, 2002 4:04 PM
> Subject: [mapserver-users] oraclespatial connect error
>
> I've compiled mapserver 3.5 with oraclespatial option on my Mandrake
> Linux 8.0 with Oracle 8.1.7i. When I run sqlplus at Linux prompt I
can
> get to the database with un/pw at bis login. However, when I tried it
from
> a map file I get "msOCIConnect() in msOracleSpatialLayerOpen():
> OracleSpatial error. Error while trying to retrieve text for error
> ORA-12541" in my browser. ORA-12541 is "TNS:could not resolve service
> name".
>
> My map file looks like this:
>
> LAYER
> NAME "oracle"
> CONNECTIONTYPE oraclespatial
> CONNECTION 'un/pw at bis'
> DATA "circle from (select room_id, longitude, latitude from
> room_geoloc)"
> TYPE POINT
> STATUS ON
> ...
> ...
> END
>
> Thanks in advance to whoever can help me.
>
> Yu-Hsin Chen
>
>
------------------------------------------------------------------------
> Name: winmail.dat
> winmail.dat Type: application/ms-tnef
> Encoding: base64
-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 5850 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20020223/852777ee/attachment.bin>
More information about the MapServer-users
mailing list