Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

In unobfuscated code run mode, smartgwt application crashes at Datasource.js

$
0
0
In smartgwt 3.0, when the application is run with debug modules, the application crashes on boot up. The console shows, at Datasource.js - line number 2918, it breaks saying,
"Uncaught TypeError: Object#<Object> has no method "Schema".
The function code from Datasource.js is reproduced here:
Code:

registerDataSource : function (dataSource) {
        //>DEBUG
        if (this.logIsInfoEnabled()) {
            this.logInfo("Registered new isc.DataSource '" + dataSource.ID + "'");
        }
        //<DEBUG
        if (dataSource.ID) {
            var existingDS = this._dataSources[dataSource.ID];
            // overwrite any existing registered DataSource, unless we have a schemaNamespace.
            // This avoids XMLSchema-derived Schema cloberring ordinary DataSources, since
            // XMLSchema-derived DataSources can be looked up via other means
            // (SchemaSet.getSchema())
            if (!existingDS || !dataSource.schemaNamespace) {
                this._dataSources[dataSource.ID] = dataSource;
            }
        }
        //the error is thrown here
        if (isc.Schema && isc.isA.Schema(dataSource)) {
            if (isc.isAn.XSElement(dataSource)) this._elements[dataSource.ID] = dataSource;
            else if (isc.isAn.XSComplexType(dataSource)) this._types[dataSource.ID] = dataSource;
            return;
        }

Datasources used in our projects are manually constructed at smartgwt layer and no datasource derives its schema from xsd files.
i am very surprised, why this crash is happening at the boot up time?

Viewing all articles
Browse latest Browse all 4756

Trending Articles