PDA

View Full Version : Failed to find file for Ext.util.DelayedTask



NKrishnawat
17 Oct 2012, 3:58 PM
When running sencha compile command and got following error message: Error executing page compilation Failed to find any files for Ext.util.DelayedTask

Here is complete trace:

[INFO ] Compiling page null
[INFO ] Processing classPath entry : C:\Program Files\Apache Software Foundation\apache-tomcat-7.0.23\webapps\wam-bpm-ext\
sencha-compile-temp-dir
[INFO ] Processing classPath entry : ext-4.1.1-gpl
[INFO ] Processing classPath entry : app
[INFO ] Processing class inheritance graph
[INFO ] Processing instantiation refereces to classes and aliases
[INFO ] Processing source dependencies
[ERROR] Failed to find file for Ext.util.DelayedTask
required by C:\Program Files\Apache Software Foundation\apache-tomcat-7.0.23\webapps\wam-bpm-ext\ext-4.1.1-gpl\ext-all-debug-w-co
mments.js
[ERROR] Error executing page compilation Failed to find any files for Ext.util.DelayedTask
[ERROR] com.sencha.exceptions.ExBuild: Failed to find any files for Ext.util.DelayedTask

mitchellsimoens
23 Oct 2012, 7:39 AM
Are you using 4.1.1a or just 4.1.1? To use Cmd you need to use 4.1.1a

NKrishnawat
23 Oct 2012, 9:22 AM
Thanks for response, I changed to 4.1.1a, but when I run the command to create single js app (minified app) I get following exception:


C:\Program Files\Apache Software Foundation\apache-tomcat-7.0.23\webapps\wam-bpm-ext>C:\software\Sencha\Cmd\3.0.0.190\sencha compi
le -classpath=extjs/src,app,. page -yui -in index.html -out build/index.html
Sencha Cmd v3.0.0.190
[INFO ] Compiling page null
[INFO ] Processing classPath entry : C:\Program Files\Apache Software Foundation\apache-tomcat-7.0.23\webapps\wam-bpm-ext\
sencha-compile-temp-dir
[INFO ] Processing classPath entry : extjs\src
[INFO ] Processing classPath entry : app
[INFO ] Processing classPath entry : .
[INFO ] Processing classPath entry : C:\Program Files\Apache Software Foundation\apache-tomcat-7.0.23\webapps\wam-bpm-ext\
app
[INFO ] Processing class inheritance graph
[INFO ] Processing instantiation refereces to classes and aliases
[INFO ] Processing source dependencies
[ERROR] Circular requires reference :
C:\Program Files\Apache Software Foundation\apache-tomcat-7.0.23\webapps\wam-bpm-ext\extjs\src\AbstractComponent.js ->
C:\Program Files\Apache Software Foundation\apache-tomcat-7.0.23\webapps\wam-bpm-ext\.\extjs\ext-all.js ->
C:\Program Files\Apache Software Foundation\apache-tomcat-7.0.23\webapps\wam-bpm-ext\extjs\src\core\src\Support.js ->
C:\Program Files\Apache Software Foundation\apache-tomcat-7.0.23\webapps\wam-bpm-ext\.\extjs\ext.js ->
C:\Program Files\Apache Software Foundation\apache-tomcat-7.0.23\webapps\wam-bpm-ext\extjs\src\core\src\perf\Monitor.js ->
C:\Program Files\Apache Software Foundation\apache-tomcat-7.0.23\webapps\wam-bpm-ext\extjs\src\core\src\util\DelayedTask.js ->
C:\Program Files\Apache Software Foundation\apache-tomcat-7.0.23\webapps\wam-bpm-ext\extjs\src\core\src\util\DelayedTask.js
[ERROR] Error executing page compilation com.sencha.exceptions.BasicException: com.sencha.exceptions.BasicException: com.s
encha.exceptions.BasicException: com.sencha.exceptions.ExCircularReference: Circular requires reference for file C:\Program Files\
Apache Software Foundation\apache-tomcat-7.0.23\webapps\wam-bpm-ext\extjs\src\core\src\util\DelayedTask.js
[ERROR] com.sencha.exceptions.BasicException: com.sencha.exceptions.BasicException: com.sencha.exceptions.BasicException:
com.sencha.exceptions.BasicException: com.sencha.exceptions.ExCircularReference: Circular requires reference for file C:\Program F
iles\Apache Software Foundation\apache-tomcat-7.0.23\webapps\wam-bpm-ext\extjs\src\core\src\util\DelayedTask.js


