-
16 Oct 2012 8:50 AM #1
Build error: "failed to find meta class definition for name reader.null"
Build error: "failed to find meta class definition for name reader.null"
REQUIRED INFORMATION
Ext version tested:- Sencha Touch 2.1rc2
Browser versions tested against:- N/A
DOCTYPE tested against:- N/A
Description:- I have a custom proxy, which uses a custom reader. In my store, I use this custom proxy, and configure some values for the custom reader. This was working before 2.1rc1. But now, it fails unless I add a "type: 'myreader'" to the store's "reader" config. That seems a little redundant, since myproxy already defaults to using myreader.
Steps to reproduce the problem:- Create an app that uses the code below, and run "sencha app build production"
The result that was expected:- Builds successfully
The result that occurs instead:
Test Case:Code:[INFO ] Compiling app.js and dependencies [INFO ] Processing classPath entry : /project/sencha-compile-temp-dir [INFO ] Processing classPath entry : /project/touch/src [INFO ] Processing classPath entry : /project/app.js [INFO ] Processing classPath entry : /project/MyAppDir [INFO ] Processing classPath entry : /project/lib [WARN ] [ [1000] : Yui Compressor Warning <> Trailing comma is not legal in an ECMA-262 object initializer => }, function() { ] :: ( /project/touch/src/app/Controller.js => 625 : 1 ) [ERROR] def was null [ERROR] failed to find meta class definition for name reader.null [ERROR] Exception running app build : JavaException: com.sencha.exceptions.BasicException: null [ERROR] javax.script.ScriptException: sun.org.mozilla.javascript.internal.JavaScriptException: [object Error] (<Unknown source>#709) in <Unknown source> at line number 709
Code:Ext.define('MyProxy', { extend: 'Ext.data.proxy.Ajax', requires: ['MyReader'], alias: 'proxy.myproxy', config: { reader: { type: 'myreader' } } }); Ext.define('MyStore', { extend: 'Ext.data.Store', requires: ['MyProxy'], config: { proxy: { type: 'myproxy', reader: { rootProperty: 'myRoot' } } } });
HELPFUL INFORMATION
Screenshot or Video:- N/A
See this URL for live test case: N/A
Debugging already done:- none
Possible fix:- It works if you add "type: 'myreader'" to the reader config.
Additional CSS used:- only default ext-all.css
Operating System:- Mac OS 10.8.1
-
16 Oct 2012 12:21 PM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 34,085
- Vote Rating
- 453
This is due to the reader config from the store overwriting the reader config on the proxy. This wouldn't be hard to merge the two but the downside is we would have to do this on all configs which could break code (code expectations) and also cause perf issues.
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
16 Oct 2012 12:24 PM #3
I don't have a strong preference either way....just thought I'd report it, since I'm pretty sure it used to work on ST 2.0.
-
22 Oct 2012 11:31 PM #4
I've run into the same error and merging reader configs isn't the solution -- proxy.defaultReaderType and defaultWriterType aren't being honored even when they aren't overridden.
Also, this error about unknown meta class definition should cite the class/file where it's encountered if possible
-
9 Nov 2012 7:28 AM #5
Thank you for reporting this bug. We will make it our priority to review this report.


Reply With Quote