[Mapserver-users] msOGRFileOpen for OGR/VRT layer

D'cruz,Steven [Ontario] Steven.D'Cruz at ec.gc.ca
Mon Jul 5 11:10:40 EDT 2004


This is a multi-part message in MIME format.

------_=_NextPart_001_01C462A2.3C462812
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

Hi there,

	I'm currently running Mapserver (v. 4.0) in conjunction with
CWC2, on 2 different machines, each with an identical setup (although
different hardware components).  In my test mapfile, there exists a
layer titled "Active_Station_View" which, using OGR/VRT, connects to a
remote SQL Server 2000 via the FREETDS drivers.  The points generated by
this remote connection appear correctly on both machines, along with
their associated labels.  The problem I'm encountering arises from
attempting a WFS extraction from the mapfile.  On the first machine this
works flawlessly, and a valid xml/gml page is generated.  One would
assume that since the setup/configuration was identical on both
machines, success on one machine implies success on the other; this is
apparently not the case. =20

Here is the connection string used to generate the xml/gml page via WFS:
http://142.97.xxx.xxx/cgi-bin/mapserv_40?map=3D/path/to/map.map&service=3D=
WF
S&version=3D1.0.0&request=3Dgetfeature=20

On the first machine a valid xml/gml page is produced, containing all
points and their associated attributes, while the second machine
generates the following error page:
The XML page cannot be displayed=20
Cannot view XML input using XSL style sheet. Please correct the error
and then click the Refresh <javascript:location.reload()>  button, or
try again later.=20

End tag 'Message' does not match the start tag 'br'. Error processing
resource
'http://142.97.xxx.xxx/cgi-bin/mapserv_40?map=3D/path/to/map.map&service=3D=
W
FS&version=3D1.0.0&request=3Dgetfeature'. Line 11, Position 7=20
    </Message>
------^

The source page for the previous error message contains the following
lines of text:

<WFS_Exception>
  <Exception>
    <Message>
msOGRFileOpen: OGR error. mappath=3D/mapfiles/MSSD_DEMO/MapFiles/ <br>
msOGRFileOpen(): OGR error. Attempt to open OGR
dataset:../OvfFiles/Active_Station_View.ovf <br>
    </Message>
  </Exception>
</WFS_Exception>

I understand that the second error message is a result of the first
error message, which contains <br> instead of &lt;br&gt; .  Rather, I'd
like to pose the following question; Why does the first machine generate
a valid xml/gml page, while the second gets a msOGRFileOpen error?  I've
spent a considerable amount of time attempting to track down the
problem, however I've been unsuccessful so far.  Any help/insight in
solving the problem would be greatly appreciated.=20

As an additional piece of data, I've successfully run ogrinfo
Active_Station_View.ovf ... it returned the following 'positive' results
on BOTH machines:
[root at localhost OvfFiles]# ogrinfo Active_Station_View.ovf=20
ERROR 4: Update access not supported for VRT datasources.
Had to open data source read-only.
INFO: Open of `Active_Station_View.ovf'
using driver `VRT' successful.
1: Active_Station_View (Point)

=09
Steven D'Cruz
=09
Steven.D'Cruz at ec.gc.ca
=09
(GIS) Web Developer
=09
Environment Canada

------_=_NextPart_001_01C462A2.3C462812
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
6.0.6487.1">
<TITLE>msOGRFileOpen for OGR/VRT layer</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->

<P><FONT SIZE=3D2 FACE=3D"Arial">Hi there,</FONT>
</P>

<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2 =
FACE=3D"Arial">I'm currently running Mapserver (v. 4.0) in conjunction =
with CWC2, on 2 different machines, each with an identical setup =
(although different hardware components).&nbsp; In my test mapfile, =
there exists a layer titled &quot;Active_Station_View&quot; which, using =
OGR/VRT, connects to a remote SQL Server 2000 via the FREETDS =
drivers.&nbsp; The points generated by this remote connection appear =
correctly on both machines, along with their associated labels.&nbsp; =
The problem I'm encountering arises from attempting a WFS extraction =
from the mapfile.&nbsp; On the first machine this works flawlessly, and =
a valid xml/gml page is generated.&nbsp; One would assume that since the =
setup/configuration was identical on both machines, success on one =
machine implies success on the other; this is apparently not the =
case.&nbsp; </FONT></P>

<P><FONT SIZE=3D2 FACE=3D"Arial">Here is the connection string used to =
generate the xml/gml page via WFS:</FONT>

<BR><A =
HREF=3D"http://142.97.xxx.xxx/cgi-bin/mapserv_40?map=3D/path/to/map.map&a=
mp;service=3DWFS&amp;version=3D1.0.0&amp;request=3Dgetfeature"><U><FONT =
COLOR=3D"#0000FF" SIZE=3D2 =
FACE=3D"Arial">http://142.97.xxx.xxx/cgi-bin/mapserv_40?map=3D/path/to/ma=
p.map&amp;service=3DWFS&amp;version=3D1.0.0&amp;request=3Dgetfeature</FON=
T></U></A><FONT SIZE=3D2 FACE=3D"Arial"> </FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">On the first machine a valid xml/gml =
page is produced, containing all points and their associated attributes, =
while the second machine generates the following error page:</FONT></P>

