title: Worklight Procedure invocation error. Illegal Argument invalid type of element
body: <p>I am trying to push JSONStore record to my MySql database via a SqlAdapter. Im getting following error. </p>
  
  <blockquote>
    <p>Procedure invocation error. Illegal Argument: invalid type of element </p>
    
    <p>12 Error Message: ADAPTER_FAILURE</p>
  </blockquote>
  
  <p>When this error comes. I have done everything as per the docs. </p>
  
  <p>So far what I have done is,</p>
  
  <p>My DB table structure is like this,</p>
  
  <blockquote>
  <pre><code>&gt; emp_id | emp_name | emp_address
  &gt; -------------------------------
  </code></pre>
  </blockquote>
  
  <p>Create a JSONStore collection and it displays all records, 
  adds new record to the collection but issue happens when I push it to server here's my code</p>
  
  <p>Collection :- </p>
  
  <pre><code>var resultSet = WL.JSONStore.initCollection("resultSet",
          {"emp_id":"integer","emp_name":"string","emp_address":"string"},
  </code></pre>
  
  <p>For pushing record to  DB server,</p>
  
  <pre><code>WLJQ('[data-role="button"]#push_selected').bind('click', function () {
  
                  WL.Logger.debug('Called button#push_selected');
                  if (!checkColInit(resultSet)) {return;}
                      var id=idTag.val();
                      if(id.length&lt;1)
                          {
                          logMessage("You must provide a valid id");
                          }
                      else{
                      var win =   function (data) {
                          logMessage("Successfully Pushed selected Documents : " + data );
                          idTag.val("");
                      };
                      var options = {onSuccess: win, onFailure: genericFailureCallback};
                      var doc=WL.JSONStore.documentify(parseInt(id),{emp_id:id,emp_name: "James", emp_address:"NY"});
                      resultSet.pushSelected(doc,options);
              }
              });
  </code></pre>