Tomcat help

Ryan Ollerenshaw ollerery at ENGR.ORST.EDU
Fri Aug 4 13:07:41 EDT 2006


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
>>



More information about the mapserver-users mailing list