Tomcat help

Ryan Ollerenshaw ollerery at ENGR.ORST.EDU
Fri Aug 4 17:49:41 EDT 2006


Jean-Henry Berevoescu wrote:
> 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
>   
I do not think that is the case because i can compile from the command 
line just fine using:

javac -classpath ./mapscript.jar:/etc/tomcat5/common/lib/servlet-api.jar 
MapServerTest.java

it is just Tomcat cannot seem to find mapscript.jar for some reason.  i 
have the the permissions to 755 and i have the file located in:

/etc/java/j2sdk1.4.2_12/jre/lib/ext/mapscript.jar
/etc/java/j2sdk1.4.2_12/lib/mapscript.jar
/etc/tomcat5/bin/mapscript.jar
/etc/tomcat5/common/lib/mapscript.jar
/etc/tomcat5/shared/lib/mapscript.jar
/etc/tomcat5/shared/mapscript/mapscript.jar
/etc/tomcat5/webapps/my_test/WEB-INF/classes/mapscript.jar
/etc/tomcat5/webapps/my_test/WEB-INF/lib/mapscript.jar
/etc/tomcat5/webapps/my_test/WEB-INF/src/mapscript.jar
/usr/java/j2sdk1.4.2_12/lib/mapscript.jar
/usr/local/mapserver/htdocs/testJavaApp/build/WEB-INF/lib/mapscript.jar


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



More information about the mapserver-users mailing list