Select to view content in your preferred language

IdentifyTask Error

1325
7
Jump to solution
11-01-2012 12:48 PM
AndyStewart1
Occasional Contributor
I am doing some work for a client using 9.3 and the IdentifyTask is acting strange. I get the following error: "Could not complete the operation due to error c00ce56e". Any ideas what I could be doing wrong? Is there something in the service settings that could be causing this? My code is below.

dojo.connect(map, "onClick", SimpleIdentifyTask);  function SimpleIdentifyTask(evt) {  var identifyTask = new esri.tasks.IdentifyTask("http://[hidden]/ArcGIS/rest/services/myMap/MapServer");  var identifyParams = new esri.tasks.IdentifyParameters();  identifyParams.tolerance = 2;  identifyParams.returnGeometry = true;   identifyParams.layerOption = esri.tasks.IdentifyParameters.LAYER_OPTION_ALL;  identifyParams.layerIds = [5,7];  identifyParams.geometry = evt.mapPoint;  identifyParams.mapExtent = map.extent;  identifyParams.spatialReference = map.spatialReference;  identifyTask.execute(identifyParams, function(idResults) { alert(idResults.length); }, function(err){alert(err.message);}); }
0 Kudos
1 Solution

Accepted Solutions
AndyStewart1
Occasional Contributor
I figured out the problem. The proxy.jsp file does not work in older versions of Java. Specifically it doesn't like the ".contains" method. I switched out this line of code:
if(reqUrl.toLowerCase().contains(stokens[0].toLowerCase())) {

with this one
if(reqUrl.toLowerCase().indexOf(stokens[0].toLowerCase())>=0) {

and replace
for(String surl : serverUrls) {

with this
for(int i = 0; i<serverUrls.length; i++) {  String surl = serverUrls;

and it worked.

View solution in original post

0 Kudos
7 Replies
AndyStewart1
Occasional Contributor
Our client upgraded to 10.1 and I am still getting the same error. Has anyone seen this before?
0 Kudos
JohnGravois
Deactivated User
what happens when you try to make a similar identify request directly from the rest services page?
0 Kudos
AndyStewart1
Occasional Contributor
I have narrowed it down to the proxy.jsp file not compiling correctly for some reason. The IdentifyTask goes through the proxy because the client uses a well-known text for their Spatial Reference, so it forces it through the proxy. I have downloaded the proxy directly from the arcgis.com website and the only thing I changed was the serverUrls variable. Still troubleshooting.
0 Kudos
AndyStewart1
Occasional Contributor
I figured out the problem. The proxy.jsp file does not work in older versions of Java. Specifically it doesn't like the ".contains" method. I switched out this line of code:
if(reqUrl.toLowerCase().contains(stokens[0].toLowerCase())) {

with this one
if(reqUrl.toLowerCase().indexOf(stokens[0].toLowerCase())>=0) {

and replace
for(String surl : serverUrls) {

with this
for(int i = 0; i<serverUrls.length; i++) {  String surl = serverUrls;

and it worked.
0 Kudos
JohnGravois
Deactivated User
nice troubleshooting!  thanks for taking the time to share the exact fix for the problem. 

in working with another customer today i believe we pinpointed a similar problem when Oracle WebLogic was used for hosting.  in version 10.3.3.0 of WebLogic, our JSP proxy worked out of the box, but it was necessary to make a few changes to get things up and running in version 8.1.4 because of the underlying version of Java in use.
0 Kudos
AndyStewart1
Occasional Contributor
in working with another customer today i believe we pinpointed a similar problem when Oracle WebLogic was used for hosting.  in version 10.3.3.0 of WebLogic, our JSP proxy worked out of the box, but it was necessary to make a few changes to get things up and running in version 8.1.4 because of the underlying version of Java in use.


That was us.
0 Kudos
JohnGravois
Deactivated User
hahaha.  i had my suspicions. 😉
0 Kudos