在构建sencha touch项目时,我遇到错误[ERR] Failed to compress input
。所以我用-d
(调试)标志重新编译它,输出如下。
[DBG] Load url is file:/opt/Sencha/Cmd/3.1.2.342/lib/yuicompressor-2.4.7.jar
[ERR] Failed to compress input
at com.sencha.tools.compressors.yui.YuiJavascriptCompressor.runYuiCompressor(YuiJavascriptCompressor.java:149)
at com.sencha.tools.compressors.yui.YuiJavascriptCompressor.compress(YuiJavascriptCompressor.java:160)
at com.sencha.tools.compressors.yui.YuiJavascriptCompressor.compress(YuiJavascriptCompressor.java:170)
at com.sencha.tools.compiler.jsb.projects.Project.compressTarget(Project.java:130)
at com.sencha.tools.compiler.jsb.projects.Target.afterCreate(Target.java:135)
at com.sencha.tools.compiler.jsb.projects.Build.afterCreate(Build.java:103)
at com.sencha.tools.compiler.jsb.projects.Target.create(Target.java:79)
at com.sencha.tools.compiler.jsb.projects.Project.createBuilds(Project.java:103)
at com.sencha.tools.compiler.jsb.projects.Project.build(Project.java:89)
at com.sencha.tools.compiler.jsb.projects.JsbBuilder.processBuild(JsbBuilder.java:57)
at com.sencha.command.build.JsbCommand.execute(JsbCommand.java:15)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at com.sencha.util.MethodInvoker$Arguments.invoke(MethodInvoker.java:174)
at com.sencha.cli.Command.dispatch(Command.java:42)
at com.sencha.cli.Commands.dispatch(Commands.java:62)
at com.sencha.command.Sencha.dispatch(Sencha.java:78)
at com.sencha.command.Sencha.main(Sencha.java:141)
Caused by: java.lang.reflect.InvocationTargetException
at com.sencha.util.ReflectionUtil.newInstance(ReflectionUtil.java:120)
at com.sencha.tools.compressors.yui.YuiJavascriptCompressor.runYuiCompressor(YuiJavascriptCompressor.java:114)
at com.sencha.tools.compressors.yui.YuiJavascriptCompressor.compress(YuiJavascriptCompressor.java:160)
at com.sencha.tools.compressors.yui.YuiJavascriptCompressor.compress(YuiJavascriptCompressor.java:170)
at com.sencha.tools.compiler.jsb.projects.Project.compressTarget(Project.java:130)
at com.sencha.tools.compiler.jsb.projects.Target.afterCreate(Target.java:135)
at com.sencha.tools.compiler.jsb.projects.Build.afterCreate(Build.java:103)
at com.sencha.tools.compiler.jsb.projects.Target.create(Target.java:79)
at com.sencha.tools.compiler.jsb.projects.Project.createBuilds(Project.java:103)
at com.sencha.tools.compiler.jsb.projects.Project.build(Project.java:89)
at com.sencha.tools.compiler.jsb.projects.JsbBuilder.processBuild(JsbBuilder.java:57)
at com.sencha.command.build.JsbCommand.execute(JsbCommand.java:15)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at com.sencha.util.MethodInvoker$Arguments.invoke(MethodInvoker.java:174)
at com.sencha.cli.Command.dispatch(Command.java:42)
at com.sencha.cli.Commands.dispatch(Commands.java:62)
at com.sencha.command.Sencha.dispatch(Sencha.java:78)
at com.sencha.command.Sencha.main(Sencha.java:141)
Caused by: null
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
at com.sencha.util.ReflectionUtil.newInstance(ReflectionUtil.java:116)
at com.sencha.tools.compressors.yui.YuiJavascriptCompressor.runYuiCompressor(YuiJavascriptCompressor.java:114)
at com.sencha.tools.compressors.yui.YuiJavascriptCompressor.compress(YuiJavascriptCompressor.java:160)
at com.sencha.tools.compressors.yui.YuiJavascriptCompressor.compress(YuiJavascriptCompressor.java:170)
at com.sencha.tools.compiler.jsb.projects.Project.compressTarget(Project.java:130)
at com.sencha.tools.compiler.jsb.projects.Target.afterCreate(Target.java:135)
at com.sencha.tools.compiler.jsb.projects.Build.afterCreate(Build.java:103)
at com.sencha.tools.compiler.jsb.projects.Target.create(Target.java:79)
at com.sencha.tools.compiler.jsb.projects.Project.createBuilds(Project.java:103)
at com.sencha.tools.compiler.jsb.projects.Project.build(Project.java:89)
at com.sencha.tools.compiler.jsb.projects.JsbBuilder.processBuild(JsbBuilder.java:57)
at com.sencha.command.build.JsbCommand.execute(JsbCommand.java:15)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at com.sencha.util.MethodInvoker$Arguments.invoke(MethodInvoker.java:174)
at com.sencha.cli.Command.dispatch(Command.java:42)
at com.sencha.cli.Commands.dispatch(Commands.java:62)
at com.sencha.command.Sencha.dispatch(Sencha.java:78)
at com.sencha.command.Sencha.main(Sencha.java:141)
Caused by: null
at com.yahoo.platform.yui.compressor.JavaScriptCompressor.printSourceNumber(JavaScriptCompressor.java:299)
at com.yahoo.platform.yui.compressor.JavaScriptCompressor.parse(JavaScriptCompressor.java:336)
at com.yahoo.platform.yui.compressor.JavaScriptCompressor.<init>(JavaScriptCompressor.java:533)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
at com.sencha.util.ReflectionUtil.newInstance(ReflectionUtil.java:116)
at com.sencha.tools.compressors.yui.YuiJavascriptCompressor.runYuiCompressor(YuiJavascriptCompressor.java:114)
at com.sencha.tools.compressors.yui.YuiJavascriptCompressor.compress(YuiJavascriptCompressor.java:160)
at com.sencha.tools.compressors.yui.YuiJavascriptCompressor.compress(YuiJavascriptCompressor.java:170)
at com.sencha.tools.compiler.jsb.projects.Project.compressTarget(Project.java:130)
at com.sencha.tools.compiler.jsb.projects.Target.afterCreate(Target.java:135)
at com.sencha.tools.compiler.jsb.projects.Build.afterCreate(Build.java:103)
at com.sencha.tools.compiler.jsb.projects.Target.create(Target.java:79)
at com.sencha.tools.compiler.jsb.projects.Project.createBuilds(Project.java:103)
at com.sencha.tools.compiler.jsb.projects.Project.build(Project.java:89)
at com.sencha.tools.compiler.jsb.projects.JsbBuilder.processBuild(JsbBuilder.java:57)
at com.sencha.command.build.JsbCommand.execute(JsbCommand.java:15)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at com.sencha.util.MethodInvoker$Arguments.invoke(MethodInvoker.java:174)
at com.sencha.cli.Command.dispatch(Command.java:42)
at com.sencha.cli.Commands.dispatch(Commands.java:62)
at com.sencha.command.Sencha.dispatch(Sencha.java:78)
at com.sencha.command.Sencha.main(Sencha.java:141)
同样的代码建立在每台其他机器上。我正在使用Sencha Cmd v3.1.2.342
。
测试了以下配置。
我正在使用Sencha CMD仅使用.jsb3
文件进行构建。
失败的原因是什么?
答案 0 :(得分:1)
问题是解决的。这就是我做的。
ant
和java
。注意,而不是Sun Java,我从一开始就使用OpenJDK。因此,安装Sun Java可能是一个不错的选择。yum update
,Ubuntu为apt-get upgrade
)