<div dir="ltr">Ludovico,<div class="gmail_quote"><div>I had a java mapscript connection timeout problem too. Making sure that every table with feature information in PostGIS had a corresponding record in the &quot;geometry_columns&quot; table and then doing a Vacuum/analyze/reindex on the database, fixed my problem. If you haven&#39;t done this already then maybe you can try this too. Just a suggestion.<br>
<br>Ishwari<br>&nbsp;</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
------------------------------<br>
<br>
Message: 7<br>
Date: Wed, 24 Sep 2008 08:56:03 +0200<br>
From: &quot;Umberto Nicoletti&quot; &lt;<a href="mailto:umberto.nicoletti@gmail.com">umberto.nicoletti@gmail.com</a>&gt;<br>
Subject: Re: [mapserver-users] java mapscript + postgis = jvm crashed<br>
To: &quot;Ludovico Bianchini&quot; &lt;<a href="mailto:metlud@yahoo.it">metlud@yahoo.it</a>&gt;<br>
Cc: <a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>
Message-ID:<br>
 &nbsp; &nbsp; &nbsp; &nbsp;&lt;<a href="mailto:75b4b93e0809232356s67f55821o1bc08b9b16e24fca@mail.gmail.com">75b4b93e0809232356s67f55821o1bc08b9b16e24fca@mail.gmail.com</a>&gt;<br>
