这是一个错误的资产:在Symfony2中转储。
[Assetic\Exception\FilterException]
An error occurred while running:
'/usr/bin/java' '-jar' '/path/to/java/yuicompressor-2.4.8.jar' '--charset' 'UTF-8' '-o' '/tmp/YUI-OUT-NynbGd' '--type' 'js' '/tmp/YUI-IN-2GZ9rr'
Error Output:
Exception in thread "main" java.lang.reflect.InvocationTargetException
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:606)
at com.yahoo.platform.yui.compressor.Bootstrap.main(Bootstrap.java:21)
Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.rangeCheck(ArrayList.java:635)
at java.util.ArrayList.get(ArrayList.java:411)
at com.yahoo.platform.yui.compressor.JavaScriptCompressor.getToken(JavaScriptCompressor.java:578)
at com.yahoo.platform.yui.compressor.JavaScriptCompressor.printSymbolTree(JavaScriptCompressor.java:1094)
at com.yahoo.platform.yui.compressor.JavaScriptCompressor.compress(JavaScriptCompressor.java:556)
at com.yahoo.platform.yui.compressor.YUICompressor.main(YUICompressor.java:186)
... 5 more
Input:
我认为错误是脚本的某个地方。
我该如何识别错误点?
答案 0 :(得分:0)
在大多数情况下,问题是由参数或路径引起的。我之前遇到过与资产类似的问题,然后我设法使用:
来解决它通常你必须使用assetic.java.bin或assetic.filter.yui_js.jar
编辑:看起来您忘记设置yui压缩器路径:" /path/to/java/yuicompressor-2.4.8.jar"