Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7569323
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T15:08:13+00:00 2026-05-30T15:08:13+00:00

I am getting DataTables warning: JSON data from server could not be parsed. This

  • 0

I am getting “DataTables warning: JSON data from server could not be parsed. This is caused by a JSON formatting error”
I know this might be a duplicate of other threads, I am using java and dataTables in my code.. I am getting the output in JSON format but its not recognized on the client-side while printing.

When I verified the JSON object in http://jsonlint.com/ its is in correct format. I am not sure what is causing this error.

{“iTotalRecords”:5,”sEcho”:”1″,”aaData”:[[“V2993ASFKH230943″,”Honda”,”Accord”],[“V2993A39SNF30943″,”Honda”,”CRV”],[“V4833A39SNF30943″,”Acura”,”TSX”],[“V4833RE9SNF30943″,”Acura”,”TL”],[“V9383RE9SNF30943″,”Acura”,”MDX”]],”iTotalDisplayRecords”:5}

Any help would be really appreciated.

Thanks

EDIT

try {
            JSONObject jsonResponse = new JSONObject();

            jsonResponse.put("sEcho", sEcho);
            jsonResponse.put("iTotalRecords", iTotalRecords);
            jsonResponse.put("iTotalDisplayRecords", iTotalDisplayRecords);

            while (itr.hasNext()) {
                Map rs = (Map) itr.next();
                FleetEquipment eqpmt = new FleetEquipment();
                eqpmt.setVinNumber((String) rs.get("VIN_ID"));
                eqpmt.setMake((String) rs.get("MAKE"));
                eqpmt.setModel((String) rs.get("MODEL"));
                JSONArray row = new JSONArray();
                row.put(eqpmt.getVinNumber()).put(eqpmt.getMake())
                        .put(eqpmt.getModel());
                data.put(row);

            }

            jsonResponse.put("aaData", data);

            response.setContentType("application/json");
            response.getWriter().print(jsonResponse.toString());
        } catch (JSONException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
            response.setContentType("text/html");
            response.getWriter().print(e.getMessage());
        }

EDIT 1

<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>

<portlet:defineObjects/>

<portlet:resourceURL var="listURL" id="list" escapeXml="false"/>
<script type="text/javascript">
$(document).ready(function () {
            $('#listTable').dataTable({
                "bServerSide": true,
                "sAjaxSource": "<%=listURL.toString()%>",
                "bProcessing": true,
                "sPaginationType": "full_numbers",
                "bJQueryUI": true
            });
        });

</script></head>
<body>

<table id="listTable">
    <thead>
        <tr>
            <th>VIN ID</th>
            <th>MAKE</th>
            <th>MODEL</th>
            <th>MODEL1</th>
            <th>Model2</th>
        </tr>
    </thead>
    <tbody>
    </tbody>
