2

I have a web project which is working fine when I am deploying that project to individual tomcat but when I am trying to run same project from inside Eclipse and in same tomcat instance it is not working throws the following exception:

 java.lang.UnsatisfiedLinkError: C:\ms4w\Apache\cgi-bin\mapscript.dll:
 The operating system cannot run %1     at
 java.lang.ClassLoader$NativeLibrary.load(Native Method)    at
 java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1807)  at
 java.lang.ClassLoader.loadLibrary(ClassLoader.java:1732)   at
 java.lang.Runtime.loadLibrary0(Runtime.java:823)   at
 java.lang.System.loadLibrary(System.java:1028)     at
 edu.umn.gis.mapscript.mapscriptJNI.<clinit>(mapscriptJNI.java:26)  at
 edu.umn.gis.mapscript.mapObj.<init>(mapObj.java:283)   at
 GISExtension.GISRequest.createMapInfo(GISRequest.java:193)     at
 GISExtension.GISRequest.doPost(GISRequest.java:166)    at
 javax.servlet.http.HttpServlet.service(HttpServlet.java:637)   at
 javax.servlet.http.HttpServlet.service(HttpServlet.java:717)   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:233)
    at
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
    at
 org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
    at
 org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
    at
 org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
    at java.lang.Thread.run(Thread.java:662)

The Java code for above exception is:

String  library = System.getProperty("mapserver.library.name", "mapscript");
System.loadLibrary(library);

Can anyone help me solve above Exception?

GitaarLAB
  • 14,536
  • 11
  • 60
  • 80
j.singh
  • 21
  • 4
  • Have you double-checked that the file is really present at `C:\ms4w\Apache\cgi-bin\mapscript.dll`? – maba Jun 11 '13 at 09:17
  • @maba Yes its there thats why from the individual tomcat instance i mean outside eclipse its working but from inside eclipse not working :( i am not able to figure out the issue – j.singh Jun 11 '13 at 09:19
  • @j.singh can you post the result of `System.getProperty("java.library.path");` in both environments? – gma Jun 11 '13 at 10:01
  • Thanks everyone issue resolved by adding folder containing DLL in Environment variable – j.singh Jun 11 '13 at 12:50

0 Answers0