Java Mapscript error.

Anderson Guiera aguiera at GMAIL.COM
Tue Aug 7 06:13:39 PDT 2007


Hi,

I'm trying to build an application with Java mapScript and tomcat 6.
I've got ms4w (2.2.4) and installed. I've seted up the environment variables

PATH
\ms4w\Apache\cgi-bin;\ms4w\tools\gdal-ogr;\ms4w\tools\mapserv;\ms4w\tools\s
hapelib;\ms4w\proj\bin;\ms4w\tools\shp2tile;\ms4w\tools\shpdiff;\ms4w\tools\avce
00;\ms4w\Apache\cgi-bin\mapscript\java;%PATH%

GDAL_DATA
\ms4w\gdaldata

GDAL_DRIVER_PATH
\ms4w\gdalplugins

PROJ_LIB
\ms4w\proj\nad

I've made an jsp page called mapScript.jsp like this

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "
http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<%
try {
    System.loadLibrary("mapscript");
    System.out.println("It's OK!");
} catch(Throwable t) {
    t.printStackTrace();
    System.out.println("It's NOT OK!");
}
%>
</body>
</html>

When i execute this page, the folowing error is showed:

java.lang.UnsatisfiedLinkError:
C:\ms4w\Apache\cgi-bin\mapscript\java\mapscript.dll: The operating system
cannot run %1
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary0(Unknown Source)
    at java.lang.ClassLoader.loadLibrary(Unknown Source)
    at java.lang.Runtime.loadLibrary0(Unknown Source)
    at java.lang.System.loadLibrary(Unknown Source)
    at org.apache.jsp.mapScript_jsp._jspService(mapScript_jsp.java:64)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at org.apache.jasper.servlet.JspServletWrapper.service(
JspServletWrapper.java:384)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java
:320)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(
ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(
StandardWrapperValve.java:228)
    at org.apache.catalina.core.StandardContextValve.invoke(
StandardContextValve.java:175)
    at org.apache.catalina.core.StandardHostValve.invoke(
StandardHostValve.java:128)
    at org.apache.catalina.valves.ErrorReportValve.invoke(
ErrorReportValve.java:104)
    at org.apache.catalina.core.StandardEngineValve.invoke(
StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(
CoyoteAdapter.java:216)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:844)
    at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(
Http11Protocol.java:634)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java
:445)
    at java.lang.Thread.run(Unknown Source)

I tried to folow the adivices posted in thread  Mapscript on
java/J2EE/Tomcat error by Sujnana Rai but i have not success.
Any other idea?

Thanks for your heIp.

Anderson Guiera
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20070807/c5685321/attachment.htm>


More information about the MapServer-users mailing list