Hi,<br><br> I'm trying to get point data out of mysql to display on a map. I'm using the following .ovf file, which I've tested using ogrinfo and seems to work fine.<br><br><span style="font-family: courier new,monospace;">
<OGRVRTDataSource></span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> <OGRVRTLayer name="test_gis"></span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> <SrcDataSource>MYSQL:test_gis,user=root,password=mypword,host=<a href="http://127.0.0.1">127.0.0.1</a>,port=3306,tables=boxes</SrcDataSource></span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> <SrcSQL>SELECT fid, x, y FROM boxes</SrcSQL></span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> <GeometryType>wkbPoint</GeometryType>
</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> <GeometryField encoding="PointFromColumns" x="x" y="y" z="z" />
</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> </OGRVRTLayer></span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
</OGRVRTDataSource></span><br><br>When I go to the jsp that draws the map I get these errors:<br><br><span style="font-family: times new roman,serif;">description The server encountered an internal error () that prevented it from fulfilling this request.
</span><br style="font-family: times new roman,serif;"><br style="font-family: times new roman,serif;"><span style="font-family: times new roman,serif;">exception</span><br style="font-family: times new roman,serif;"><br style="font-family: times new roman,serif;">
<span style="font-family: times new roman,serif;">org.apache.jasper.JasperException: Failed to draw layer named 'test_gis'.</span><br style="font-family: times new roman,serif;"><span style="font-family: times new roman,serif;">
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)</span><br style="font-family: times new roman,serif;"><span style="font-family: times new roman,serif;"> org.apache.jasper.servlet.JspServletWrapper.service
(JspServletWrapper.java:375)</span><br style="font-family: times new roman,serif;"><span style="font-family: times new roman,serif;"> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)</span><br style="font-family: times new roman,serif;">
<span style="font-family: times new roman,serif;"> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)</span><br style="font-family: times new roman,serif;"><span style="font-family: times new roman,serif;">
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)</span><br style="font-family: times new roman,serif;"><br style="font-family: times new roman,serif;"><span style="font-family: times new roman,serif;">root cause
</span><br style="font-family: times new roman,serif;"><br style="font-family: times new roman,serif;"><span style="font-family: times new roman,serif;">javax.servlet.ServletException: Failed to draw layer named 'test_gis'.
</span><br style="font-family: times new roman,serif;"><span style="font-family: times new roman,serif;"> org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:858)</span><br style="font-family: times new roman,serif;">
<span style="font-family: times new roman,serif;"> org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:791)</span><br style="font-family: times new roman,serif;"><span style="font-family: times new roman,serif;">
org.apache.jsp.boxes.dartmoor_005fpoints_jsp._jspService(dartmoor_005fpoints_jsp.java:74)</span><br style="font-family: times new roman,serif;"><span style="font-family: times new roman,serif;"> org.apache.jasper.runtime.HttpJspBase.service
(HttpJspBase.java:97)</span><br style="font-family: times new roman,serif;"><span style="font-family: times new roman,serif;"> javax.servlet.http.HttpServlet.service(HttpServlet.java:802)</span><br style="font-family: times new roman,serif;">
<span style="font-family: times new roman,serif;"> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)</span><br style="font-family: times new roman,serif;"><span style="font-family: times new roman,serif;">
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)</span><br style="font-family: times new roman,serif;"><span style="font-family: times new roman,serif;"> org.apache.jasper.servlet.JspServlet.service
(JspServlet.java:264)</span><br style="font-family: times new roman,serif;"><span style="font-family: times new roman,serif;"> javax.servlet.http.HttpServlet.service(HttpServlet.java:802)</span><br style="font-family: times new roman,serif;">
<br style="font-family: times new roman,serif;"><span style="font-family: times new roman,serif;">root cause</span><br style="font-family: times new roman,serif;"><br style="font-family: times new roman,serif;"><span style="font-family: times new roman,serif;">
java.lang.UnknownError: Failed to draw layer named 'test_gis'.</span><br style="font-family: times new roman,serif;"><span style="font-family: times new roman,serif;"> edu.umn.gis.mapscript.mapscriptJNI.mapObj_draw(Native Method)
</span><br style="font-family: times new roman,serif;"><span style="font-family: times new roman,serif;"> edu.umn.gis.mapscript.mapObj.draw(mapObj.java:382)</span><br style="font-family: times new roman,serif;"><span style="font-family: times new roman,serif;">
org.apache.jsp.boxes.dartmoor_005fpoints_jsp._jspService(dartmoor_005fpoints_jsp.java:56)</span><br style="font-family: times new roman,serif;"><span style="font-family: times new roman,serif;"> org.apache.jasper.runtime.HttpJspBase.service
(HttpJspBase.java:97)</span><br style="font-family: times new roman,serif;"><span style="font-family: times new roman,serif;"> javax.servlet.http.HttpServlet.service(HttpServlet.java:802)</span><br style="font-family: times new roman,serif;">
<span style="font-family: times new roman,serif;"> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)</span><br style="font-family: times new roman,serif;"><span style="font-family: times new roman,serif;">
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)</span><br style="font-family: times new roman,serif;"><span style="font-family: times new roman,serif;"> org.apache.jasper.servlet.JspServlet.service
(JspServlet.java:264)</span><br style="font-family: times new roman,serif;"><span style="font-family: times new roman,serif;"> javax.servlet.http.HttpServlet.service(HttpServlet.java:802)</span><br><br><br><br>I've tried loads of different things in the .map file (below) but I still end up with the same problem. Does anyone know what I'm going wrong?
<br><br>Thanks,<br>Sarah<br><br>Map file:<br><br><span style="font-family: courier new,monospace;">MAP</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> NAME DARTMOOR_POINTS
</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> STATUS ON</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
SHAPEPATH "/usr/local/apache-tomcat-5.5.17/webapps/ROOT/boxes/"</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> EXTENT 250000.000000 57000.000000 260000.000000
70000.000000</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> SIZE 400 400</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> WEB</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> IMAGEPATH "/usr/local/apache-tomcat-5.5.17/webapps/ROOT/temp/"
</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> IMAGEURL "/temp/"</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
END</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> LAYER</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> NAME "test_gis"</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> STATUS ON</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> TYPE POINT</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> PROJECTION</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> "proj=latlong"</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> "ellps=WGS84"
</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> "datum=WGS84"</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
END</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> CONNECTIONTYPE OGR</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
CONNECTION "test_gis.ovf"</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> DATA "test_gis"</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> CLASS</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> NAME "boxes"</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> SYMBOL 0</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> COLOR 0 0 0</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> OUTLINECOLOR 255 0 0</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> END</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> END</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">END</span><br><br>----------------------------------------------------------------------------------------------------------------------------
<br><br>JSP File:<br><br><span style="font-family: courier new,monospace;"><%@ page language="java" contentType="text/html; charset=ISO-8859-1"</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> pageEncoding="ISO-8859-1"%></span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML
4.01 Transitional//EN"></span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"><html></span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
<%@ page import = "edu.umn.gis.mapscript.mapObj" %></span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"><%@ page import = "edu.umn.gis.mapscript.imageObj
" %></span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"><% mapObj vMap;</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> String vMapName = "/usr/local/apache-tomcat-5.5.17/webapps/ROOT/boxes/dartmoor_points.map";</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
vMap = new mapObj(vMapName);</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> String vMapFile = "/usr/local/apache-tomcat-5.5.17/webapps/ROOT/boxes/dartmoor_points.mapfile";
</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> vMap.setMappath(vMapName);</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
imageObj img = vMap.draw();</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> img.save(vMapFile,vMap);</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">%></span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"><head></span>
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"></head></span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"><body>
</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">Image:<br></span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
<image src="dartmoor_points.mapfile"></span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"></body></span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"></html></span>