Mapscript/Java Tomcat

Umberto Nicoletti umberto.nicoletti at GMAIL.COM
Tue Jun 28 04:25:21 EDT 2005


I think at this point you should start over with a clean setup.

The steps I would do are:

0) clean up windows: remove old installs of mapserver and system32
libraries from this install. Start with a fresh system if you can
1) clean the environment from all possible references to
mapserver/gdal/etc libraries
2) create a c:\mapserver directory and copy all mapserver dlls in there
3) add a **system** (not user!!) PATH entry to c:\mapserver
4) if you can run the java mapscript tests (make test in mapscript/java)
4) install java and tomcat and make sure they work
5) install the webapp and dependent jars/classes in shared/lib and
shared/classes. Please note that as of recent versions of mapscript
the native library is loaded by mapscript.jar already, so there is no
need to provide a static method
6) edit catalina.bat and add -D java.library.path=c:\mapserver 
7) run tomcat

NOTE to item 3: env variables in windows have always been a mess as
system services could not pivk them up. If you suspect this is
happening try to start tomcat as your user (run startup.bat) and see
if it makes any difference.

Then cross fingers...

Ciao,
Umberto

On 6/28/05, Ajay Ranipeta <sc0rp10nau at yahoo.com.au> wrote:
> Hi Umberto,
> 
> I've already done that. It still doesn't fix the problem. I've even followed
> Daniel Caldeweyher's How-to on Tomcat 5.5
> (http://ms.gis.umn.edu/docs/howto/java_mapscript_Tomcat_55/view) and that
> hasn't helped much either.
> 
> Any idea's?
> 
> btw, I've even copied the nad directory to the system32 as well. I've used
> ListDLL's app from SysInternals, to check what dll's are being loaded, and
> they seem consistent with the desktop test app that i've done. So the only
> thing i can think of is the map file not being loaded properly or found. But
> i'm sure it should throw an IOException.
> 
> I've seriously am out of ideas, and seriously losing my hair over this.
> 
> Hope you guys can help.
> 
> Cheers,
> Ajay
> 
> 
> On Mon, 27 Jun 2005 14:31:19 +0200, Umberto Nicoletti
> <umberto.nicoletti at GMAIL.COM> wrote:
> 
> >Remove mapscript.jar from your app WEB-INF/lib and put it in
> >TOMCAT_HOME/common/lib.
> >If I recall correctly 4.4.2 should have the native library loading
> >code already in place in  mapscript.jar so you do not have to call
> >System.loadLibrary() for your servlet.
> >
> >Regards,
> >Umberto
> >
> >
> >On 6/27/05, Ajay Ranipeta <sc0rp10nau at yahoo.com.au> wrote:
> >> Hi Umberto,
> >>
> >> Thx for the quick response. I've set the directory in the PATH variable, as
> >> well as the CLASSPATH (thought this might help). I've pretty much run out of
> >> ideas and this list is my last resort.  As mentioned before, wierd thing is,
> >> it works fine as a standalone app, just not as a web-app under tomcat.
> >>
> >> Now, I've followed your suggestion, and copied all the dll files (from
> >> hobu's 4.4.2 zip file) to the system32 folder. Now this has been a bit of a
> >> progress. Checking the tomcat log files, it says it has loaded the dll
> >> successfully (got this from a System.out statement after the loadLibrary
> >> statement). Now the next step, creating a map object (mapObj map = new
> >> mapObj("path/to/map/file.map") ) throws the following error:
> >>
> >> === start error ===
> >> java.lang.UnsatisfiedLinkError: new_mapObj
> >>  edu.umn.gis.mapscript.mapscriptJNI.new_mapObj(Native Method)
> >>  edu.umn.gis.mapscript.mapObj.<init>(mapObj.java:332)
> >> ...
> >> ...
> >> === end error ===
> >>
> >> Any ideas?
> >>
> >> cheers,
> >> AJ
> >>
>



More information about the mapserver-users mailing list