1

在构建煎茶触摸项目时,我遇到了错误[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. 在以下配置中测试。

  • 机器 1
    • 煎茶 CMD 3.1.2.342
    • Java 1.6
    • 32 位 Fedora 12
    • 构建失败
  • 机器 2
    • 煎茶 CMD 3.1.2.342
    • Java 1.6
    • 32 位 Fedora 15
    • 构建通行证
  • 机器 3
    • 煎茶 CMD 3.0.0
    • Java 1.6
    • 64 位 Ubuntu 12.04
    • 构建通行证

我正在使用 Sencha CMD.jsb3仅使用文件进行构建。

失败的原因可能是什么?

4

1 回答 1

1

问题已解决。这就是我所做的。

  1. 重新安装或antjava。请注意,我从一开始就使用 OpenJDK,而不是 Sun Java。所以安装 Sun Java 可能是一个不错的选择。
  2. 将整机更新到最新的软件包。(对于 Fedora 它yum update和对于 Ubuntu 它apt-get upgrade
于 2013-07-02T20:41:31.930 回答