MapscriptJNI - No such file failure in new_projectionObj

McGraw, Joanne mcgrawj at AGR.GC.CA
Fri Mar 24 15:43:36 EST 2006


It's taken a while but I have finally been able to get something to
happen in a Java Mapscript environment. In a JSP running on Tomcat
5.5.9, I created a new mapObj, drew it and saved the results to a file.
Okay, good.

Now, I'm actually trying to do what I started out wanting to do in the
first place and am completely stuck. I have a JSP that receives an input
EPSG projection, an output EPSG projection and a bounding box provided
in the coordinate system of the input EPSG projection. So, my first two
lines of code are:

  String szProjIn = "init=" + request.getParameter("INPROJ");
  // szProjIn contains "init=EPSG:42304"
  projectionObj oProjIn = new projectionObj(szProjIn);

When the code attempts the new projectionObj(szProjIn) code, it fails
with the following message:

java.lang.UnknownError: No such file or directory
	at edu.umn.gis.mapscript.mapscriptJNI.new_projectionObj(Native
Method)
	at
edu.umn.gis.mapscript.projectionObj.<init>(projectionObj.java)
	at
org.apache.jsp.MapScript_jsp._jspService(org.apache.jsp.MapScript_jsp:52
)
	at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

I'm guessing, but have no way of knowing, that the problem is that the
new_projectionObj code in the dll is looking for a file that details the
EPSG:42304 projection and not finding it. I'm assuming too that it's the
/proj/epsg file that is part of the standard MapServer installation. If
all this is correct, where in the Tomcat server configuration is it
looking for this file? At the moment, my jar is under the app's
WEB-INF/lib/ directory and the dll is in the same place.

If this is not the problem, does anyone have any ideas what else it
might be? 

Cheers,
jtm



More information about the mapserver-users mailing list