Content-Type: text/plain; charset=ISO-8859-1<br>
<br>
On Tue, Sep 23, 2008 at 10:50 PM, Ludovico Bianchini &lt;<a href="mailto:metlud@yahoo.it">metlud@yahoo.it</a>&gt; wrote:<br>
&gt; Umberto Nicoletti ha scritto:<br>
&gt;&gt;<br>
&gt;&gt; I am using postgis layers (on Linux, though) and it works fine.<br>
&gt;&gt;<br>
&gt;&gt; Do you share the same mapObj between threads (in application scope) or<br>
&gt;&gt; multiple requests (in session scope)?<br>
&gt;&gt; mapscript is safe only when a new mapObj is created for each request.<br>
&gt;&gt; What other kind of layers do you have in your map?<br>
&gt;&gt;<br>
&gt;&gt; Umberto<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; On Mon, Sep 22, 2008 at 10:34 PM, Ludovico Bianchini &lt;<a href="mailto:metlud@yahoo.it">metlud@yahoo.it</a>&gt;<br>
&gt;&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; - Windows Vista Home Premium<br>
&gt;&gt;&gt; - Postgres 8.1<br>
&gt;&gt;&gt; - jvm 1.6.0<br>
&gt;&gt;&gt; - jboss 4.0.3SP1, tomcat 5.5<br>
&gt;&gt;&gt; - struts2<br>
&gt;&gt;&gt; - ms4w 2.2.3 (mapscript.jar, mapscript.dll, all other dlls taken from<br>
&gt;&gt;&gt; this pack)<br>
&gt;&gt;&gt; - postgresql-8.2-505.jdbc4.jar<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; mapscript.jar is placed in<br>
&gt;&gt;&gt; C:\jboss-4.0.3SP1\server\default\deploy\jbossweb-tomcat55.sar<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; When a layer with a postgis connection is turned on, the draw method<br>
&gt;&gt;&gt; crashes the jvm.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Error file attached.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Is there any solution to this problem?<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Postgis is listed in &quot;unsafe components&quot;, i have not understood if there<br>
&gt;&gt;&gt; is one way to make it work using thread syncronization.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Thanks in advance for any help.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Ludovico<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; __________________________________________________<br>
&gt;&gt;&gt; Do You Yahoo!?<br>
&gt;&gt;&gt; Poco spazio e tanto spam? Yahoo! Mail ti protegge dallo spam e ti da<br>
&gt;&gt;&gt; tanto spazio gratuito per i tuoi file e i messaggi<br>
&gt;&gt;&gt; <a href="http://mail.yahoo.it" target="_blank">http://mail.yahoo.it</a><br>
&gt;&gt;&gt; _______________________________________________<br>
&gt;&gt;&gt; mapserver-users mailing list<br>
&gt;&gt;&gt; <a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>
&gt;&gt;&gt; <a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;<br>
&gt; I think I do not share the same object between request.<br>
&gt;<br>
&gt; The other layer are shape file layer, they work fine (zoom ok, pan ok).<br>
&gt;<br>
&gt; &lt;struts&gt;&lt;!-- Configuration for the default package. --&gt;<br>
&gt; &nbsp; &lt;package name=&quot;default&quot; extends=&quot;struts-default&quot;&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp;.<br>
&gt; &nbsp; &nbsp;.<br>
&gt; &nbsp; &nbsp;.<br>
&gt; &nbsp; &nbsp; &nbsp; &lt;action name=&quot;Mappa*&quot; class=&quot;segnaletica.action.MappaAction&quot;<br>
&gt; method=&quot;{1}&quot;&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;result&gt;/jsp/mappa.jsp&lt;/result&gt;<br>
&gt; &nbsp; &nbsp;.<br>
&gt; &nbsp; &nbsp;.<br>
&gt; &nbsp; &nbsp;.<br>
&gt; &nbsp; &nbsp; &nbsp; &lt;/action&gt;<br>
&gt; &nbsp; &lt;/package&gt;<br>
&gt; &lt;/struts&gt;<br>
&gt;<br>
&gt; public class MappaAction extends ActionSupport implements<br>
&gt; ServletRequestAware{<br>
<br>
Are you sharing any mapscript object as an Action attribute? If yes<br>
that&#39;s probably the culprit, otherwis it seems pretty strange...<br>
Does the crash occur only when more than user is accessing the map or<br>
even when there is only one user?<br>
<br>
Also ms4w 2.2.3 seems prett old, why don&#39;t you upgrade to the latest?<br>
<br>
Umberto<br>
<br>
&gt; &nbsp; .<br>
&gt; &nbsp; .//attributes<br>
&gt; &nbsp; .<br>
&gt; &nbsp; .<br>
&gt; public String execute() throws Exception {<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mapObj mapObj_o = new<br>
&gt; mapObj(&quot;C:\\jboss-4.0.3sp1_map\\map\\treviso.map&quot;);//create a new mapObj<br>
&gt; object<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(OP == null) OP = &quot;-1&quot;;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int op = Integer.parseInt(OP);<br>
&gt; &nbsp; &nbsp; &nbsp; switch (op) {<br>
&gt; &nbsp; &nbsp; &nbsp; case Z_IN: zoomIn(mapObj_o);<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break;<br>
&gt; &nbsp; &nbsp; &nbsp; case Z_OUT: zoomOut(mapObj_o);<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break;<br>
&gt; &nbsp; &nbsp; &nbsp; case PAN: pan(mapObj_o);<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break;<br>
&gt; &nbsp; &nbsp; &nbsp; case REFRESH: refresh(mapObj_o);<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break;<br>
&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; default: fullExtent(mapObj_o);<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break;<br>
&gt; &nbsp; &nbsp; &nbsp; }<br>
&gt; &nbsp; &nbsp; &nbsp; return SUCCESS;<br>
&gt; &nbsp; }<br>
&gt; &nbsp; .<br>
&gt; &nbsp; .//utility methods, map navigation methods<br>
&gt; &nbsp; .<br>
&gt;<br>
&gt; private void draw(mapObj mapObj_o){<br>
&gt; &nbsp; &nbsp; &nbsp; .<br>
&gt; &nbsp; &nbsp; &nbsp; .<br>
&gt; &nbsp; &nbsp; &nbsp; mapImageObj = mapObj_o.draw();//this instruction crashes the JVM<br>
&gt; &nbsp; &nbsp; &nbsp; .<br>
&gt; &nbsp; &nbsp; &nbsp; .<br>
&gt; &nbsp; }<br>
&gt;<br>
&gt; }<br>
&gt;<br>
&gt; ########################################################<br>
&gt; #### &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;LAYER SEGNALETICA<br>
&gt; ####<br>
&gt; ########################################################<br>
&gt;<br>
&gt; &nbsp; LAYER<br>
&gt; &nbsp; &nbsp; &nbsp; NAME &quot;segnaletica&quot;<br>
&gt; &nbsp; &nbsp; &nbsp; STATUS OFF<br>
&gt; &nbsp; &nbsp; &nbsp; TYPE POINT<br>
&gt; &nbsp; &nbsp; &nbsp; TRANSFORM false<br>
&gt; &nbsp; &nbsp; &nbsp; POSTLABELCACHE true<br>
&gt; &nbsp; &nbsp; &nbsp; CONNECTION &quot;user=user password=password dbname=dbname host=localhost<br>
&gt; port=5432&quot;<br>
&gt; &nbsp; &nbsp; &nbsp; CONNECTIONTYPE postgis<br>
&gt; &nbsp; &nbsp; &nbsp; DATA &quot;posizionegeoref from rilievi.impianti&quot; &nbsp; &nbsp; &nbsp; CLASS<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; STYLE<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; COLOR 255 99 0<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SYMBOL &quot;circle&quot;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SIZE 12<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; END<br>
&gt; &nbsp; &nbsp; &nbsp; END<br>
&gt; &nbsp; &nbsp; &nbsp; PROJECTION<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;init=epsg:4326&quot;<br>
&gt; &nbsp; &nbsp; &nbsp; END<br>
&gt; &nbsp; END<br>
&gt;<br>
&gt; Ludovico<br>
&gt; Chiacchiera con i tuoi amici in tempo reale!<br>
&gt; <a href="http://it.yahoo.com/mail_it/foot/*http://it.messenger.yahoo.com" target="_blank">http://it.yahoo.com/mail_it/foot/*http://it.messenger.yahoo.com</a><br>
&gt;<br>
<br>
<br>
------------------------------<br>
<br>
_______________________________________________<br>
mapserver-users mailing list<br>
<a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>
<br>
<br>
End of mapserver-users Digest, Vol 8, Issue 81<br>
**********************************************<br>
</blockquote></div><br></div>