views:

290

answers:

1

Hi,

I have very strange problem and that problem occurs very rarely and that too in our production env.

The production env. setup is,

Apache Web Server as front layer Apache Tomcat 6.0 as application server (liked with Apache Web server via mod_jk)

I have custom made Ajax based RPC component where we use jQuery for ajax calling. The data is communicated using POST method.

The client side data (javascript objects) are sent to server in JSON format and on server side they are deserialized into java objects.

The RPC call is executed by providing following information,

var jsonParamObj = new Object(); 
jsonParamObj.param0 = objParam0; 
var params = new Object(); 
params.**jsontext**=**toJsonString**(jsonParamObj);

where jsontext contains the real data to be transmitted. I am using toJsonString javascript function available as open source json script (previously used JSON.stringify but had same problem).

Following is the jQuery call,

$.ajax({async:async,
 data:params,
 dataType:"json",
 type:"POST", 
 url:this.ajaxAction+qs,
 contentType:"application/x-www-form-urlencoded; charset=UTF-8",
 error:function (XMLHttpRequest, textStatus, errorThrown) 
  { 
   alert('Connectivity Issue : '+textStatus + ' Error : '+errorThrown + ' Response : '+XMLHttpRequest.responseText);
  }, 
 success:function(jsonobj){
  if(jsonobj.JSON.ajaxSysError)
  {
   alert(jsonobj.JSON.ajaxSysError.message); 
   return;
  }

  // do other work
 }

});

Now the problem is sometimes whatever data sent in forms of params do not reach to server (not to apache as well as tomcat) I have enabled maximum level of verbosity in logs however whatever data it sends through query string (see qs) reaches server.

The client browser is IE 7 (Windows XP Media Edition).

Can you put some thoughts that would help me in debug this issue.

Thanks for reading this long question.

Jatan

A: 

Install Fiddler and look at the HTTP request that IE is sending.

Also, put the ajax call in a try/catch block and check whether you're getting any Javascript errors.

SLaks