Tomcat help

Jean-Henry Berevoescu bjh at GLOBEXPLORER.COM
Fri Aug 4 11:20:08 PDT 2006


Making sure libmapscript.so is in the path is good but not enough.
All the libraries it depends on (depending on what set of dependencies
you configured for before you compiled MapServer - stuff flike GD,
GDAL,  PROJ.4, PostgreSQL/PostGIS support, cURL etc) should
be accessible too. In the cases you present here the only dir you have
pointed to is your common lib of Tomcat's tree.

Jean


Ryan Ollerenshaw wrote:
> Umberto Nicoletti wrote:
>> There are a few docs scattered around that explain how to deal with
>> this issue:
>>
>> http://www.unicolet.org/mapserver/tomcat.html
>> http://mapserver.gis.umn.edu/docs/howto/javamapscript
>> http://mapserver.gis.umn.edu/docs/howto/java_mapscript_Tomcat_55
>>
>> HTH,
>>
>> Umberto
>>
> Still no luck, and i have tried everything:
>
> I copied libmapscript.so to /usr/local/lib and set //etc/ld.so.conf/
> //
> added
> export LD_LIBRARY_PATH=/etc/tomcat5/common/lib
> and
> export CLASSPATH=$CLASSPATH:/etc/tomcat/common/lib/mapscript.jar
> and
> JAVA_OPTS=" -Djava.library.path=/etc/tomcat5/common/lib/ "
> to catalina.sh
>
> Nothing seems to be working, when i print out my classpath through
> code using:
> Get the System Classloader
> ClassLoader sysClassLoader = ClassLoader.getSystemClassLoader();
> //Get the URLs
> URL[] urls = ((URLClassLoader)sysClassLoader).getURLs();
> for(int i=0; i< urls.length; i++)
> {
>    out.println(urls[i].getFile());
>    out.println("<br>");
> }
>
> I get:
>
> /usr/java/j2sdk1.4.2_12/lib/tools.jar
> /etc/tomcat5/bin/dist/commons-daemon.jar
> /etc/tomcat5/bin/bootstrap.jar
>
> why isnt mapserver.jar showing up?
>
> I am using the eclipse w/ the tomcat plug
>>
>>
>> On 8/4/06, Ryan Ollerenshaw <ollerery at engr.orst.edu> wrote:
>>> I am able to compile a java mapscript file from the command line using:
>>>
>>> javac -classpath ./mapscript.jar MapServerTest.java
>>>
>>> But when i try to turn my code into a servelt and run it over Tomcat i
>>> keep getting:
>>>
>>> java.lang.UnsatisfiedLinkError: no mapscript in java.library.path
>>>
>>> I have tried adding:
>>> export CLASSPATH=./mapscript.jar
>>> to my ./startup.sh file but that does not seem to help.  Am i missing a
>>> setting somewhere, why cant Tomcat find the .jar file?  I have it in
>>> the
>>> same directory as my .java file and also in /common/lib and /shared/lib
>>>
>>> Thank you for any help that you can provide
>>>
>
> !DSPAM:44d38e02240001453737823!
>
>


-- 
Please avoid sending me Word, Excel or PowerPoint attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html



More information about the MapServer-users mailing list