-
15 Jan 2011 10:52 AM #1
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
-
19 Jan 2011 2:50 AM #2
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
-
19 Jan 2011 5:49 AM #3Sencha - Desktop Packager Dev Team
- Join Date
- Mar 2007
- Location
- Baltimore, MD.
- Posts
- 1,745
- Vote Rating
- 5
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"?
-
19 Jan 2011 5:59 AM #4
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
URL Prefix: http://dev.local/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();
customers.json Content:
Error message when clicking "Load Data" on JsonStore:Code:{ customers: [ {name: "Bradley Banks", age: 36, zip: "10573"}, {name: "Sarah Carlson", age: 59, zip: "48075"}, {name: "Annmarie Wright", age: 53, zip: "48226"} ] }
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...
-
19 Jan 2011 6:03 AM #5Sencha - Desktop Packager Dev Team
- Join Date
- Mar 2007
- Location
- Baltimore, MD.
- Posts
- 1,745
- Vote Rating
- 5
Thanks for the fast reply. Let me try to replicate your issue as your configuration and everything look fine to me.
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.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?
-
19 Jan 2011 9:23 AM #6
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).
-
19 Jan 2011 9:32 AM #7Sencha - Desktop Packager Dev Team
- Join Date
- Mar 2007
- Location
- Baltimore, MD.
- Posts
- 1,745
- Vote Rating
- 5
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.
-
19 Jan 2011 9:46 AM #8
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?
-
19 Jan 2011 9:49 AM #9Sencha - Desktop Packager Dev Team
- Join Date
- Mar 2007
- Location
- Baltimore, MD.
- Posts
- 1,745
- Vote Rating
- 5
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.
-
23 Sep 2011 6:11 AM #10
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
-
How do Ext.form.Combo could accepts data begin/end with "<" and/or ">" char ?
By soulgen in forum Ext 3.x: Help & DiscussionReplies: 3Last Post: 14 Dec 2010, 10:22 PM -
[DUPE-447] Ext.data.TreeStore firing "read" not "load"
By benwhite in forum Sencha Touch 1.x: BugsReplies: 1Last Post: 3 Nov 2010, 1:32 PM -
Configuration of JsonReader - root: as the "real root" of data?
By antonye in forum Ext 3.x: Help & DiscussionReplies: 2Last Post: 21 Jun 2010, 2:47 AM -
"datafield" and " radio" with load data in a Form
By launort in forum Ext 2.x: Help & DiscussionReplies: 0Last Post: 10 Aug 2009, 7:03 AM -
datastore load error"root is undefined"
By netbox in forum Ext 2.x: Help & DiscussionReplies: 5Last Post: 17 Mar 2009, 1:39 AM


Reply With Quote