[mapguide-users] RE: Random startup bug ...

François Van Der Biest francois.van-der-biest at onf.fr
Fri Aug 25 04:04:34 EDT 2006


Hi all, and thanks for your answer Trevor,

I found the solution to my problem this morning : After  reading 
features in the featureReader object, I was closing it, using 
$featureReader->Close(), which kind of destroys the session.
Weird, isnt it ?

So I just commented the "closing line", and everything works fine now.

F.


Trevor Wekel a écrit :
> Hi Francois,
>
> The MapGuide Server will automatically remove sessions that have been inactive for 20 minutes.  The Web Extensions scripts may be trying to use an expired session.  Each  Service created by an MgSiteConnection inherits the MgUserInformation specified in MgSiteConnection.Open.  For your example, MgMap.Open will use the value of $mgSessionId when it pulls information from the session repository.  This session no longer exists so the resources have been removed which leads to the exception you are seeing.
>
> The session timeout is a configurable property of the Site Service.  This parameter can be changed by using the Site Administrator.
>
> Thanks,
>
> Trevor    
>
> -----Original Message-----
> From: François Van Der Biest [mailto:francois.van-der-biest at onf.fr] 
> Sent: Thursday, August 24, 2006 10:08 AM
> To: users at mapguide.osgeo.org
> Subject: Random startup bug ...
>
> Hi,
>
> I'm facing an annoying bug in my application (based on the ajaxviewersample code).
> At startup, Mapguide is being asked to display some features highlighted. To do so, I made a script that gets executed  when the taskframe loads.
>
> First, I initialize everything ...
> %--------------------------------------------------------
>     MgInitializeWebTier("$extensionsDir\webconfig.ini");
>  
>     $userInfo = new MgUserInformation($mgSessionId);
>     $siteConnection = new MgSiteConnection();
>     $siteConnection->Open($userInfo);
>  
>     $resourceService =
> $siteConnection->CreateService(MgServiceType::ResourceService);
>     $featureService =
> $siteConnection->CreateService(MgServiceType::FeatureService);
>  
>     $map = new MgMap();
> %--------------------------------------------------------
>
> Then, when opening the resource service with this command : 
> $map->Open($resourceService, $mapName);      /// ... where 
> $mapName="carte1";
> ... I sometimes get this message :
>
> La ressource est introuvable: 
> Session:8cdada4e-ffff-ffff-8000-0011433afdcd_en//carte1.MapLa
> La ressource est introuvable: 
> Session:8cdada4e-ffff-ffff-8000-0011433afdcd_en//carte1.Map
> Une exception s'est produite dans la méthode MgResourceDefinitionManager.GetDocument à la ligne 476 dans le fichier c:\build_tux_area\mgdev\server\src\services\resource\ResourceDefinitionManager.cpp
> (translated : "can't find the resource : Session:8cdada4....."  )
>
> In fact, this seems to occur only when a new session needs to be created (i.e. after a time long enough for the previous one to die).
>
> Does anyone have an idea of what's going wrong here ? Do I miss something ?
>
> Thanks for any help,
>
> F. Van Der Biest
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe at mapguide.osgeo.org
> For additional commands, e-mail: users-help at mapguide.osgeo.org
>
>
>   





More information about the Mapguide_users mailing list