Syntax Error with JSON.Parse method to parse SharePoint List Items

Hi All,
I want to get SharePoint List data and bind that retrived data to the JQuery Grid Control.
For this I used SPServices to get the SharePoint List data in SOAP Envelope. Now I need to parse the soap envelope and store the retrieved items in array to pass it to the Grid Control.
While using the JSON.Parse(resporseText) method, Iam consistenly getting an Syntax Error!
Could anyone help me with this ?
Please find the SOAP Envelope I received from SP List as below:
"<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><GetListItemsResponse xmlns="http://schemas.microsoft.com/sharepoint/soap/"><GetListItemsResult><listitems xmlns:s='uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882'
xmlns:dt='uuid:C2F41010-65B3-11d1-A29F-00AA00C14882'
xmlns:rs='urn:schemas-microsoft-com:rowset'
xmlns:z='#RowsetSchema'>
<rs:data ItemCount="2">
<z:row ows_OBNumber='112211.000000000' ows_Project_x0020_Name='Project 1' ows_MetaInfo='11;#' ows__ModerationStatus='0' ows__Level='1' ows_Title='Project 1' ows_ID='11' ows_UniqueId='11;#{FBBCBCF9-666D-42F9-92D7-67188C51BC9B}' ows_owshiddenversion='1' ows_FSObjType='11;#0' ows_Created='2015-01-12 10:25:06' ows_PermMask='0x7fffffffffffffff' ows_Modified='2015-01-12 10:25:06' ows_FileRef='11;#sites/Lists/Projects/11_.000' />
<z:row ows_OBNumber='1122343.00000000' ows_Project_x0020_Name='Project 2 ' ows_MetaInfo='12;#' ows__ModerationStatus='0' ows__Level='1' ows_Title='Project 2' ows_ID='12' ows_UniqueId='12;#{0D772B76-68E4-4769-B6FF-6A269F9C7ABD}' ows_owshiddenversion='1' ows_FSObjType='12;#0' ows_Created='2015-01-12 10:33:48' ows_PermMask='0x7fffffffffffffff' ows_Modified='2015-01-12 10:33:48' ows_FileRef='12;#sites/Lists/Projects/12_.000' />
</rs:data>
</listitems></GetListItemsResult></GetListItemsResponse></soap:Body></soap:Envelope>"
Any help on this will be greatly appreciated.
Thanks In Advance.!

Hi,
According to your description, there is an issue when parsing result from the data retrieved using SPServices.
By default, SPServices returns data as XML format, however, the JSON.parse() method “Throws a SyntaxError exception if the string to parse is not valid JSON”:
https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse
To extract the data needed from the response, you can either take the demo below for as a reference:
http://spservices.codeplex.com/wikipage?title=GetListItems
Or use the jQuery.parseXML() function:
http://api.jquery.com/jquery.parsexml/
Best regards
Patrick Liang
TechNet Community Support

