[mapguide-users] local connection
mika at digikartta.net
mika at digikartta.net
Mon Dec 9 04:51:00 PST 2013
Ok,
I got this sorted out. It was my own programming error, though I can't
understand how this can make the whole system to break. This was called
way before the exception point:
public void ClearDataSource(IServerConnection conn, String
dataSourceId, String featureName, string idField, List<int> laiteidt)
{
foreach (int laiteid in laiteidt)
{
IDeleteFeatures deleteCmd =
(IDeleteFeatures)conn.CreateCommand((int)OSGeo.MapGuide.MaestroAPI.Commands.CommandType.DeleteFeatures);
deleteCmd.FeatureSourceId = dataSourceId;
deleteCmd.ClassName = featureName;
deleteCmd.Filter = "ID >= 0";
int nDeleted = deleteCmd.Execute();
}
It should have not been "ID >= 0" but 'idField + "=" + laiteid'
(remainings from old stuff..). This was called at line 1918 and
SetResourceXmlData() much later in a whole different method at line
2100+..
Actually I can't figure out how the unsuccesful 'Delete' with wrong
attribute name can prevent from saving layer definiton..?
Should have been put into try/catch I guess..
- mika -
mika at digikartta.net kirjoitti 2013-12-09 11:57:
> Hi,
> I just can't get over of these problems.
>
> Maestro 5 + local native connection + AIMS 2014
>
> First I had problems with ResourceExists and now with
> SetResourceXmlData (resource service). My application crashes with
> either error:
>
> <2013-12-09T11:40:10> 4136 Administrator
> Error: Failed to retrieve message for "MgFeatureServiceException".
> An exception occurred in FDO component.
> The identifier 'ID' was not recognized. (Cause: , Root
> Cause: The identifier 'ID' was not recognized. )
> StackTrace:
> - MgFeatureServiceHandler.ProcessOperation line 83 file
>
> f:\build\ims2014_knight\build_76.1\ent\os\server\src\services\feature\FeatureServiceHandler.cpp
> - MgOpUpdateFeatures.Execute line 143 file
>
> f:\build\ims2014_knight\build_76.1\ent\os\server\src\services\feature\OpUpdateFeatures.cpp
>
> or
>
> Invalid stream header exception.
>
> It seems that the MgResourceIdentifier doesn't get constructed right
> or something. I somehow got my VS2010 to stop here (not anymore)
>
> public override bool ResourceExists(string resourceid)
> {
> //API is safe to call in MG 2.1 and newer
> var version = this.SiteVersion;
> if (version >= new Version(2, 1))
> {
> MgResourceService res =
> this.Connection.CreateService(MgServiceType.ResourceService) as
> MgResourceService;
> **** var result = res.ResourceExists(new
> MgResourceIdentifier(resourceid)); ****
> LogMethodCall("MgResourceService::ResourceExists",
> true, resourceid);
> return result;
> }
> else
> {
> return base.ResourceExists(resourceid);
> }
> }
>
> Line 900+ at LocalNativeConnection.cs
>
>
> Any hints how to get forward? I'm out of medicine..
> Maybe I shold try that with MGE2011 (have it installed in our
> network)
>
>
> - mika -
>
>
>
>
>
> mika at digikartta.net kirjoitti 2013-12-03 16:38:
>> It's possible. The project used to be MGE2011 project. There may be
>> some MGE dlls in the projects bin folder, have to check if so. I
>> have
>> also a path to AIMS mapviewernet/bin denined into the environmental
>> variables.
>>
>> - mika -
>>
>>
>> Jackie Ng kirjoitti 2013-12-03 16:06:
>>> You haven't mixed up your MG dlls with AIMS ones?
>>>
>>> - Jackie
>>>
>>>
>>>
>>> --
>>> View this message in context:
>>>
>>> http://osgeo-org.1560.x6.nabble.com/local-connection-tp5091886p5092403.html
>>> Sent from the MapGuide Users mailing list archive at Nabble.com.
>>> _______________________________________________
>>> mapguide-users mailing list
>>> mapguide-users at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>> _______________________________________________
>> mapguide-users mailing list
>> mapguide-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapguide-users
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
More information about the mapguide-users
mailing list