Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've created a feature editor, of a puntual feature layer, in a flex 3.1 client. The feature layer is served by a feature service in ArcGIS Server 10.0. When I try to update or delete features (I didn't try creation), I get errors eventhough the changes are made in the database. The errors are like these :

TypeError: Error #1009: Il est impossible d'accéder à la propriété ou à la méthode d'une référence d'objet nul.
    at com.esri.ags.components::Editor/saveUnsavedAttributes()[C:\checkout\flex_api3\api\src\com\esri\ags\components\Editor.as:5189]
    at com.esri.ags.components::Editor/attributeInspector_saveFeatureHandler()[C:\checkout\flex_api3\api\src\com\esri\ags\components\Editor.as:2674]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at mx.core::UIComponent/dispatchEvent()[E:\dev\4.y\frameworks\projects\framework\src\mx\core\UIComponent.as:13152]
    at com.esri.ags.components::AttributeInspector/dispatchSaveFeatureEvent()[C:\checkout\flex_api3\api\src\com\esri\ags\components\AttributeInspector.as:1030]
    at Function/http://adobe.com/AS3/2006/builtin::apply()
    at mx.core::UIComponent/callLaterDispatcher2()[E:\dev\4.y\frameworks\projects\framework\src\mx\core\UIComponent.as:12232]
    at mx.core::UIComponent/callLaterDispatcher()[E:\dev\4.y\frameworks\projects\framework\src\mx\core\UIComponent.as:12170]


TypeError: Error #1009: Il est impossible d'accéder à la propriété ou à la méthode d'une référence d'objet nul.
    at com.esri.ags.components::Editor/featureLayer_editsCompleteHandler()[C:\checkout\flex_api3\api\src\com\esri\ags\components\Editor.as:1491]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at mx.core::UIComponent/dispatchEvent()[E:\dev\4.y\frameworks\projects\framework\src\mx\core\UIComponent.as:13152]
    at com.esri.ags.layers::FeatureLayer/http://www.esri.com/2008/ags/internal::editHandler()[C:\checkout\flex_api3\api\src\com\esri\ags\layers\FeatureLayer.as:2638]
    at mx.rpc::AsyncResponder/result()[E:\dev\4.y\frameworks\projects\rpc\src\mx\rpc\AsyncResponder.as:95]
    at com.esri.ags.tasks::FeatureLayerTask/handleApplyEdits()[C:\checkout\flex_api3\api\src\com\esri\ags\tasks\FeatureLayerTask.as:311]
    at Function/http://adobe.com/AS3/2006/builtin::call()
    at com.esri.ags.tasks::BaseTask/handleResultEvent()[C:\checkout\flex_api3\api\src\com\esri\ags\tasks\BaseTask.as:729]
    at mx.rpc::AsyncResponder/result()[E:\dev\4.y\frameworks\projects\rpc\src\mx\rpc\AsyncResponder.as:95]
    at mx.rpc::AsyncToken/http://www.adobe.com/2006/flex/mx/internal::applyResult()[E:\dev\4.y\frameworks\projects\rpc\src\mx\rpc\AsyncToken.as:239]
    at mx.rpc.events::ResultEvent/http://www.adobe.com/2006/flex/mx/internal::callTokenResponders()[E:\dev\4.y\frameworks\projects\rpc\src\mx\rpc\events\ResultEvent.as:207]
    at HTTPOperation/http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent()[E:\dev\4.y\frameworks\projects\rpc\src\mx\rpc\http\HTTPService.as:991]
    at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::resultHandler()[E:\dev\4.y\frameworks\projects\rpc\src\mx\rpc\AbstractInvoker.as:318]
    at mx.rpc::Responder/result()[E:\dev\4.y\frameworks\projects\rpc\src\mx\rpc\Responder.as:56]
    at mx.rpc::AsyncRequest/acknowledge()[E:\dev\4.y\frameworks\projects\rpc\src\mx\rpc\AsyncRequest.as:84]
    at DirectHTTPMessageResponder/completeHandler()[E:\dev\4.y\frameworks\projects\rpc\src\mx\messaging\channels\DirectHTTPChannel.as:451]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at flash.net::URLLoader/onComplete()[/CODE]

In the code I have declared the editor inside the along with a geometry service:

<esri:Editor id="mainEditor" map="{mainMap}" geometryService="{geometryService}" />

And I assigned the following method to 'initialize' attribute of the application:

 protected function application_initializeHandler(event:FlexEvent):void
            {
                mainEditor.featureLayers = [arrets];

            }

where "arrets" is the name of the feature layer I want to edit.

Do you have any idea of why the errors appear?

Regards.

share|improve this question
up vote 2 down vote accepted

The solution: the feature layer I was trying to edit participates in a non-versioned network dataset => not editable. In order to edit layers participating in network datasets, the dataset must be versioned.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.