[mapserver-users] mapserver error

Iratxe Lejarreta iratxe.lejarreta at axios.es
Wed Apr 29 04:42:12 EDT 2009


On Friday 24 April 2009 12:42:46 Pano wrote:
> Hi Iratxe,
> Unfortunately I know very little about CentOS. Just a windows guy me :-)
> But let me try:
> Is it possible that you have multiple Oracle Homes setup? And sqlplus is
> using the home where oracle server is installed whereas mapserver is using
> another (oracle client?) home which does not have the tnsnames setup
> correctly? In a windows setup i would first check the PATH environment
> variable. If the oracle client install is the first on the list then this
> is what mapserver would use. You mention a path
> /usr/lib/oracle/10.2.0.3/client- does this folder also contains a
> network\admin\tnsnames.ora file? Maybe this is the one you need to change
> (again maybe talking complete rubish here as on idea abt this OS)
>
> Finally- another idea just to make sure its not a WFS problem. Are you able
> to get an image by simply using cgi-bin e.g.
> http://localhost/cgi-bin/mapserve?map=...,&mode=map etc??
>
> Pano
>
> Iratxe Lejarreta wrote:
> > On Wednesday 22 April 2009 08:54:57 Pano wrote:
> >> Hi Iratxe,
> >>
> >> Looks like mapserver doesnt know the TNS name 'orcl' that you have
> >> defined.
> >> I assume that the machine where mapserver runs has an oracle client
> >> installed? Can you log into sql plus i..e sqlplus mddata/<passwd>@orcl
> >> from
> >> a command prompt on this box?  I assume you will get the same TNS error.
> >> Which will mean that your tnsnames.ora file is not set correctly. The
> >> file
> >> should be located under $ORACLE_HOME\network\admin\tnsnames.ora. There
> >> should be an entry in there like:
> >>
> >> ORCL =
> >>   (DESCRIPTION =
> >>     (ADDRESS_LIST =
> >>       (ADDRESS =
> >>         (PROTOCOL = TCP)
> >>         (HOST = <server_name_or_IP)
> >>         (PORT = <usually_1521>)
> >>       )
> >>     )
> >>     (CONNECT_DATA =
> >>       (SERVER = DEDICATED)
> >>       (SERVICE_NAME = <oracle_service_name>)
> >>     )
> >>   )
> >>
> >> Hope this helps,
> >> Pano
> >>
> >> Iratxe Lejarreta wrote:
> >> > Hi,
> >> >
> >> > I installed MapServer-5.2.0 on CentOS 5.2 with Oracle 10g, but when I
> >>
> >> run
> >>
> >> > the
> >> > WFS service...
> >> >
> >> > http://localhost/cgi-
> >> > bin/mywfs?SERVICE=WFS&VERSION=1.0.0&REQUEST=getfeature&TYPENAME=cities
> >> >
> >> > ...the result is:
> >> > −
> >> > <ServiceExceptionReport version="1.2.0"
> >> > xsi:schemaLocation="http://www.opengis.net/ogc
> >> > http://schemas.opengis.net/wfs/1.0.0/OGC-exception.xsd">
> >> > −
> >> > <ServiceException code="NoApplicableCode" locator="mapserv">
> >> >
> >> > msWFSGetFeature(): WFS server error. ms_error->code not found
> >> > msOracleSpatialLayerOpen(): OracleSpatial error. Cannot create OCI
> >> > Handlers.
> >> > Connection failure. Check the connection string. Error: ORA-12154:
> >> > TNS:could
> >> > not resolve the connect identifier specified
> >> > .
> >> > msOracleSpatialLayerOpen(): OracleSpatial error. Cannot create OCI
> >> > Handlers.
> >> > Connection failure. Check the connection string. Error: ORA-12154:
> >> > TNS:could
> >> > not resolve the connect identifier specified
> >> > .
> >> >
> >> > </ServiceException>
> >> > </ServiceExceptionReport>
> >> >
> >> >
> >> > Mapfile:
> >> >
> >> > MAP
> >> > 	NAME WFS_TEST
> >> > 	STATUS ON
> >> > 	SIZE 400 300
> >> > 	EXTENT -180 -90 180 90
> >> > 	UNITS METERS
> >> > 	IMAGECOLOR 255 255 255
> >> > WEB
> >> > 	METADATA
> >> > 		"wfs_title"		"WFS TEST"
> >> > 		"wfs_onlineresource"	"http://localhost/cgi-bin/mywfs?"
> >> > 		"wfs_srs"		"EPSG:4326"
> >> > 	END
> >> > END
> >> > PROJECTION
> >> > 	"init=epsg:4326"
> >> > END
> >> > LAYER
> >> > 	NAME cities
> >> > 	TYPE POINT
> >> > 	CONNECTIONTYPE oraclespatial
> >> > 	CONNECTION "MDDATA/*****@orcl"
> >> > 	DATA "GEOM FROM CITIES USING UNIQUE FID SRID 4326 VERSION 10g"
> >> > 	METADATA
> >> > 		"wfs_title"	"cities"
> >> > 		"gml_featureid" "FID"
> >> > 		"gml_include_items" "all"
> >> > 	END
> >> > 	STATUS ON
> >> > 	DUMP TRUE
> >> > 	CLASS
> >> > 		STYLE
> >> > 			OUTLINECOLOR 0 0 0
> >> > 			COLOR 0 128 128
> >> > 		END
> >> > 	END
> >> > END # Cities
> >> > END # Map File
> >> >
> >> >
> >> > Somebody can help me?
> >> >
> >> > Thanks in advance.
> >> >
> >> > --
> >> > Iratxe Lejarreta
> >> > www.axios.es
> >> >
> >> > _______________________________________________
> >> > mapserver-users mailing list
> >> > mapserver-users at lists.osgeo.org
> >> > http://lists.osgeo.org/mailman/listinfo/mapserver-users
> >
> > Hi Pano,
> >
> > Firstly, thanks for your answer!
> >
> > I have checked all configuration but I continue with the same error:
> >
> > 1.- I haven't got any error in logs.
> >
> > 2.- I installed Oracle Instat Client:
> > # rpm -Uvh oracle-instantclient-basic-10.2.0.4-1.i386.rpm
> > I have set the library loading path:
> > # export LD_LIBRARY_PATH=/usr/lib/oracle/10.2.0.3/client/lib
> >
> > 3.- I can access with sqlplus and sqldeveloper without any problem:
> > [oracle]$ sqlplus mddata/<passwd>@orcl
> >
> > 4.- $ORACLE_HOME\network\admin\tnsnames.ora file:
> >  ORCL =
> >    (DESCRIPTION =
> >      (ADDRESS_LIST =
> >        (ADDRESS =
> >          (PROTOCOL = TCP)
> >          (HOST = 192.168.2.215)
> >          (PORT = 1521)
> >        )
> >      )
> >      (CONNECT_DATA =
> >        (SERVER = DEDICATED)
> >        (SERVICE_NAME = orcl)
> >      )
> >    )
> >
> > 5.- I try to access with the following URL:
> > http://192.168.2.215/cgi-
> > bin/mywfs?SERVICE=WFS&VERSION=1.0.0&REQUEST=getfeature&TYPENAME=cities
> >
> > 6.- ...but the result it's the same:
> > <ServiceExceptionReport version="1.2.0"
> > xsi:schemaLocation="http://www.opengis.net/ogc
> > http://schemas.opengis.net/wfs/1.0.0/OGC-exception.xsd">
> > <ServiceException code="NoApplicableCode" locator="mapserv">
> > msWFSGetFeature(): WFS server error. ms_error->code not found
> > msOracleSpatialLayerOpen(): OracleSpatial error. Cannot create OCI
> > Handlers.
> > Connection failure. Check the connection string. Error: ORA-12154:
> > TNS:could
> > not resolve the connect identifier specified.
> > msOracleSpatialLayerOpen(): OracleSpatial error. Cannot create OCI
> > Handlers.
> > Connection failure. Check the connection string. Error: ORA-12154:
> > TNS:could
> > not resolve the connect identifier specified.
> > </ServiceException>
> > </ServiceExceptionReport>
> >
> > Do you know where could be wrong?
> >
> > Thanks for your help!!!!!
> >
> > Regards,
> > --
> > Iratxe Lejarreta
> > www.axios.es
> >
> > _______________________________________________
> > mapserver-users mailing list
> > mapserver-users at lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/mapserver-users

Hi, 

Finally I have achieved to solve my problem!
The solution is to add $ORACLE_HOME in the apache configuration.

Regards,

-- 
Iratxe Lejarreta
www.axios.es
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20090429/d1c7c0e1/attachment-0001.html


More information about the mapserver-users mailing list