<P><B><FONT FACE=3D"Times New Roman">The XML page cannot be displayed =
</FONT></B>

<BR><B><FONT FACE=3D"Times New Roman">Cannot view XML input using XSL =
style sheet. Please correct the error and then click the </FONT></B><A =
HREF=3D"javascript:location.reload()"><B><U><FONT COLOR=3D"#0000FF" =
FACE=3D"Times New Roman">Refresh</FONT></U></B></A><B><FONT =
FACE=3D"Times New Roman"> button, or try again later. </FONT></B></P>

<P><B><FONT FACE=3D"Times New Roman">End tag 'Message' does not match =
the start tag 'br'. Error processing resource '</FONT></B><A =
HREF=3D"http://142.97.xxx.xxx/cgi-bin/mapserv_40?map=3D/path/to/map.map&a=
mp;service=3DWFS&amp;version=3D1.0.0&amp;request=3Dgetfeature"><B><U><FON=
T COLOR=3D"#0000FF" FACE=3D"Times New =
Roman">http://142.97.xxx.xxx/cgi-bin/mapserv_40?map=3D/path/to/map.map&am=
p;service=3DWFS&amp;version=3D1.0.0&amp;request=3Dgetfeature</FONT></U></=
B></A><B><FONT FACE=3D"Times New Roman">'. Line 11, Position 7 =
</FONT></B></P>

<P><B><FONT COLOR=3D"#0000FF" SIZE=3D2 FACE=3D"Times New =
Roman">&nbsp;&nbsp;&nbsp; &lt;/Message&gt;</FONT></B>

<BR><B><FONT COLOR=3D"#0000FF" SIZE=3D2 FACE=3D"Times New =
Roman">------^</FONT></B>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">The source page for the previous error =
message contains the following lines of text:</FONT>
</P>

<P><B><FONT SIZE=3D2 FACE=3D"Arial">&lt;WFS_Exception&gt;</FONT></B>

<BR><B><FONT SIZE=3D2 FACE=3D"Arial">&nbsp; &lt;Exception&gt;</FONT></B>

<BR><B><FONT SIZE=3D2 FACE=3D"Arial">&nbsp;&nbsp;&nbsp; =
&lt;Message&gt;</FONT></B>

<BR><B><FONT SIZE=3D2 FACE=3D"Arial">msOGRFileOpen: OGR error. =
mappath=3D/mapfiles/MSSD_DEMO/MapFiles/ &lt;br&gt;</FONT></B>

<BR><B><FONT SIZE=3D2 FACE=3D"Arial">msOGRFileOpen(): OGR error. Attempt =
to open OGR dataset:../OvfFiles/Active_Station_View.ovf =
&lt;br&gt;</FONT></B>

<BR><B><FONT SIZE=3D2 FACE=3D"Arial">&nbsp;&nbsp;&nbsp; =
&lt;/Message&gt;</FONT></B>

<BR><B><FONT SIZE=3D2 FACE=3D"Arial">&nbsp; =
&lt;/Exception&gt;</FONT></B>

<BR><B><FONT SIZE=3D2 FACE=3D"Arial">&lt;/WFS_Exception&gt;</FONT></B>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">I understand that the second error =
message is a result of the first error message, which contains =
&lt;br&gt; instead of &amp;lt;br&amp;gt; .&nbsp; Rather, I'd like to =
pose the following question; Why does the first machine generate a valid =
xml/gml page, while the second gets a msOGRFileOpen error?&nbsp; I've =
spent a considerable amount of time attempting to track down the =
problem, however I've been unsuccessful so far.&nbsp; Any help/insight =
in solving the problem would be greatly appreciated. </FONT></P>

<P><FONT SIZE=3D2 FACE=3D"Arial">As an additional piece of data, I've =
successfully run ogrinfo Active_Station_View.ovf &#8230; it returned the =
following 'positive' results on BOTH machines:</FONT></P>

<P><B><FONT SIZE=3D2 FACE=3D"Arial">[root at localhost OvfFiles]# ogrinfo =
Active_Station_View.ovf </FONT></B>

<BR><B><FONT SIZE=3D2 FACE=3D"Arial">ERROR 4: Update access not =
supported for VRT datasources.</FONT></B>

<BR><B><FONT SIZE=3D2 FACE=3D"Arial">Had to open data source =
read-only.</FONT></B>

<BR><B><FONT SIZE=3D2 FACE=3D"Arial">INFO: Open of =
`Active_Station_View.ovf'</FONT></B>

<BR><B><FONT SIZE=3D2 FACE=3D"Arial">using driver `VRT' =
successful.</FONT></B>

<BR><B><FONT SIZE=3D2 FACE=3D"Arial">1: Active_Station_View =
(Point)</FONT></B>
</P>

<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2 =
FACE=3D"Arial">Steven D'Cruz</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp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&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2 =
FACE=3D"Arial">Environment Canada</FONT>
</P>

</BODY>
</HTML>
------_=_NextPart_001_01C462A2.3C462812--



More information about the mapserver-users mailing list