Hybrid View
-
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).
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