Similar Messages

  • Syntax error caused by duplicate methods in class.

    We've applied service patches to CRM 7 and afterwards I found that there were two versions of a method in a class. There was the original (shown in blue) which should point to the superclass, but does not and point to the ZL.... class. Then there's the second copy of the method, shown in black, which is the Redefined method. But, I have never seen both in existance at the same time when view via se24 or the component workbench.
    This is what I have tried:
    Redefined the method (shown in blue). But then I have two methods of the same name (SET_COUNTRY)  both shown in black. If I reverse the redefiniation it does successfully remove one of the redefintions, so I'm back to the state that started with, having the origianl superclass method and its redefiinition present. 
    This problem is in out QAS environment. I corrected this issue in DEV by deleting the Redefined method. However, the transport created fails when moved into QAS and gives a syntax error saying that duplicate methods exist, or is called twice. Which happens to be the problem that the transport should fix.
    Can anyone suggest anything to try and fix this?.
    As a last resort I opened our QAS envirnment for changes and within SE24 choose the option Utilities/Check.... But this did not resolved anything as all the sub-options said that everything was okay.
    Desperate now, the ledge of this window is not very wide but it's starting to look appealing, even though the building is only one storey high.
    [RESOLVED]
    My sanity is restored. No matter what I tried I could not get a transport through to correct this issue. In the end I had to open up QAS for changes and delete the redefined method from ZL... class by commenting out the call statement, and then answer yes to the question 'Do you want to delete the method?'. After this I re-activated all and the WebUI now works okay.
    The trouble is I'll need to repeat this process in production after the upgrade.
    When the problem was fixed in DEV a transport was created, but this just gave an error 8 when imported into QAS. The message given was exactly the problem that it was trying to fix.
    Jason
    Edited by: Jason Stratham on Sep 14, 2010 3:10 PM

    I think you should ask this on the ML or open a feture request on the bugtracker.

  • Uploading multiple documents into sharepoint list item with REST in sharepoint 2013 using content editor web part :

    hi ,
    i am trying to upload multiple document files into sharepoint list item. I followed below link for implementaion.
    http://techfindings-prem.blogspot.in/search/label/jquery.multifilejs
    It was working for sharepoint hosted app.
     This complete code is written within content edito web part.
    It was working when i was in root site collection with below change (hard coded the root level url) in code in "UploadFile" function.
    var scriptbase = "http://servername" + "/_layouts/15/";
                console.log(' File size:' + bytes.length);
                $.getScript(scriptbase + "SP.RequestExecutor.js", function () {
                    var createitem = new SP.RequestExecutor("http://servername");
                    createitem.executeAsync({
                        url: "http://servername/sites/cpg/" + "/_api/web/lists/GetByTitle('SalesRecord')/items(" + attachmentitemid + ")/AttachmentFiles/add(FileName='"
    + fileName + "')",
                        method: "POST",
                        binaryStringRequestBody: true,
                        body: binary,
                        success: fsucc,
                        error: ferr,
                        state: "Update"
                    function fsucc(data) {
                        //alert( data.statusText + "\n\n" + data.responseText);
                        console.log(data + ' uploaded successfully');
                        deferred.resolve(data);
                    function ferr(data) {
                        //alert( data.statusText + "\n\n" + data.responseText);
                        console.log(fileName + "not uploaded error");
                        deferred.reject(data);
    But the issue came in picture when i was working with the other site collection instead of root one. The url was like below.
    "http://servername/sites/cpg/". This time i need to be there within "cpg" site collection. 
    Now if i hard code the url as i did above my code gets break here while come to below line
     $.getScript(scriptbase + "SP.RequestExecutor.js", function () {
    I am getting error when i used below code:
    var scriptbase = "http://servername" + "/_layouts/15/";
     $.getScript(scriptbase + "SP.RequestExecutor.js", function () {
                    var createitem = new SP.RequestExecutor("http://servername");
                    createitem.executeAsync({
                        url: "http://servername/sites/cpg/" + "/_api/web/lists/GetByTitle('SalesRecord')/items(" + attachmentitemid + ")/AttachmentFiles/add(FileName='"
    + fileName + "')",
                        method: "POST",
                        binaryStringRequestBody: true,
                        body: binary,
                        success: fsucc,
                        error: ferr,
                        state: "Update"
                    function fsucc(data) {
                        //alert( data.statusText + "\n\n" + data.responseText);
                        console.log(data + ' uploaded successfully');
                        deferred.resolve(data);
                    function ferr(data) {
                        //alert( data.statusText + "\n\n" + data.responseText);
                        console.log(fileName + "not uploaded error");
                        deferred.reject(data);
    Please hekp in this case. This complete code is written within content edito web part. 
    Regards:
    Sanjay Joshi

    Hi,
    According to your post, my understanding is that you have an issue about upload multiple documents files into library vai REST API.
    As you have said, you have used the hard code url in your code.
    How about use the _spPageContextInfo.webAbsoluteUrl method to get the url?
    I have used this method to get the url, then use the code in the article you have pasted within a content editor web part to upload the files.
    You can replace the hard code url with the _spPageContextInfo.webAbsoluteUrl method, then check whether it works.
    Thanks,
    Jason
    Jason Guo
    TechNet Community Support

  • Set "peoples or groups" field with current user "login name" in sharepoint list form using javascript

    hi friends
    i am trying to set peoples or groups field in sharepoint  list form with current user login name
    here my code
    <script src="http://ajax.aspnetcdn.com/ajax/jquery/jquery-1.9.0.js"></script>
    <script type="text/javascript">
    $(document).ready(function NewItemView () {
    var currentUser;
        if (SP.ClientContext != null) {
          SP.SOD.executeOrDelayUntilScriptLoaded(getCurrentUser, 'SP.js');
        else {
          SP.SOD.executeFunc('sp.js', null, getCurrentUser);
        function getCurrentUser() {
          var context = new SP.ClientContext.get_current();
          var web = context.get_web();
          currentUser = web.get_currentUser();
          context.load(currentUser);
          context.executeQueryAsync(onSuccessMethod, onRequestFail);
        function onSuccessMethod(sender, args) {
          var account = currentUser.get_loginName();
          var accountEmail = currentUser.get_email();
          var currentUserAccount = account.substring(account.indexOf("|") + 1);
        SetAndResolvePeoplePicker("requester",account);
    // This function runs if the executeQueryAsync call fails.
        function onRequestFail(sender, args) {
          alert('request failed' + args.get_message() + '\n' + args.get_stackTrace());
     function SetAndResolvePeoplePicker(fieldName, userAccountName) {
       var controlName = fieldName;
        var peoplePickerDiv = $("[id$='ClientPeoplePicker'][title='" + controlName + "']");
        var peoplePickerEditor = peoplePickerDiv.find("[title='" + controlName + "']");
        var spPeoplePicker = SPClientPeoplePicker.SPClientPeoplePickerDict[peoplePickerDiv[0].id];
        peoplePickerEditor.val(userAccountName);
        spPeoplePicker.AddUnresolvedUserFromEditor(true);
    </script>
    but it is not working
    please help me

    Hi,
    According to your post, my understanding is that you wanted to set "peoples or groups" field with current user "login name" in SharePoint list form using JavaScript.
    To set "peoples or groups" field with current user "login name”,  you can use the below code:
    <script src="http://ajax.aspnetcdn.com/ajax/jquery/jquery-1.9.0.js"></script>
    <script type="text/javascript">
    function SetPickerValue(pickerid, key, dispval) {
    var xml = '<Entities Append="False" Error="" Separator=";" MaxHeight="3">';
    xml = xml + PreparePickerEntityXml(key, dispval);
    xml = xml + '</Entities>';
    EntityEditorCallback(xml, pickerid, true);
    function PreparePickerEntityXml(key, dispval) {
    return '<Entity Key="' + key + '" DisplayText="' + dispval + '" IsResolved="True" Description="' + key + '"><MultipleMatches /></Entity>';
    function GetCurrentUserAndInsertIntoUserField() {
    var context = new SP.ClientContext.get_current();
    var web = context.get_web();
    this._currentUser = web.get_currentUser();
    context.load(this._currentUser);
    context.executeQueryAsync(Function.createDelegate(this, this.onSuccess),
    Function.createDelegate(this, this.onFailure));
    function onSuccess(sender, args) {
    SetPickerValue('ctl00_m_g_99f3303a_dffa_4436_8bfa_3511d9ffddc0_ctl00_ctl05_ctl01_ctl00_ctl00_ctl04_ctl00_ctl00_UserField', this._currentUser.get_loginName(),
    this._currentUser.get_title());
    function onFaiure(sender, args) {
    alert(args.get_message() + ' ' + args.get_stackTrace());
    ExecuteOrDelayUntilScriptLoaded(GetCurrentUserAndInsertIntoUserField, "sp.js");
    </script>
    More information:
    http://alexeybbb.blogspot.com/2012/10/sharepoint-set-peoplepicker-via-js.html
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • Is possible to take the Infopath form with two repeat section in one SharePoint list

    Is possible to take the Infopath form  with two repeat section in one Sharepoint list 
    Take two repeat section and put them one bellow to other one in a SP list.
    The motive is that the first repeat section is based in account own by the requestor and the second repeat section is when the requestor is doing backup time for some one else where need to log the amount of time that spend in the peer account.
    I have basic logic in the form when requestor said Are you doing backup for some else? and press YES it is be able to use the second repeat section.
     Le me know how much pain full is going tobe or not..
    –Q1: Is possible to do this ?  With codeless or not
    –Q2:What steps I need to do to accomplish this?  feasible or not
    the following picture give a better idea of what I am looking to accomplish:
    CRISTINA&amp;amp MICROSOFT Forum

    Hi,
    Thank you for your question. I am trying to involve someone familiar with this topic to further look at this issue. There might be some time delay. Appreciate your patience. Thank you for your understanding and support.
    Thanks,
    Linda Li
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Linda Li
    TechNet Community Support

  • InfoPath 2010 form parsing error with 3600 execution timeout value in SharePoint 2010

    Hi,
    I have a list in SharePoint 2010 with 100 columns where 25 of them are calculated columns. This list is designed by InfoPath 2010 with two secondary data connections to pull a few data from another two lists. There are 25 set value rules with the submit
    button in InfoPath from. At present, the list is containing around 1000 items.
    The problem is, when I published the InfoPath form it throws an error:
    The SOAP message cannot be parsed.
    In fact, the execution timeout is set to 3600 in config file. When I delete items from the list and keep it around 700 the InfoPath form publish then.
    Could somebody tell me why this problem and what is the possible solution.
    Thanks in advance.

    Hi pointtoshare,
    According to your description, my understanding is that you got an error when you published InfoPath form.
    Please modify the web.config file like :
    <location path="_layouts/UploadEx.aspx">
         <system.web>
           <httpRuntime maxRequestLength="51200" executionTimeout="300" />
         </system.web>
       </location>
    And modify the <securityPolicy> section like :
    The web.config file is in C:\inetpub\wwwroot\wss\VirtualDirectories\spwebappname.
    There is another reason for this issue, please take a look at :
    http://www.heyweb.net/2011/07/infopath-the-soap-message-cannot-be-parsed/
    Here are some similar posts for you to take a look at:
    http://social.technet.microsoft.com/Forums/en-US/ea8da113-fe9a-4878-9994-c1f24cc85c37/soap-error-when-publishing-infopath-form-to-sharepoint?forum=sharepointcustomizationprevious
    http://sharepointshah.blogspot.in/2012/11/soap-message-cannot-be-parsed-error.html
    I hope this helps.
    Thanks,
    Wendy
    Wendy Li
    TechNet Community Support

  • MySQL syntax error with TestStand 4.0 database logging

    I had been using MS Access database to log results which worked fine but the access database is too limited. Switched to MySql. Database works fine and I can query it from Visual C++ and was able to create all my result tables fine from TestStand.
    I get a syntax error when actually trying to log results and it has to do with either a missing quote or and extra quote, I can't quite tell. I thought I saw a post on this somewhere but can't find it now. Here is the complaint from TestStand:
    An error occurred calling 'LogOneResult' in 'ITSDBLog' of 'zNI TestStand Database Logging'
    An error occurred executing a statement.
    Statement: UUT_RESULT.
    [MySQL][ODBC 3.51 Driver][mysqld-5.0.45-community-nt]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DEFAULT VALUES' at line 1
    Description: [MySQL][ODBC 3.51 Driver][mysqld-5.0.45-community-nt]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DEFAULT VALUES' at line 1
    Number: -2147467259
    NativeError: 1064
    SQLState: 37000
    Reported by: Microsoft OLE DB Provider for ODBC Drivers
    Description: Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.
    Number: -2147217887
    NativeError: 0
    SQLState: 37000
    Reported by: Microsoft OLE DB Provider for ODBC Drivers
    Source: TSDBLog
    And here is all that appears in the MySql logfile:
    INSERT INTO UUT_RESULT DEFAULT VALUES
    070914
    You can't see it here but the string is truncated after the word VALUES. The next line starts with the odd number.
    Any ideas?
    Thanks,
    Bill Peters
    BAE SYSTEMS

    Sure. There were two bugs in the ini file that contains the default TS schemas (I think it was Default_Database_Options.ini or like that...).
    Anyway the table description for STEP_NUMERICLIMIT had for it's command line INSERT INTO MEAS_NUMERICLIMIT. I guess TestStand looked at that and said hmm I better create that table too. Then later down the page when you try to create MEAS_NUMERICLIMIT it says the table already exists even though it is empty. The generate SQL button builds a bad file and then the database viewer creates a bad database. I would have to go into MySql and drop the database. I had to save the schema under a custom name, edit it read it back in, generate a new SQL file, but then it would still fail validation because the ini files don't get updated until you exit TestStand. So basically I did this process 3 times before I got it right.
    It's wasn't a big deal but it's amazing how a little thing can cause a lot of work.
    The second bug, I'm not certain was initially in the file or somehow got set on the fly. There was a random int statement at the very end of the SQL table description for UUT_RESULT. It was also in the schema INI file. Since the int had no name and occurred in a odd place, it created a syntax error in MySql. Same fix as above.
    But like I said it's working great now. I like this approach because I serve it to the net with Apache and parse the database with simple PHP scripts.
    Thanks,
    Bill Peters
    BAE SYSTEMS

  • Syntax errors with ES freeze/hang FM

    Hi,
    I keep bumping into situations where a small syntax error causes FM to freeze, like there is a modal dialog open except there is no dialog. For example:
    doc = app.ActiveDoc();
    ...this is wrong because of the parenthesis, but rather than throwing any errors, FM just freezes and I can't get it unfrozen, except to kill it with the Task Manager. Is there a way to prevent this freeze or at least thaw it out? It's becoming tiresome to restart FM and reset locks, etc. with every little typo.
    Thanks,
    Russ

    Hi Russ,
    I think this won't help you, but I can reproduce this with app.ActiveDoc() and app.ActiveBook().
    With other properties I get a correct runtime error "app.AutoBackup() is not a function".
    So generally it works as expected, but not in these two cases.
    I think this is a problem of the script engine in these two cases. Perhaps there's an invisible (private) method defined, which is used internally, I don't know.
    Bye
    Markus

  • Syntax Error with EXPORT statement in ECC 6

    Hi All,
    I have one issue with EXPORT statement syntax.
    I have declared data like below:
    DATA: BEGIN OF mem_id,
              mandt LIKE sy-mandt,
              uname LIKE sy-uname,
              modno LIKE sy-modno,
            END OF mem_id.
    export the memory id
        EXPORT E_VBKOK XANZPK TEXTTAB XBOLNR TO MEMORY ID MEM_ID.
    When I am checking the syntax error i am getting like "MEM_ID" must be a character-type field (data type C, N, D or T). by "INTERFACE". by "INTERFACE". "INTERFACE". by "INTERFACE". by "INTERFACE".
    I know this statement would be like IMPORT ITAB TO JTAB FROM MEMORY ID 'table'. So I have written like below
    EXPORT E_VBKOK XANZPK TEXTTAB XBOLNR TO MEMORY ID 'MEM_ID'. But still it is throwing an error.
    Can you please let me know how can I resolve this?
    Regards,
    Jyothi CH.

    Hi Jyothi,
    data: l_var type string.
    concatenate '6' '8' into l_var separated by space.
    export l_var to memory id 'BB'.
    Here we have to declare the type(structure) for l_var not for BB
    and in another program
    data:l_var type string.
    import l_var from memory id 'BB'.
    write : l_var.

  • Syntax Error with Table Parameter (type: ANY) when Creating Function Module

    Hello experts,
    I want to create a function module with a table parameter and table type is ANY. But when I check (Ctrl+F7) this function module, syntax error occurs - "In this statement, the internal table "MSG_TABLE_ITEM" must have the type "STANDARD TABLE"."
    Could anyone tell me what the wrong is? And how can I fix it?
    Thanks,
    Shelwin

    Hi,
    For table parameters, you can only pass
    MSG_TABLE_ITM   TYPE STANDARD TABLE
    or
    MSG_TABLE_ITM  ( don't fill other columns TYPING ASSOCIATED TYPE  ).
    For reference check FM 'GUI_UPLOAD' - Table parameters
    Regards,
    DPM

  • Syntax error in Define entitytype method in MPC class.

    Hi,
    I am trying to create Odata service by creating new entity type and entity set at service level creation itself (Data model-->Create). Now at the time of generation of classes I am getting syntax error fields are not defined in method, Define Entitytype of MPC class. Could you guide me on how I can generate classes here.
    Br,
    Venkat Konanki.

    Hi,
    I am trying to create Odata service by creating new entity type and entity set at service level creation itself (Data model-->Create). Now at the time of generation of classes I am getting syntax error fields are not defined in method, Define Entitytype of MPC class. Could you guide me on how I can generate classes here.
    Br,
    Venkat Konanki.

  • Syntax Error in Test - Class Method

    Hello all,
    I've created a Class, and when I try to test one of the methods (from within SE24), I'm getting the following error:  "Syntax error in test.  Display generated test environment?" (When I say Yes, I'm taken to %_JJ_TESTFRAME_CLASS program)
    The strange thing is that the code passed the sytax check, and has been activated.   Additionally, there's no error logged in ST22. 
    Any ideas as to what might cause this?
    Thanks in advance,
    Lisa

    a@s,
    Thanks for the quick reply.  I do not have anything in either the Protected or Private sections.  Here's the definitions in my Public section:
    public section.
      types TYPE_V_CUST type STRING .
      types TYPE_V_ZIP type STRING .
      types TYPE_V_OFFICE type STRING .
      types TYPE_SHORT type STRING .
      types TYPE_LONG type STRING .
      types TYPE_BDCDATA type BDCDATA .
      types:
        type_table_bdcdata type TABLE OF type_bdcdata .
      types TYPE_V_STATUS_FOUND type STRING .
      types:
        begin of type_statab,
          city_state(30),                   " City/State
          store_location(20),               " Store # or Loc Name
          service_office(20),               " Office Name
          phoned_in_by(20),                 " Phoned/Reported by
          date_phoned_in(10),               " Date phoned in
          response_date(10),                " Response date
          notification type qmel-qmnum,     " Notification #
          po_number type viqmel-bstnk,      " PO number
          invoice_number(80),               " Invoice #
          invoice_amount type vbak-netwr,   " Inv Amt
          invoice_due_date type vbak-erdat, " Inv Due date
          aufnr type aufk-aufnr,            " Service Order #
          text_line type zlbbil_repairs-text_line1,
          END OF type_statab .
      types:
        type_table_statab type TABLE OF type_statab .
      class-data WA_BDCDATA type BDCDATA .
      class-data BDCDATA type TYPE_TABLE_BDCDATA .
      class-data WA_VIQMEL type VIQMEL .
      class-data WA_VBAK type VBAK .
      class-data WA_STATAB type TYPE_STATAB .
      class-data:
        statab TYPE TABLE OF type_statab .
      class-methods CREATE_NOTIF
        importing
          !V_ZIP type TYPE_V_ZIP
          !V_CUST type TYPE_V_CUST
          !V_OFFICE type TYPE_V_OFFICE
          !V_SHORT_TEXT type TYPE_SHORT
          !V_LONG_TEXT type TYPE_LONG
        exporting
          !V_NOTIF_FMT type BAPI2080_NOTHDRE-NOTIF_NO .
      class-methods FILL_BDC_DYNPRO
        importing
          !PROGRAM type BDCDATA-PROGRAM
          !DYNPRO type BDCDATA-DYNPRO .
      class-methods FILL_BDC_FIELD
        importing
          !FNAM type BDCDATA-FNAM
          !FVAL type BDCDATA-FVAL .
      class-methods EMAIL_NOTIF_OFF
        importing
          !V_NOTIF_FMT type BAPI2080_NOTHDRE-NOTIF_NO .
      class-methods EMAIL_NOTIF_CUST
        importing
          !V_NOTIF_FMT type BAPI2080_NOTHDRE-NOTIF_NO
          !V_EMAIL type STRING .
      class-methods GET_NOTIF_STATUS
        importing
          !V_NOTIF type BAPI2080_NOTHDRE-NOTIF_NO
        exporting
          !V_STATUS_FOUND type TYPE_V_STATUS_FOUND .
      class-methods GET_REPAIRS_DONE
        importing
          !WA_VIQMEL type VIQMEL
        changing
          !STATAB type TYPE_TABLE_STATAB
          !WA_STATAB type TYPE_STATAB .
    Anything jump out?

  • Illegal register: "icc" : syntax error with  Sun C 5.8 compiler

    I wanted to compile my C file with compiler option "cc -c -Xc -mt -fast -xarch=amd64" on Solaris 10 amd64 machine but it failed with following error -
    Assembler: abc.c
    "/tmp/GAAOBain6", line 819 : Illegal register: "icc"
    "/tmp/GAAOBain6", line 819 : Syntax error
    Near line: " orq %icc,%r8 ;/ line : 210"
    "/tmp/GAAOBain6", line 852 : Illegal register: "icc"
    "/tmp/GAAOBain6", line 852 : Syntax error
    Near line: " movzwq %icc,%r9 ;/ line : 215"
    cc: ube failed for abc.c
    *** Error code 2
    I am using following sun C compiler -
    /SS11/SUNWspro/bin/cc -V
    cc: Sun C 5.8 Patch 121016-02 2006/03/31
    Do anybody has idea about this issue?
    Thanks
    Sgupta

    Thanks Boris for your help.
    My abc.c file is following -
    struct struct_1 {
    unsigned type:8;
    unsigned level:5;
    unsigned seen:1;
    unsigned pad:2;
    unsigned length:16;
    void sample (unsigned char type)
    struct struct_1 *q;
    /*** Allocate and assign pBody here **/
    q->type = type;
    q->length = type;
    ==========================================
    compiling this file with following option gives the error in Sol-10 amd64 -
    /SS11/SUNWspro/bin/cc -c -Xc -mt -fast -xarch=amd64 abc.c
    But compiling without "-fast" options work fine.
    Thanks
    Sgupta

  • Errors with a readFile method

    I wrote a method that is designed to read input from a file (readPlayers) and am getting two errors that I cannot figure out. Can you suggest why I'm getting these errors? The first error is on line 17 public void readPlayers( fin, teamArray) and reads:      Syntax error on token "(", = expected
         Syntax error on token ")", ; expected
    the second error is on line 53 else (type.equals("Hockey")) and reads Syntax error, insert ";" to complete Statement
         Syntax error, insert "AssignmentOperator ArrayInitializer" to complete ArrayInitializerAssignement
    Neither of these errors seem to fit so I'm wondering if the actual errors occur earlier in the code.??? Any help would be appreciated.
    import java.io.IOException;
    import java.util.*;
    public class TeamTwo
         private String city;
         //private String [] player;
         private static String cout;
         public static void main(String [] args) throws IOException
              Scanner fin = TFI.OpenInputFile();
              Scanner kb = new Scanner (System.in);
              int menuChoice = 0;
              public void readPlayers( fin, teamArray)
                  Player newPlayer = null;
                  int games = 0;               //basketball player
                  int timesBatted = 0;     //baseball player
                  double battingAvg = 0.0;//baseball player
                  int score = 0;               //hockey player
                  Player [] teamArray = new Player [1];
                 // String cityName = fin.nextLine();
                  if(fin.hasNext())
                        city = fin.nextLine();
                  while (fin.hasNext())
                           String type = fin.nextLine();
                           String firstName = fin.nextLine();
                           String lastName = fin.nextLine();
                           int salary = fin.nextLine();
                           fin.next();//clears buffer
                           if (type.equals("Basketball"))
                               games = fin.nextInt();
                               newPlayer = new Basketball(firstName, lastName, salary);
                           else if (type.equals("Baseball"))
                               battingAvg = fin.nextDouble();
                               timesBatted = fin.nextInt();
                               newPlayer = new Baseball(firstName, lastName, salary);
                           else (type.equals("Hockey"))
                               scoring = fin.nextInt();
                               newPlayer = new Hockey(firstName, lastName, salary);
                           fin.next();//clears buffer
                           teamArray.addPlayer( newPlayer );//call the addPlayer function
                      }//end while
              }//end readPlayers function
              

    The first error is on line 17
    public void readPlayers( fin, teamArray)When declaring a method, you have to indicate the types of the parameters, e.g., public void readPlayers(Scanner fin, Player[] teamArray) {Further, you may NEVER define a method within another method.
    the second error is on line 53
    else (type.equals("Hockey"))type.equals("...") is only for testing equality. It returns a boolean value of true or false. There are two possible solutions here:
    else if (type.equals("Hockey")) //to test if variable "type" is set to the value "Hockey"
    or
    else (type="Hockey") //to force the variable "type" to represent the string "Hockey"
    Which to use depends on what you want to accomplish.

  • Syntax Error with creating object

    Hi,
    I am getting the following syntax error in the code below:
    non-staic variable this cannot be referenced from a static context
    job[ ] thread = new job(20);
    non-staic variable this cannot be referenced from a static context
    thread[index] = new job(index);
    public static void main (String[ ] args) {
    job[ ] thread = new job(20);
         for(int index=0; index < 20; index++) {
              input1[index]=index;
              input2[index]=index*2;
         for (int index=0; index < 20; index++) {
              thread[index] = new job(index);
              thread[index].start();
    Zulfi.

    Declare the nested class 'job' as static. Like "static class job" etc.

Maybe you are looking for

  • How to force redownload in ACF Caching

    Hello All, Following the instructions in documentation from here: http://docs.oracle.com/cd/E21043_01/web.1111/b31973/ap_config.htm A.2.3.18 ADF Faces Caching Filter A.4.2 Defining Caching Rules for ADF Faces Caching Filter I am able to configure the

  • How to build dynamic menus using JSP==Urgent==Please Help me

    Hello, I have exhausted searching on internet to find a book which tells how to build Dynmic menus in JSP.I dont want to use DHTML as this becomes complex as the menu categories are built using data from database.Is there any workaround in java to do

  • 23.976 Frame Rate Workaround?

    Please help. im doing hte sound design for my friends film, which is at 23.976 fps. This is my first time doing this. i should add. is there a pardon the pun, logical way to do this? ive spent the last 2 nights worrying that my audio is not going to

  • How to reject a change via bindings - NSEditor?

    I have an NSPopupButton on a view that communicates with my model class using an NSObjectController. This is used as part of a remote-control of a radio which means that not all of the options available in the popup button are valid under all circums

  • Can't set required duration in iMovie 09?

    I'm using iMovie 09 and trying to set the duration of a clip (using inspector) as 0.9s but as soon as I set the vallue and hit enter it just becomes 0.8s. It seems that the duration can only go up in 0.2s intervals. Does anyone have a solution? Is th