1

I'm having trouble to get my response using Jquery Ajax. My goal is when a page loads, I want it to run the AJAX to call a JSP page and retrieve a data object (response). This getJSON.jsp page will run a java method to load a CSV file(over 100,000 rows. 30MB file) and convert it into a JSON Array which is my data object. This way is to load the file in the server side. The converting csv into JSON Array works BUT when I send a response of that JSONArray back, I receive a 'Not enough storage...' error. It didnt even send do the error function. It works when I create a csv file with 9,000 rows. I have to use IE11 standards. Please can you insist me? I've researching ways to retrieve a large amount of JSON Array object. My code is below just in case:

UPDATE: I forgot to add this. I did debug it on the ie11 Developer tool and place a breakpoint on code "console.log('begin json parse data.')". When loading the page it didnt event stop to that point. So I'm assuming that when sending a response back, 'data', is where the issue hits. There's no errors when running getJSON.jsp and Java backend.

 $.ajax({
 type:'post',
 url: "getJSON.jsp",
 success: function(data) {
     console.log("begin json parse data.");
     getMasterData = JSON.parse(data);
    console.log("end of json parse data")
 },error: function (xhr, ajaxOptions, thrownError) {
        console.log("ERROR FOR AJAX getJSON stuff: " + thrownError);
    }, 
 async:false

});

Thank you

timJIN520
  • 299
  • 1
  • 3
  • 15
  • this will help https://stackoverflow.com/questions/30564728/json-parse-on-a-large-array-of-objects-is-using-way-more-memory-than-it-should – Sanchit Patiyal Oct 31 '17 at 21:25
  • It sounds like an IE11 problem. Check [here](https://connect.microsoft.com/IE/feedback/details/1053110/not-enough-storage-is-available-to-complete-this-operation-8007000e-error-when-trying-to-get-a-response-around-100mb-via-ajax). Perhaps there is another way to make your app work with a smaller data set? – James Oct 31 '17 at 21:25
  • @James - No..I'm developing a d3 dashboard with crossfilter feature. I need that data set in order to display the d3 charts. I did load the csv using d3.csv() before. It works only first load then second refresh it crash and i have to close the tab or browser. Thats why i'm loading everything from the server side. – timJIN520 Nov 01 '17 at 13:39
  • 1
    @SanchitPatiyal I will check out the link. thanks you for responding. – timJIN520 Nov 01 '17 at 13:41
  • BTW, I made an update. Hope this helps. – timJIN520 Nov 01 '17 at 15:01
  • @SanchitPatiyal I looked at the link. I'm already loading the CSV in java side. I tried send an response using a string instead of JSON Array object base on the link you provided then parse it in JSP or html. Since the response is too large and I still getting the "Not enough storage.." error, is there an other way to send that data to the front end? I just need a data object to plug in the d3 and crossfilter. – timJIN520 Nov 02 '17 at 16:29
  • The issue is there on chrome and firefox also?? – Sanchit Patiyal Nov 02 '17 at 17:04
  • @SanchitPatiyal nope. both of them are fine. though we have to use IE11 as a standard for this app. I tried increase the Maximum request in tomcat but no luck. Current i'm using Websphere as my local server. – timJIN520 Nov 02 '17 at 17:40
  • Check these and let me know if it helps https://connect.microsoft.com/IE/Feedback/Details/1053110 https://stackoverflow.com/questions/27405826/internet-explorer-11-not-enough-storage-error – Sanchit Patiyal Nov 02 '17 at 19:07
  • @SanchitPatiyal I have tried to enable the IE to 64 bit but it didnt work. You think using Node.js will solve this problem? We're trying to avoid using Database and use csv file only. – timJIN520 Nov 06 '17 at 16:46
  • still same error?? – Sanchit Patiyal Nov 06 '17 at 16:54
  • @timJIN520 can't say anything about using NodeJS. You can give a try after all you need to solve the issue. – Sanchit Patiyal Nov 06 '17 at 16:54

0 Answers0