Am I missing something.

dongryphon
25 Oct 2012, 12:03 AM
Can you post your index.html? I have my suspicions ;)

NKrishnawat
25 Oct 2012, 9:23 AM
Project Structure is like this:

/wam-bpm-ext
/app

/model
/view
/controller
/store

/css
/extjs

/resources
/bootstrap.js
........more extjs files at this level.......

/icons
/WEB-INF
/images
global.js
Common-util.js
Application.js
Sharepoint.js
index.html
..........other js files.............



index.html is as follows:



<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="shortcut icon" href="/icons/favicon.ico" type="image/x-icon" />
<title>Account Transitions</title>
<link rel="stylesheet" type="text/css" href="css/bpm-ext-style.css"/>
<link rel="stylesheet" type="text/css" href="extjs/resources/css/ext-all.css"/>
<link rel="stylesheet" type="text/css" href="style.css"/>
<link rel="stylesheet" type="text/css" href="ux/css/BoxSelect.css" />
<link rel="stylesheet" type="text/css" href="ux/css/ItemSelector.css" />
<link rel="stylesheet" type="text/css" href="ux/css/CheckHeader.css">
<script type="text/javascript" src="extjs/ext-all-debug.js"></script>
<script type="text/javascript" src="/extjs/ext3-compat.js"></script-->
<script type="text/javascript" src="ux/swfobject/swfobject.js"></script>
<script type="text/javascript" src="ux/exporter/downloadify.min.js"></script>
<script type="text/javascript" src="Common-util.js"></script>
<script type="text/javascript">
Ext.Loader.setConfig({enabled: true});
Ext.Loader.setPath('Ext.ux', 'ux');
Ext.require([
'Ext.form.Panel',
'Ext.ux.form.MultiSelect',
'Ext.ux.form.ItemSelector',
'Ext.ux.grid.Printer',
'Ext.ux.exporter.Exporter',
'Ext.ux.CheckColumn'
]);
</script>
<script type="text/javascript" src="data/UrlParam.js"></script>
<script type="text/javascript" src="ux/form/ItemSelector.js"></script> -->
<script type="text/javascript" src="ux/miframe/ManagedIframe.js"></script>
<script type="text/javascript" src="ux/src/BoxSelect.js"></script>
<script type="text/javascript" src="coach20.js"></script>
<script type="text/javascript" src="global.js"></script>
<script type="text/javascript" src="Application.js"></script>
<script type="text/javascript" src="sharepoint.js"></script>
</head>
<body>
<div id="loading">
<div id="loadingMessage" class="loading-indicator">Loading...</div>
</div>
<div id="renderhere"></div>
<div id="itemselector" class="demo-ct"></div>
</body>
</html>

dongryphon
25 Oct 2012, 10:32 PM
I see. So there is some stuff to understand about the compiler's page command. This is described here:

http://docs.sencha.com/ext-js/4-1/#!/guide/command_app_single

The key idea is to ensure that "bootstrap" files are excluded while the files you want combined are combined and their individual script tags removed.

This is accomplished with this structure:



<!-- <x-compile> -->
<!-- <x-bootstrap> -->
<script src="ext/ext-dev.js" type="text/javascript"></script>
<!-- </x-bootstrap> -->

<script src="app.js" type="text/javascript"></script>
<!-- </x-compile> -->


The x-compile section is what tells the compiler what it should replace with the "all-classes.js" script tag. The script tags in this section are processed as required and then whatever they require as well to produce all-class.js. But it also needs to ignore some files that are intended for development mode only. So these are placed in the x-bootstrap inner section.

As you have a lot of script tags there, you will have to see whether or not you can combine them all in the x-compile section. I would start with something small in x-compile (like above) and add scripts back.

The ext-all-debug.js file is the one that certainly should not be in the x-compile section instead maybe in the x-bootstrap section, more like the above. If you just put that file in the x-compile you will be getting 100% of the framework in your build.

I would recommend, though it "should work" as you have it, to put code in JS files and not in the markup file. Dealing with "naked" script in the compiler is a bit special. Especially if that code makes Loader calls.