2

Hi I am trying to learn and getting started with ExtJS (from here). but seems either I am missing something, or bugged by some issue here. Whenever I am trying to execute first basic simple command: sencha generate app -ext Myapp ./app its failed with below exceptions:

Sencha Cmd v5.0.0.160
[ERR] java.lang.NullPointerException
 at javax.xml.bind.DatatypeConverter.printBase64Binary(DatatypeConverter.java:547)
 at com.sencha.util.StringUtil.toBase64(StringUtil.java:202)
 at com.sencha.tools.generator.DataStoreImpl.get(DataStoreImpl.java:103)
 at com.sencha.tools.generator.Generator$1.doMerge(Generator.java:464)
 at com.sencha.tools.generator.Generator$Mode$3.dispatch(Generator.java:269)
 at com.sencha.tools.generator.Generator.generateFileToFile(Generator.java:449)
 at com.sencha.tools.generator.Generator.generateFileToDir(Generator.java:441)
 at com.sencha.tools.generator.Generator.generateDirToDir(Generator.java:434)
 at com.sencha.tools.generator.Generator.generateDirToDir(Generator.java:429)
 at com.sencha.tools.generator.Generator.generate(Generator.java:148)
 at com.sencha.tools.pkg.LocalRepository.init(LocalRepository.java:130)
 at com.sencha.tools.pkg.LocalRepository.init(LocalRepository.java:184)
 at com.sencha.command.environment.WorkspaceRepository.getLocalRepository(WorkspaceRepository.java:274)
 at com.sencha.command.environment.FrameworkEnvironment.loadFrameworkPackage(FrameworkEnvironment.java:180)
 at com.sencha.command.generator.GeneratorCommands$WorkspaceCommand.getParameters(GeneratorCommands.java:146)
 at com.sencha.command.BasePluginCommands$BasePluginCommand.doExecute(BasePluginCommands.java:26)
 at com.sencha.command.generator.GeneratorCommands$WorkspaceCommand.execute(GeneratorCommands.java:116)
 at com.sencha.command.generator.GeneratorCommands$AppCommand.generateWorkspace(GeneratorCommands.java:468)
 at com.sencha.command.generator.GeneratorCommands$AppCommand.execute(GeneratorCommands.java:313)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
 at java.lang.reflect.Method.invoke(Unknown Source)
 at com.sencha.util.MethodInvoker$Arguments.invoke(MethodInvoker.java:175)
 at com.sencha.cli.Command.dispatch(Command.java:43)
 at com.sencha.cli.Commands.dispatch(Commands.java:64)
 at com.sencha.cli.Commands.dispatch(Commands.java:64)
 at com.sencha.command.Sencha.dispatch(Sencha.java:71)
 at com.sencha.command.Sencha.main(Sencha.java:139)

When I am trying to execute sencha generate app MyApp ./app is throws below exception:

Sencha Cmd v5.0.0.160 
[ERR] Unable to locate 'framework.dir' property from sencha.cfg and no framework directory specified
[ERR] Please ensure this command was executed from a valid framework directory
[ERR] No Framework specified  

What is framework.dir here ? I have downloaded Sencha ExtJS v5.0.0 as well, do I need to keep it somewhere ?

Update
After running sencha -sdk /path/to/extjs-5.0.0 generate app MyApp ./app giving same result, saying repo is not initialized properly.

I have installed both Ruby v1.9.3 and Sencha Cmd v5.0.0.160 which you can see on top of exception above. any idea how to resolve this ?

Community
  • 1
  • 1
Aman Gupta
  • 5,548
  • 10
  • 52
  • 88

2 Answers2

1

You must either run Sencha Cmd from the directory where you installed ext or you must give it path to where Ext is installed.

This should work:

sencha -sdk /path/to/ext/ generate app MyApp /where/you/want/the/app
Saki
  • 5,827
  • 2
  • 15
  • 15
  • Something very weird, I had no choice than hard reset/format my desktop machine !! :( **after that everything working smoothly..!!** if any one knows the exact root cause, please share it. – Aman Gupta Jun 18 '14 at 10:01
1

To avoid any confusion just pass full path of "sencha cmd", "sencha sdk" and your desired application target directory.

Like

/Users/vishnu/bin/Sencha/Cmd/5.1.0.26/sencha -sdk /Users/vishnu/Documents/senchaworkspace/ext-5.0.1 generate app TutorialApp /Users/vishnu/Documents/senchaworkspace/TutorialApp

This works for me perfectly

Vishnu
  • 3,899
  • 2
  • 18
  • 19
  • Yes You are right. There was some weird issue with my machine, I had to hard reset it in order to get it worked properly. – Aman Gupta Dec 27 '14 at 15:27