Error: Unable to Make Permanent Changes to Map

Stephen Park stephen.park at westerncorrosion.com
Fri Oct 20 14:16:32 EDT 2006


I am unable to save a map permanently to the repository when the map has
been opened via the MgMap.Create(.) API. I have seen 2 or 3 back-posts about
this issue but no resolution. Could use some insite. 

Win2k3 Server
MGOS 1.0.1
MapGuideDotNetApi

Repro: 
Open an  existing map via MgMap.Create(.) API 
	//Resource Id is of form Library://./MyMap.MapDefinition
Add layer created previously via Studio 2K7 R1 to the map 
	MgMap.GetLayers().Add(newLayer);
Save the Map back to the repository: 
	MgMap.Save(_resourceService, resourceId); 
		**Exception Here**

If I use the .Save method that accepts a single argument (resource service)
I get a null reference exception. Adding the same layer to the same map via
MapGuide Studio works correctly. Any hints?

Exception Information: 

OSGeo.MapGuide.MgXmlParserException: An exception occurred in the XML
parser.
- MgResourceServiceHandler.ProcessOperation line 80 file
c:\build_tux_area\mgdev_opensource\server\src\services\resource\ResourceServ
iceHandler.cpp
- MgOpSetResource.Execute line 109 file
c:\build_tux_area\mgdev_opensource\server\src\services\resource\OpSetResourc
e.cpp
- MgServerResourceService.SetResource line 712 file
c:\build_tux_area\mgdev_opensource\server\src\services\resource\ServerResour
ceService.cpp
- MgRepositoryManager.SetResource line 867 file
c:\build_tux_area\mgdev_opensource\server\src\services\resource\RepositoryMa
nager.cpp
- MgRepositoryManager.UpdateResource line 1004 file
c:\build_tux_area\mgdev_opensource\server\src\services\resource\RepositoryMa
nager.cpp
- MgResourceDefinitionManager.UpdateResource line 261 file
c:\build_tux_area\mgdev_opensource\server\src\services\resource\ResourceDefi
nitionManager.cpp
- MgResourceContentManager.UpdateDocument line 647 file
c:\build_tux_area\mgdev_opensource\server\src\services\resource\ResourceCont
entManager.cpp
- MgResourceDefinitionManager.UpdateDocument line 601 file
c:\build_tux_area\mgdev_opensource\server\src\services\resource\ResourceDefi
nitionManager.cpp
- MgResourceDefinitionManager.ValidateDocument line 429 file
c:\build_tux_area\mgdev_opensource\server\src\services\resource\ResourceDefi
nitionManager.cpp
- MgResourceContentManager.ValidateDocument line 536 file
c:\build_tux_area\mgdev_opensource\server\src\services\resource\ResourceCont
entManager.cpp





More information about the Mapguide_users mailing list