Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: First Tutorial Load JSON Store not working: Unable to load data using. . . ."

    Success! Looks like we've fixed this one. According to our records the fix was applied for a bug in our system in a recent build.
  1. #1

    Default First Tutorial Load JSON Store not working: Unable to load data using. . . ."

    Same as a previous question that was closed without resolution. Trying the tutorial "Build Your First Desktop Application" and it blows up at Step 7 of the "Create Store" subsection: namely, everything works correctly up to Step 7 "1 record loaded. . . ."&nbsp;<br><br>At step 8, in which we correct for the array, the tutorial ceases to work and we get the "Unable to load data using. . . ." message. I'm using IIS in Windows 7, and the IIS log shows [no error] 200. I checked the JSON file, which looked a little odd. I tried loading the cars.json into Altova XML SPY and checked for well-formedness and get:

    Character 'd' is grammatically unexpected. . . .JSON production: Production 'object' not satisfied

    It obviously is looking for a string object, which DATA (my caps) isn't.

    The file opens fine in the browser (i.e., cars.json).

    The file path is correct (it opens)

    The Edit > Project Settings > URL Prefix is correct and works in a browser

    I tried an online JSON validator, and the file syntax failed with the following error:

    >Parse error on line 1:
    { data: [ {
    -----^
    Expecting 'STRING', '}'


    As I was beginning to feel like a fool, I reformatted the tutorial cars.json to the JSON.ORG default formatting rules (I admit, I used an online formatter, but the result looked good, and I opened the file in Altova and checked it and it passed and was well-formed).

    I redid step 7 with the address of the new file. It again loaded fine and displayed the "1 record loaded. . . ." and I changed the root to DATA (caps mine), and again get the error "Unable to load data using. . . ."
    I'm at the end of my rope here. Not a newbie programmer, though Sencha is new to me. I acknowledge I might have something wrong here, but I'm beginning to suspect Sencha put this tutorial out the door without even trying it. Is there any hope or do I have to give up on this product the first rattle out of the box.

    Thanks.

  2. #2
    Sencha User aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,488

    Default

    Could you share your project with us?

    I assure you that the tutorial did not go out the door without many reviews and building the same app many times (painful). Unfortunately once you get to that point it is easy to gloss over some little detail that you as a new user may not have picked up on.

    We'll gladly look at your project and see what may be the problem.
    Aaron Conran
    @aconran

  3. #3
    Sencha User aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,488

    Default

    To create an archive of the project go to File -> Archive Project and then share the .xda with us.
    Aaron Conran
    @aconran

  4. #4

    Default Requested Items

    Attached is the XDA file. The project is CarListings2. I also downloaded the CarListings project from GitHub, upgraded it, and tried that one out. Same troubles with the store as with CarListings1 (first project) and CarListings2 (2nd try). Note: The JSON file from the GitHub project is formatted to JSON.ORG standards, while the downloaded file included with the CarListings2 is downloaded from the link in the tutorial.

    Note: the cars.json in CarListings2 (downloaded file) does not validate as well-formed in Altova XML Spy, whereas the cars.json file in CarListings (downloaded from GitHub) does validate as well formed in Altova XML Spy. Neither seems to make a difference, though.
    Attached Files Attached Files
    Last edited by technorodent; 26 Sep 2012 at 1:17 PM. Reason: additional info on JSON validation

  5. #5
    Sencha User aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,488

    Default

    Thanks for the project archive, it sounds similar to another users issue:
    http://www.sencha.com/forum/showthre...-error-problem

    We'll take a look.
    Aaron Conran
    @aconran

  6. #6

    Default

    I second all of this (used cars.json from data.zip, then from the GitHub repo, then tried loading the project from the repo). Tried on 64bit Gentoo Linux and 64bit Ubuntu 12.04 LTS. Sencha Architect Version 2.1.0 build 637, 2.1-stable

  7. #7
    Sencha User aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,488

    Default

    Thank you everyone for the report. This was an issue with Ext JS 4.1 only, we have a fix in our code base now and going through the QA process.
    Aaron Conran
    @aconran

  8. #8
    Sencha User aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,488

    Default

    Fixed in build 640 released today.
    Aaron Conran
    @aconran

  9. #9

    Default Thanks

    Thank you, we shall give Architect another try.

    Best regards,

  10. #10

    Default SENCHA TOUCH cannot read cars.json

    I am not to read the cars.json file from the same location.

    I put together a very simple Sencha Touch 2.1 project just to read the cars.json in Sencha Architect 2.2 trial edition. The following is my steps:

    1. create Sencha Touch 2.1 project.
    2. save it in the same structure as in the carlistings ExtJS sample.
    3. create the model exactly like the carlistings ExtJS sample.
    4. create the jsonstore exactly like the carlistings ExtJS sample.
    5. right click to load data.
    6. got dialog "MyJsonReader unable to read data. Open in Browser: data\cars.json"

    Can someone help me?

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •