Search code examples
extjssencha-cmdsencha-command

Sencha CMD, upgrading from 6.0 to 6.1 IndexOutOfBoundsException


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.


Solution

  • 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 ...