4
votes

I'm trying to sencha app build with Sencha CMD 6.1.1.76 but I'm getting:

BUILD FAILED
[ERR] java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
[ERR]   at com.sencha.command.BasePluginCommands$BasePluginCommand.doExecute(BasePluginCommands.java:97
[ERR] )

and not much else : /

this project was previously built using 6.0.0.92

enter image description here

but I don't see that specific one on sencha's cdn http://cdn.sencha.com/cmd/6.0.2.14/release-notes.html

I don't think I'm the only one with this issue: https://www.sencha.com/forum/showthread.php?309457-IndexOutOfBoundsException-when-running-sencha-app-build-testing&p=1131708#post1131708

Has anyone been able to overcome this issue ?

running sencha app upgrade is of no help, ExtJs 5.0 is using in this project.

Also I get a different exception but the same task originates it (slice-images within slice-impl.xml)

[ERR] BUILD FAILED
[ERR] com.sencha.exceptions.BasicException: Java heap space
[ERR]   at com.sench
[ERR] a.cli.Command.dispatch(Command.java:43)
[ERR] 
[ERR] Total time: 30 seconds
[ERR] The following error occurred while executing this line:
/Users/code4jhon/thellookingglass-git/.sencha/app/build-impl.xml:335: The following error occurred while executing this line:
/Users/code4jhon/thellookingglass-git/.sencha/app/slice-impl.xml:370: The following error occurred while executing this line:
/Users/code4jhon/thellookingglass-git/.sencha/app/slice-impl.xml:371: The following error occurred while executing this line:
/Users/code4jhon/thellookingglass-git/.sencha/app/slice-impl.xml:240: com.sencha.exceptions.BasicException: Java heap space

I have tried increasing the heap size on some configuration files but no luck.

2

2 Answers

4
votes

So this is the workaround I found in order to be able to:

a) generate the css file on the build process

b) run all the other tasks from the build process.

Ultimately I found that the line causing this issue was:

ext.dir=${workspace.dir}/ext

that was on

.sencha/workspace/sencha.cfg

After removing that line I was able to run sencha app build and generate the proper css file.

And the index and resources on the production folder looked good but I got some issues on the regular index ... wrong references etc so looks like I needed that configuration.

ext.dir=${workspace.dir}/ext

So to overcome this I just backed up my .css file and then set:

#comment out this line
#ext.dir=${workspace.dir}/ext

skip.slice=1

in .sencha/app/sencha.cfg

This is the only way I have found to:

1 build the project

2 update the .css with a different theme.

UPDATE

This is generating an 'extjs trial' water mark on the components so it is not useful ...

1
votes

What I usually do in cases where I'm using an older version of the framework is install the corresponding Sencha Cmd version.

In this case the Sencha Cmd version 6.0.0.92 is probably a beta version as is seen in the release notes:

Release Notes for Sencha Cmd 6.0.0 Beta

Date: May 22, 2015

Version Number: 6.0.0.154

So this is probably going to be difficult.

Is it possible to run sencha app upgrade --noframework. I know it is a ExtJS 5 application, but this only updates the Sencha Cmd configuration files. You can merge your changes easily afterwards and with some luck it'll work with Sencha Cmd 6.1.x.

If this doesn't work, please run sencha -d app build. This will generate an enormous amount of information, but it might give some hints to the exact cause. You can use sencha -d app build >build.log to create a log file.

Good luck, Sencha Cmd problems can be difficult to debug.