[mapserver-users] Mapscript/Java/Servlet users: give this a whirl...

C F gis_consultant at hotmail.com
Thu Jun 27 09:50:45 EDT 2002


Thanks for your reply Herald.  I wasn't aware of some of those links your 
provided.  I kind of figured it was a threading issue but I really don't 
know much about how the threads interact once you add the Java layer on top 
of everyhting.
Well here's my latest... I tested this with Tomcat 4, Tomcat 3, Jetty, and 
WebSphere... I was desparate :)  I was hoping that maybe one of them would 
be able to catch the error and display an error messages instead of 
crashing.  No Luck.  They all did the same thing.  I guess it's just too low 
level (in the JVM) to recover from it.
One other thing I did was put all my Mapscript stuff into an EJB and 
deployed it in JBoss... and hit it from a JSP in Tomcat.  This helped with 
my initial problem... I am now able to hit refresh as fast as I want!  
HOWEVER, now if I hit it from different browsers at the same time.... it 
crashes JBoss (not Tomcat).
I then recompiled Mapserver/Mapscript with the "--with-threads" option and 
tried it again.  Now I can't even get it to work AT ALL... "Exception 
occurred:edu/umn/gis/mapscript/mapObj"

Unless I can play around with thread management in JBoss, I'm about ready to 
give up too.  What other options are there?  I gave up on PHP Mapscript 
because of some of the limitations there... now I've spent a week on Java.  
What else is there?  Maybe I should writing the group and asking about Perl 
issues/limitations before trying that...


>From: "Harald Wehr" <hwehr at hs-harz.de>
>To: mapserver-users at lists.gis.umn.edu
>Subject: Re: [mapserver-users] Mapscript/Java/Servlet users:  give this a 
>whirl...
>Date: Thu, 27 Jun 2002 07:58:43 +0200
>
>Hi CF,
>
>I faced the same problems some times ago and never found a solution to
>this problem.
>
>See these mails i wrote to this list.
>
>http://mapserver.gis.umn.edu/wilma/mapserver-users/0203/msg00298.html
>http://mapserver.gis.umn.edu/wilma/mapserver-users/0204/msg00137.html
>http://mapserver.gis.umn.edu/wilma/mapserver-users/0203/msg00373.html
>
>>I've been having this very unusual problem running servlets and
>>mapscript.  As far as I can tell, it's working great except under one
>>condition.  If a user submits a request to the servlet, then hits the
>>browser's refresh button before the his/her previous one is finished, it
>>*crashes* my servlet engine.  This only happens if I'm executing
>>imageObj.draw() somewhere in it *and* trying to print a response back to
>>the client.  If I don't do anything with my HTTPServletResponse object,
>>I can hit refresh as many times as I want as fast as I want with no
>>problems.  Anyway, without getting too deep into the issue, etc. I would
>>be grateful if someone else could try doing this.
>
>It is really curios to find the responsible fault. Sometimes it worked
>several times, some times the sevlet container crashes.
>
>>
>>Submit a request to your servlet that draws a map and saves out to an
>>image (one that takes at few seconds or more).
>>Then hold your <CTRL> key down (to make sure it refreshes) and hit your
>>refresh button a few times fast while your first request is still pending.
>>Sometimes it'll keep showing you the cached page after the servlet
>>engine has crashed.  So after that, try moving to another page being
>>served by your servlet engine, or change your url params or just somehow
>>check to make sure it actually *is* running.
>
>It seems to be a threading issue. Look at one of the above postings.
>
>>
>>I'd like to hear your results.
>>
>>Here's my environment.....
>>Linux 7.3
>>Tomcat 4 (standalone)
>>JDK 1.4 (J2SDK)
>>--------------
>>MapServer version 3.6.0 OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP SUPPORTS=PROJ
>>SUPPORTS=TTF SUPPORTS=WMS_SERVER INPUT=TIFF INPUT=EPPL7 INPUT=JPEG
>>INPUT=POSTGIS INPUT=SHAPEFILE
>>---------------
>>My data is all in PostGIS
>
>I have nearly the same environment.
>
>Harald
>
>
>


_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com




More information about the mapserver-users mailing list