Random startup bug ...

François Van Der Biest francois.van-der-biest at onf.fr
Thu Aug 24 12:08:05 EDT 2006


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





More information about the Mapguide-users mailing list