[mapserver-users] Re: mapserver-users Digest, Vol 8, Issue 81

Ishwari Sivagnanam ishwari.s at gmail.com
Wed Sep 24 22:19:53 EDT 2008


Ludovico,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 "geometry_columns" table and then doing a
Vacuum/analyze/reindex on the database, fixed my problem. If you haven't
done this already then maybe you can try this too. Just a suggestion.

Ishwari


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


More information about the mapserver-users mailing list