[mapguide-users] UpdateFeatures and CLASS_NOTFOUND error

Andrew P LordBritish2 at gmail.com
Thu Apr 1 08:03:59 EDT 2010

Hi all,
I am attempting to modify a selected feature based on the user input.  The
code snippet below occurs after the user has provided the update to the
system.  I am getting the following error and can not figure out how to fix
it, 'An exception occurred in FDO component. SDFPROVIDER_75_CLASS_NOTFOUND
Exception occurred in method MgServerUpdateFeatures.UpdateFeatures at line
97 in file ServerUpdateFeatures.cpp'.  It appears to be related to either
the class name provided to the MgUpdateFeatures constructor or the feature
resource provided to UpdateFeatures function.  However, since these are
built using the class name and feature resource (respectively) from the
layer on which the selected feature is located I don't understand how it
could not find the class, whatever that is.  I am using SFD OSGeo provider
and MapGuide 2.0.
//////////Code Snippet - This is in PHP.//////////////////
setValues(&$values); //This gets the input from the user so it can be used.
$oldDeviceCode = $_POST["BASEDEVICECODE"];
$filter = "EVENT_DESC LIKE '" . $oldDeviceCode . "'";

$properties = new MgPropertyCollection();
//add here the property and value calls
$property = new MgStringProperty('EVENT_TYPE', $values["DeviceType"]);
$property = new MgStringProperty('EVENT_DESC', $values["DeviceCode"]);
$property = new MgStringProperty('COMMENTS', $values["SerialNumber"]);
$property = new MgStringProperty('LATITUDE', $values["LatCoor"]);
$property = new MgStringProperty('LONGITUDE', $values["LongCoor"]);
$property = new MgStringProperty('WATER_DPT', $values["Depth"]);
$property = new MgStringProperty('ISSUE_DATE', $values["ManDate"]);
$property = new MgStringProperty('MAINT', $values["ServiceDate"]);
$property = new MgStringProperty('RT_TTL_DST', $values["CumDist"]);
$property = new MgStringProperty('LINE_SEG', $values["Segment"]);
$property = new MgStringProperty('LINE_NAME', $values["SpanName"]);
$property = new MgStringProperty('CBL_TYPE', $values["CableType"]);
$property = new MgStringProperty('CBL_ID', $values["CableCode"]);
$mapName = $_POST['MAPNAME'];
$mgSessionId = $_POST['SESSION'];
$userInfo = new MgUserInformation($mgSessionId);
$siteConnection = new MgSiteConnection();
$resourceService =
$featureService =
$map = new MgMap();
$map->Open($resourceService, $mapName);
$layers = $map->GetLayers();
$layer = $layers->GetItem("Repeaters");
$className = $layer->GetName();
$resource = $layer->GetFeatureSourceId();
$featureSource = new MgResourceIdentifier($resource);

$commands = new MgFeatureCommandCollection();
$updateCommand = new MgUpdateFeatures($className, $properties, $filter);
$temp = new MgPropertyCollection();
$temp = $featureService->UpdateFeatures($featureSource, $commands, false);
echo $temp->GetItem(0)->GetValue();

View this message in context: http://n2.nabble.com/UpdateFeatures-and-CLASS-NOTFOUND-error-tp4836588p4836588.html
Sent from the MapGuide Users mailing list archive at Nabble.com.

More information about the mapguide-users mailing list