Select to view content in your preferred language

[RPC Fault faultString="Servlet execution threw an exception" faultCode="500"...

6360
18
03-15-2011 05:25 AM
AshleyOwens
Emerging Contributor
I added a 2nd combobox to my search widget. When the 1st combobox has a selection, the code should populate the 2nd combobox. I am getting the following error in function onFault:

[RPC Fault faultString="Servlet execution threw an exception" faultCode="500" faultDetail=""]

Attached is the xml and mxml. In the mxml, making a selection in the 1st combobox (???Search Layer???) calls function searchLayerChangedText(). That calls function querySearchFeatures(), which is the function where the error is being thrown.
Tags (2)
0 Kudos
18 Replies
RobertScheitlin__GISP
MVP Emeritus
Ashley,

   So do you get to line 511 this trace statement?
trace("@@@@ querySearchFeatures(): inside onResult.");
0 Kudos
AshleyOwens
Emerging Contributor
No, it does not make it to that line. Here are all the trace statements that get printed. Also, the last line "inside onFault" prints about 10 seconds after the other lines.

@@@@ querySearchFeatures(): selectedIndex=11, jqLayer=http://arcprod:8399/arcgis/rest/services/Land/MapServer/4, query.outFields=COUNTY
@@@@ querySearchFeatures(): query.outSpatialReference=SpatialReference[102100]
@@@@ querySearchFeatures(): after queryTask.execute.
@@@@ querySearchFeatures(): inside onFault; info=[RPC Fault faultString="Servlet execution threw an exception" faultCode="500" faultDetail=""], token=null
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Ashley,

   Have you tried to run the query from the REST Services directory?
Like pasting this in a browsers address bar?

http://arcprod:8399/arcgis/rest/services/Land/MapServer/4/query?text=&geometry=&geometryType=&inSR=&spatialRel=&relationParam=&objectIds=&where=1%3D1&time=&returnCountOnly=false&returnIdsOnly=false&returnGeometry=true&maxAllowableOffset=&outSR=102100&outFields=COUNTY&f=pjson
0 Kudos
AshleyOwens
Emerging Contributor
Here is the response I got from that URL:

{"error": {
"code": 500,
"message": "Map Service 'Land' does not exist or is inaccessible.",
"details": []
}}
0 Kudos
AshleyOwens
Emerging Contributor
When I change "Land" to "land" in the URL (to match our services directory), I get this response:

{"error": {
"code": 500,
"message": "Unable to perform query. Please check your parameters",
"details": []
}}
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Ashley,

   So the next question is does this layer have a field called COUNTY and remember that flex is case sensitive.
0 Kudos
AshleyOwens
Emerging Contributor
The layer does have a field called COUNTY, but the layer is notated as "Land" in the config XML file and not "land" like it is in the services directory. Do I need to change one or the other?
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Ashley,

  Definitely in the config.xml. So normally when people get the error unable to perform the query the issue is that they have hidden the shape and/or ObjectId fields in the mxd that the map service is coming from.
0 Kudos
AshleyOwens
Emerging Contributor
Can you explain why our production server would accept both "land" & "Land" in URL http://arcprod:8399/arcgis/rest/services/Land/MapServer/4/, but has only "Land" listed in services directory? I want to be careful to not break production if I make a change in development.

For my query, I only want to return the COUNTY field so I can populate a dropdown. Then the COUNTY value chosen by the user will be used to query our GMD layer, returning only GMDs in that COUNTY. That being said, would SHAPE or OBJECTID fields play a role in this functionality - would I need to verify those fields are "unhhidden"?
0 Kudos