1. #1
    Ext User
    Join Date
    Dec 2010
    Posts
    3
    Vote Rating
    0
    timtim is on a distinguished road

      0  

    Default Datastore: "Unable to load data using the supplied configuration"

    Datastore: "Unable to load data using the supplied configuration"


    Hey, i tried to do the datastores tutorial provided on the mainpage but i get some error trying to use the .json database.

    I have a tomcat server running on port 8080 and a databasefolder at /database/customers.json.
    I have no problems accessing that file with a browser but extdesigner does not load the file. Any idea what it might be?

    Greetings,

    TimTim

  2. #2
    Ext JS Premium Member
    Join Date
    Nov 2010
    Posts
    7
    Vote Rating
    0
    mrolli is on a distinguished road

      0  

    Default


    I have exactly the same issue.

    From your documentation about data stores I wanted to try the example with the customers.json. I followed the instruction, placed the file on my ubuntu in a virtual box and specified the URL (basePath + url) and clicked "Load Data" which results in an error:

    "Unable to load data using the supplied configuration.
    Open in Browser: http://dev.local/customers.json"

    The URL works fine in the browser and I can see the content of the json file.

    What might be the problem?

    Regards, Michael

  3. #3
    Sencha - Desktop Packager Dev Team jarrednicholls's Avatar
    Join Date
    Mar 2007
    Location
    Frederick, MD
    Posts
    1,747
    Vote Rating
    7
    jarrednicholls will become famous soon enough jarrednicholls will become famous soon enough

      0  

    Default


    Hi TimTim & Michael,

    This error also occurs when the store is unable to decipher the data that's returned from the server. Is the "root" config of your JsonStore set to "customers"?

  4. #4
    Ext JS Premium Member
    Join Date
    Nov 2010
    Posts
    7
    Vote Rating
    0
    mrolli is on a distinguished road

      0  

    Default


    Hi Jarred

    Yes, the root is set to customers.

    In my case, when my JsonStore in ExtDesigner (running on my mac) should connect to http://dev.local/customers.json (which is on 192.168.56.10, a virtbox ubuntu running apache, and GET request with browser works from my mac), does the rule of xdomain references bite me? Or is it supposed to work that way from within ExtDesigner?

    The code I have:

    JsonStore Definition
    Code:
    CustomersStore = Ext.extend(Ext.data.JsonStore, {
        constructor: function(cfg) {
            cfg = cfg || {};
            CustomersStore.superclass.constructor.call(this, Ext.apply({
                storeId: 'CustomersStore',
                root: 'customers',
                idProperty: 'name',
                url: 'customers.json',
                autoLoad: true,
                fields: [
                    {
                        name: 'name'
                    },
                    {
                        name: 'age',
                        type: 'int'
                    },
                    {
                        name: 'zipcode',
                        mapping: 'zip'
                    }
                ]
            }, cfg));
        }
    
    });
    new CustomersStore();
    URL Prefix: http://dev.local/

    customers.json Content:
    Code:
    {
        customers: [
            {name: "Bradley Banks", age: 36, zip: "10573"},
            {name: "Sarah Carlson", age: 59, zip: "48075"},
            {name: "Annmarie Wright", age: 53, zip: "48226"}
        ]
    }
    Error message when clicking "Load Data" on JsonStore:

    Unable to load data using the supplied configuration.
    Open in Browser: http://dev.local/customers.json

    I'm already thinking about setting up the local apache of my mac as a reverse proxy to dev.local so that ExtDesigner can connect to localhost...

  5. #5
    Sencha - Desktop Packager Dev Team jarrednicholls's Avatar
    Join Date
    Mar 2007
    Location
    Frederick, MD
    Posts
    1,747
    Vote Rating
    7
    jarrednicholls will become famous soon enough jarrednicholls will become famous soon enough

      0  

    Default


    Thanks for the fast reply. Let me try to replicate your issue as your configuration and everything look fine to me.

    In my case, when my JsonStore in ExtDesigner (running on my mac) should connect to http://dev.local/customers.json (which is on 192.168.56.10, a virtbox ubuntu running apache, and GET request with browser works from my mac), does the rule of xdomain references bite me? Or is it supposed to work that way from within ExtDesigner?
    We have xdomain sandboxing disabled, so Ext Designer can communicate to any domain with XHR. So no worries there. It would be a worry though if you were viewing your project in a browser and you were running off of localhost or file:/// and tried to XHR to dev.local.

  6. #6
    Ext JS Premium Member
    Join Date
    Nov 2010
    Posts
    7
    Vote Rating
    0
    mrolli is on a distinguished road

      0  

    Default


    Now, beeing at home, things are clearer (and working .

    I removed all of Ext Designer (/Application/ExtDesigner.app, ~/Library/Application Support/Ext JS, Inc., ~/.config/Ext JS, Inc., ~/Library/Preferences/..?) and reinstalled the app again. Startet up, registered and gave it another try with the jsonStore... and it worked!

    What was the difference? Proxy!

    At work, I had to set the proxy to be able to register the software. Afterwards unsetting the proxy was not possible through the app and removing ~/Library/Application Support/Ext JS, Inc (and backing up the license file and reputting it upon restart) didn't help either.
    After the fresh reinstall at home, setting up the proxy was not needed anymore, registered the software and now it works!

    Don't know why, but the issue is related to the proxy settings.

    Does this help you in anyway to locate the issue?

    Tomorrow at work I'll see if it still works, but it should, as long as I'm only connecting to stuff reachable without having to use the proxy (i.e. http://dev.local).

  7. #7
    Sencha - Desktop Packager Dev Team jarrednicholls's Avatar
    Join Date
    Mar 2007
    Location
    Frederick, MD
    Posts
    1,747
    Vote Rating
    7
    jarrednicholls will become famous soon enough jarrednicholls will become famous soon enough

      0  

    Default


    Yes that makes perfect sense. Unfortunately there is not the ability to alter the whitelist for the proxy...it is hard coded to bypass the proxy for any private IP subnet (class A, B, and C, both IPv4 and IPv6) and localhost. I didn't think to ask about the proxy, so good sleuthing!

    The only workaround I can think of is to 1) use the IP address of the VM directly...the VM will have either a private IP, or if it's setup to be NAT'ed, it'll have its own IP on your network. Or 2), you can edit your hosts file (typically in /etc/hosts) and have localhost point to the VM IP instead of the loopback address (127.0.0.1). Whitelist editing will be a feature in the future.

  8. #8
    Ext JS Premium Member
    Join Date
    Nov 2010
    Posts
    7
    Vote Rating
    0
    mrolli is on a distinguished road

      0  

    Default


    That's what I read too befoer posting here. But actually, my vm has an IP from a private address ranges (192.168.56.10) and address resolution is done with an entry in my /etc/hosts on my mac (192.168.56.10 dev.local). That's why I'm still confused actually. Ext Designer should have bypassed the proxy as far as I understand, shouldn't it?

  9. #9
    Sencha - Desktop Packager Dev Team jarrednicholls's Avatar
    Join Date
    Mar 2007
    Location
    Frederick, MD
    Posts
    1,747
    Vote Rating
    7
    jarrednicholls will become famous soon enough jarrednicholls will become famous soon enough

      0  

    Default


    Quote Originally Posted by mrolli View Post
    Ext Designer should have bypassed the proxy as far as I understand, shouldn't it?
    Negative. What I am suggesting is that you have a url prefix of http://192.168.56.10 instead of http://dev.local. The proxy whitelist looks at the host of the URI to determine if it should go through the proxy or not. So as far as hosts are concerned, dev.local != 192.168.56.10, even if dev.local resolves to that IP.

    Hope that helps.

  10. #10
    Sencha Premium Member
    Join Date
    May 2011
    Posts
    31
    Vote Rating
    1
    freshyseth is on a distinguished road

      0  

    Default Can't use the IP for my dev server

    Can't use the IP for my dev server


    Jarred,

    I'm unable to use the IP address of my dev server. I've uninstalled and reinstalled Ext Designer, but it appeared to retain the license and proxy config info. Can you let me know how we can clear that out or add a whitelisted domain to the proxy configs in Ext Designer?

    Thanks,

    Seth

Similar Threads

  1. Replies: 3
    Last Post: 14 Dec 2010, 10:22 PM
  2. [DUPE-447] Ext.data.TreeStore firing "read" not "load"
    By benwhite in forum Sencha Touch 1.x: Bugs
    Replies: 1
    Last Post: 3 Nov 2010, 1:32 PM
  3. Configuration of JsonReader - root: as the "real root" of data?
    By antonye in forum Ext 3.x: Help & Discussion
    Replies: 2
    Last Post: 21 Jun 2010, 2:47 AM
  4. "datafield" and " radio" with load data in a Form
    By launort in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 10 Aug 2009, 7:03 AM
  5. datastore load error"root is undefined"
    By netbox in forum Ext 2.x: Help & Discussion
    Replies: 5
    Last Post: 17 Mar 2009, 1:39 AM

Thread Participants: 7