[ms4w-users] oracle spatial

Jeff McKenna jmckenna at dmsolutions.ca
Wed Jun 14 19:15:47 EDT 2006


This could be a problem with the MS4W 2.0 version.  Can someone else 
with Oracle test with a fresh MS4W 2.0 and report back?  thanks.

jeff



Daniel Goetz wrote:
> Hi,
> 
> I am Daniel and I have problems with mapping oracle spatial data via mapserver.
> 
> I have installed Oracle 10g Release 1 client on my computer. Then unzipped the latest ms4w package (ms4w 2.0). Did the .dll swapping for oracle spacial support like described in the redme-file of the ms4w-package.
> Then I wrote a mapfile using the native oracle spatial support of the mapserver (not the OGR-Support).
> 
> MAP
> NAME "Nbg"
> #EXTENT 426666.49 466058.21 448321.44 490754.58
> EXTENT 433000 478000 434000 479000
> #SIZE 1400 1800
> SIZE 400 400
> SHAPEPATH "/ms4w/Apache/htdocs/raster/daten"
> IMAGETYPE PNG
> IMAGECOLOR 255 255 255
> UNITS METERS
> STATUS ON
> PROJECTION
> "init=epsg:4326"
> END
> 
> WEB
>     IMAGEPATH "c:\ms4w\Apache\htdocs\raster\tmp\"
>     IMAGEURL "/raster/tmp/"
>     TEMPLATE "test_template.html"    
> END
> 
> 
> LAYER
>         NAME "RWG"
>         CONNECTIONTYPE OracleSpatial
>         CONNECTION "username/password at service"
>         DATA "GEOM FROM RWG_TBL USING SRID 82032"
>         TYPE POINT
>         STATUS ON
>         PROJECTION
> "init=epsg:4326"
> END
>         CLASS
>             NAME "Punkte"
>             STYLE
>         OUTLINECOLOR 128 128 128
>                 COLOR 225 225 185
>             END
>         END
> END
> 
> END
> 
> Then I did some settings in the httpd.cong of the apache server like described in the "Using oracle spatial" howto. But I don't really know whether this was right. In the "ENV VARS" column I added the following parameters:
> 
> SetEnv ORACLE_HOME "c:/ora10gR1_client"
> SetEnv TNS_ADMIN "c:/ora10gR1_client/NETWORK/ADMIN"
> SetEnv PATH "c:/ora10gr1_client/bin"
> 
> I saved this and restarted apache. Then I tried to map the oracle data via umn-mapserver. Therefor I wrote the following in my browser:
> 
> http://localhost/cgi-bin/mapserv.exe?map=c:/ms4w/Apache/htdocs/raster/test_os_native.map&layers=all&mode=map
> 
> Then I get a error-message from apache:
> 
> "Internal Server Error.The server encountered an internal error or misconfiguration and was unable to complete your request."
> 
> In the errorlog of the apache the following was  logged:
> 
> [Tue Jun 13 15:45:56 2006] [error] [client 127.0.0.1] Premature end of script headers: mapserv.exe
> 
> But I don't know what this means. But when I consciously do some mistake in the DATA expression in the .mapfile (giving a tablename that does not exist in the database) I get the following error-message from the mapserver (and not the apache):
> 
> msDrawMap(): Image handling error. Failed to draw layer named 'RWG'.
> msOracleSpatialLayerWhichShapes(): OracleSpatial error. Error: ORA-00942: Tabelle oder View nicht vorhanden . Query statement: SELECT rownum, GEOM FROM RWG_TBL.g WHERE SDO_FILTER( GEOM, MDSYS.SDO_GEOMETRY(2003, 82032, NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3),MDSYS.SDO_ORDINATE_ARRAY(433000,478000,434000,479000) ),'querytype=window') = 'TRUE' . Check your data statement.
> 
> So you can see that mapserver is able to connect to the database, because it says that the Table or View is not available.
> The really astonishing is that after doing the .dll swapping for oracle spatial support other mapserver-projects that have worked fine on my computer before the swapping cause the same appache error-message.
> Could anybody imagine what might be the problem? Might it be that mapserver and the version of my oracle client (10g Release 1) are not compiled against each other? Or is there another mistake I have done?
> 
> Please help me. I would be very glad and thankful for any hint. Thank you so much.
> 
> 
> regards
> 
> Daniel



More information about the ms4w-users mailing list