Select to view content in your preferred language

e-search widget ERROR cannot access prop of null object

1020
4
05-30-2012 10:32 PM
AHay
by
Deactivated User
Hi
i am having a very strange error with the E-Search widget 2.5.1.6 with viewer 2.5

i have developed an application on our Development server (DEVEL) all works fine, and is showing data served from our Production server (PROD) as the last check before sending application to PROD.
This all works fine until i try and do a Spatial search with E-Search with the esearch config pointing to PROD (same as data in map) then i get a Error #1009 cannot access property or method of a null object.(attached screen shot EsearcError.png)

if i leave the Eseacrh pointing to DEVEL and try a spatial search, even thought the map is showing data served from PROD the Esearch widget does not throw an error and successfully returns the data from DEVEL even though none of the data returned is loaded in map?? ( see attached E-searchSuccess.png)

The attached Esearch Error.png shows the location of the lines in SearchWidget.mxml that throw error as lines;

  1353  -  queryFeaturesGraphical(geom, "esriSpatialRelIntersects", configSearchGraphical[cboLayerGraphical.selectedIndex]);
  1640 -     var oidFld:String = queryLayer.layerDetails.objectIdField;
  3791 - <s:Button id="graFeatureQueryBtn" click="queryFeaturesGra()" label="{submitLabel}"/> 

How is it possible that this works when pointed to one set of data but not the other ( and yes if i point the map to show DEVEL data and the esearch to query DEVEL it works lovely)
0 Kudos
4 Replies
by Anonymous User
Not applicable
Original User: ad_giles@hotmail.com

Hay,

Make sure you have not hidden your object id and shape fields for the layer in your .mxd

Regards

Anthony
0 Kudos
AHay
by
Deactivated User
Thanks anthony,  it does seem as if that is what is happening (thats why it cant find it ) but the two databases (DEVEL and PROD) are copies of each other so if eSearch widget works on one should work on both
I have now found that is happens with the normal search widget and also with any layer i put into it from the PROD server
0 Kudos
by Anonymous User
Not applicable
Original User: GISProgrammer9

So the same exact .msd has been published to both ArcGIS Server instances, namely the Development server and also the Production server, is this correct? Is relative paths turned on? How are the paths defined (ie. drive letters, UNC path, server alias path?) Make sure the path format of the layers match the path format in the map document properties. Also, do both ArcGIS Servers have the same Service Packs loaded? Is the data in a file .gdb or what format?
0 Kudos
AHay
by
Deactivated User
Hi
i figured out cause of problem now i need to find solution.
Problem is secured services, the app uses secured services and the Esearch widget wont work with the, ( i moved th services to non-secured folder and presto it worked )

Thanks GISProgrammer9 that is exactly the kind of questions that needed to be asked to resolve the issue ( if it wasn't secure services issues )

does anyone have any ideas on how to make this widget work with secure services??
0 Kudos