</table>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T15:08:14+00:00Added an answer on May 30, 2026 at 3:08 pm
    \r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\t\r\n\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t\r\n\t\r\n\t\t\r\n\t\r\n VIN ID MAKE MODEL ","
    status ":200,"
    statusText ":"
    OK "},"
    fnServerData ":"
    function (e, j, l, k) {\n k.jqXHR = i.ajax({
            url: e,
            data: j,
            success: function (e) {
                i(k.oInstance).trigger(\"xhr\", k);l(e);}, dataType: \"json\", cache: !1, type: k.sServerMethod, error: function (e, i) {\"parsererror\" == i && alert(\"DataTables warning: JSON data from server could not be parsed. This is caused by a JSON formatting error.\");}});\n}", "aoServerParams": [],
                "sServerMethod": "GET",
                "fnFormatNumber": "function (e) {\n if (1000 > e) {\n return e;\n }\n for (var i = e + \"\", e = i.split(\"\"), j = \"\", i = i.length, l = 0; l < i; l++) {\n 0 === l % 3 &&\n 0 !== l && (j = this.oLanguage.sInfoThousands + j), j = e[i - l - 1] + j;\n }\n return j;\n}",
                "aLengthMenu": [10, 25, 50, 100],
                "iDraw": 1,
                "bDrawing": true,
                "iDrawError": -1,
                "_iDisplayLength": 10,
                "_iDisplayStart": 0,
                "_iDisplayEnd": 0,
                "_iRecordsTotal": 0,
                "_iRecordsDisplay": 0,
                "bJUI": true,
                "oClasses": {
                    "sTable": "dataTable",
                    "sPagePrevEnabled": "fg-button ui-button ui-state-default ui-corner-left",
                    "sPagePrevDisabled": "fg-button ui-button ui-state-default ui-corner-left ui-state-disabled",
                    "sPageNextEnabled": "fg-button ui-button ui-state-default ui-corner-right",
                    "sPageNextDisabled": "fg-button ui-button ui-state-default ui-corner-right ui-state-disabled",
                    "sPageJUINext": "ui-icon ui-icon-circle-arrow-e",
                    "sPageJUIPrev": "ui-icon ui-icon-circle-arrow-w",
                    "sPageButton": "fg-button ui-button ui-state-default",
                    "sPageButtonActive": "fg-button ui-button ui-state-default ui-state-disabled",
                    "sPageButtonStaticDisabled": "fg-button ui-button ui-state-default ui-state-disabled",
                    "sPageFirst": "first ui-corner-tl ui-corner-bl",
                    "sPagePrevious": "previous",
                    "sPageNext": "next",
                    "sPageLast": "last ui-corner-tr ui-corner-br",
                    "sStripeOdd": "odd",
                    "sStripeEven": "even",
                    "sRowEmpty": "dataTables_empty",
                    "sWrapper": "dataTables_wrapper",
                    "sFilter": "dataTables_filter",
                    "sInfo": "dataTables_info",
                    "sPaging": "dataTables_paginate fg-buttonset ui-buttonset fg-buttonset-multi ui-buttonset-multi paging_",
                    "sLength": "dataTables_length",
                    "sProcessing": "dataTables_processing",
                    "sSortAsc": "ui-state-default",
                    "sSortDesc": "ui-state-default",
                    "sSortable": "ui-state-default",
                    "sSortableAsc": "ui-state-default",
                    "sSortableDesc": "ui-state-default",
                    "sSortableNone": "ui-state-default",
                    "sSortColumn": "sorting_",
                    "sSortJUIAsc": "css_right ui-icon ui-icon-triangle-1-n",
                    "sSortJUIDesc": "css_right ui-icon ui-icon-triangle-1-s",
                    "sSortJUI": "css_right ui-icon ui-icon-carat-2-n-s",
                    "sSortJUIAscAllowed": "css_right ui-icon ui-icon-carat-1-n",
                    "sSortJUIDescAllowed": "css_right ui-icon ui-icon-carat-1-s",
                    "sSortJUIWrapper": "DataTables_sort_wrapper",
                    "sSortIcon": "DataTables_sort_icon",
                    "sScrollWrapper": "dataTables_scroll",
                    "sScrollHead": "dataTables_scrollHead ui-state-default",
                    "sScrollHeadInner": "dataTables_scrollHeadInner",
                    "sScrollBody": "dataTables_scrollBody",
                    "sScrollFoot": "dataTables_scrollFoot ui-state-default",
                    "sScrollFootInner": "dataTables_scrollFootInner",
                    "sFooterTH": "ui-state-default"
                },
                "bFiltered": true,
                "bSorted": true,
                "bSortCellsTop": false,
                "oInit": {
                    "bServerSide": true,
                    "sAjaxSource": "/wps/myportal/!ut/p/b1/hc09DoJAEIbhs3CCGX5kl3IRdVGiolFkG7Mho2IQEkAKTy8aGwt0ukmeLy8oSE3PctAeWY4LB1Cl7vKzbvOq1MXrV-6RBz73fVMg9-QUw0j6bCLmiGj2IO3BeCakwyJEPuImhkLumLsNLBT2v30C6psgrlhP7Jlki72Fof0BvxJvgAMnEJayulGfShUbDMUISU1Nda8zgs2pIGqjvGkhznR2oYg6Ktb6THBThRde2UMIw3gC131G1Q!!/",
                    "bProcessing": true,
                    "sPaginationType": "full_numbers",
                    "bJQueryUI": true
                },
                "aoDestroyCallback": [],
                "fnRecordsTotal": "function () {\n return this.oFeatures.bServerSide ? parseInt(this._iRecordsTotal, 10) : this.aiDisplayMaster.length;\n}",
                "fnRecordsDisplay": "function () {\n return this.oFeatures.bServerSide ? parseInt(this._iRecordsDisplay, 10) : this.aiDisplay.length;\n}",
                "fnDisplayEnd": "function () {\n return this.oFeatures.bServerSide ? !1 === this.oFeatures.bPaginate || - 1 == this._iDisplayLength ? this._iDisplayStart + this.aiDisplay.length : Math.min(this._iDisplayStart + this._iDisplayLength, this._iRecordsDisplay) : this._iDisplayEnd;\n}",
                "sInstance": "fleetList",
                "iTabIndex": 0,
                "fnStateLoad": "function (e) {\n var e = this.oApi._fnReadCookie(e.sCookiePrefix + e.sInstance), j;\n try {\n j = \"function\" === typeof i.parseJSON ? i.parseJSON(e) : eval(\"(\" + e + \")\");\n } catch (l) {\n j = null;\n }\n return j;\n}",
                "fnStateSave": "function (e, i) {\n this.oApi._fnCreateCookie(e.sCookiePrefix + e.sInstance, this.oApi._fnJsonString(i), e.iCookieDuration, e.sCookiePrefix, e.fnCookieCallback);\n}",
                "iInitDisplayStart": -1,
                "nTableReinsertBefore": null
                }],
            "tablesDisplayData": [
                []
            ],
            "tablesDisplayExtra": [
                []
            ]
        }
        };
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Getting this error: 2009-09-03 12:44:02.307 xcodebuild[307:10b] warning: compiler 'com.apple.compilers.llvm.clang.1_0.analyzer' is based on missing compiler
i have an datatable like this. i am getting this data from an excel
When using the jQuery datatables plugin , why am I getting this error? k
Getting a rendering error for this form: 'NoneType' object has no attribute 'widget' http://dpaste.com/88585/
Getting a 'marshal data too short' error when trying to install the mysql gem
Database server is migrated from version 12.5x to version 15.03 Sybase.Data.AseClient version - 1.15.50.0
I am getting this error but only very occasionally. 99.9% of the time it
I am getting a datatable with customer data from a MySql databaes and a
I am getting the Data table a output from my DataAccess Layer. In My
I'm getting a value from DataGridView, and based on particular I want to know

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.