Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    Mar 2007
    Posts
    416
    Vote Rating
    18
    jweber will become famous soon enough

      0  

    Default 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:
    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
    Test Case:

    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

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,647
    Vote Rating
    899
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    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
    ________________
    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 in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Mar 2007
    Posts
    416
    Vote Rating
    18
    jweber will become famous soon enough

      0  

    Default


    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.

  4. #4
    Sencha Premium Member
    Join Date
    Apr 2008
    Posts
    269
    Vote Rating
    31
    themightychris has a spectacular aura about themightychris has a spectacular aura about

      0  

    Default


    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
    Chief Architect @ Jarv.us Innovations
    Co-captain @ Code for Philly

    Jarvus builds and optimizes top-quality Sencha Touch and ExtJS apps for open-source projects and clients of all sizes.

    Don't waste time with bugs that have already been found and fixed by the community, compile our tried and tested hotfixes packages into all your projects: https://github.com/JarvusInnovations/sencha-hotfixes

  5. #5
    Sencha User
    Join Date
    Jul 2012
    Posts
    13
    Vote Rating
    1
    axeff is on a distinguished road

      1