Error E0011E: Invalid feature layer with ArcGIS API 3.0 (final) for Flex

4136
18
12-07-2012 05:17 AM
SarahBurgin
New Contributor
I'm experiencing this runtime problem (Error E0011E: Invalid feature layer) at startup for every FeatureLayer after switching the agslib-3.0pre-2012-03-15.swc for agslib-3.0-2012-06-06.swc (the swc change is the only difference; everything else remains the same).

Can anyone suggest any obvious causes or resolutions to this issue please?
Tags (2)
0 Kudos
18 Replies
BjornSvensson
Esri Regular Contributor
... what Error E0011E actually means...

As the error message mentions, the API throws Error E0011E when we think it is an "Invalid feature layer", meaning that the layer will not work as a feature layer.

Are you sure it is happening for ALL feature layers, not just some?

Is the feature layer maybe a "Raster Layer"?

The feature layer never worked with this type, and starting with 3.0 the API returns the error for this and a few other cases of invalid feature layers.

If not a "Raster Layer", is the layer coming from a Map Service, Feature Service, Image Server, ... or are you populating the featurelayer yourself?  If the latter, does the layer have any "fields"?
SarahBurgin
New Contributor
Thanks bjorn, your suggestions proved helpful as it turned out to be an issue with the "fields" not being setup correctly for our feature layers.

I've noticed that ArcGIS API 3.0 final (and the newer 3.1) are sending a 'where' clause back to the server in the REST requests, which is now causing us a few issues, so we'd like to prevent that from happening. Does anyone know of a way to disable this new behaviour please?
0 Kudos
DasaPaddock
Esri Regular Contributor
What is in the where clause?

The FeatureLayer will send where=1=1 if it's in snapshot mode.
0 Kudos
SarahBurgin
New Contributor
It's like "where=ObjectId NOT IN (...)"; no worries though as I think we've actually just resolved this issue now!  🙂
0 Kudos
SarahBurgin
New Contributor
In fact, there were still a couple of problems for us, however we've discovered the 'where' functionality can be disabled with the following Feature Layer attribute, so hopefully it won't cause any further trouble now:

onDemandCacheSize="0"
0 Kudos
PTurner
New Contributor
The E0011E shows up in using Version 3.4 Flex Viewer with 9.3 "ArcExplorer Java Edition" project manager that was inside the "AppBuilder-3.4.air" file installed . . . all from a batch of fresh recent downloads (there being no forewarning that the numbering is, well, curious) . . .

Where and how is one to (re)set "tag-speak" as
    onDemandCacheSize="0"
insofar as ESRI at
http://help.arcgis.com/en/webapi/flex/apiref/com/esri/ags/layers/FeatureLayer.html#onDemandCacheSize
shows different syntax, namely "query-speak" as
    public function get onDemandCacheSize():uint
    public function set onDemandCacheSize(value:uint):void
in order to overcome "E0011E" relative to the default "1000"?

Posts on this problem are about 7 to 24 or more months old.  The problem has not entirely come and gone away.  It's still alive and still ill.
0 Kudos
SarahBurgin
New Contributor
The issue that I experienced was rooted in the server being unable to respond to requests with a complex WHERE clause but this was for unrelated reasons, so my workaround of disabling the WHERE functionality is probably not a general solution, I'm afraid.

There are presumably other possible causes for the E0011E issue, so one of those may be applicable.

That said, if you wish to disable the cache by changing its size, the syntax I quoted was just an MXML fragment from a layer declaration. If your language API has an onDemandCacheSize() function for the layer then you could presumably try calling onDemandCacheSize(0) instead.
0 Kudos
DasaPaddock
Esri Regular Contributor
The E0011E error is thrown if the layer's metadata has no fields or an empty fields array. Can you double check your layer's metadata? e.g.,
http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Earthquakes/EarthquakesFromLastSevenDays/...
0 Kudos
PTurner
New Contributor
Thank you both!  That gives me two avenues to follow to three specific places to look.

Cache reset (why 0 works is odd, there are reasons for default 1000):
(1)(a) an MXML fragment from a layer declaration
(1)(b) language API onDemandCacheSize() function for the layer

Layer fields (linked earthquake set shows pattern):
(2)(c) layer's metadata has no fields or an empty fields array

Since the error sprang during every attempt to pull down each of three files after viewing them, and they were "hollow" to look at, the first places to look will be what drives files he made on the server, and inside whatever non-default custom project files he had uploaded in the first place.  (With an update after I look, in computerese, "I'll be bak.")
0 Kudos