简体   繁体   English

运行yuicompressor时出现Java错误

[英]Java error when running yuicompressor

I'm running the YUI compressor jar fine on my local dev server, but on the web server I'm getting this error: 我在本地开发服务器上运行YUI压缩器jar很好,但是在Web服务器上却遇到此错误:

Fatal error: Uncaught exception 'Assetic\Exception\FilterException' 
with message 'An error occurred while running: 
'/usr/bin/java' '-jar' 
'/path/to/includes/resources/java/yuicompressor-2.4.6.jar' 
'-o' '/tmp/YUI-OUT-FGs8hh' '--type' 'js' '/tmp/YUI-IN-54MHwK' 
Error Output: Exception in thread "main" java.lang.NullPointerException 
at java.lang.VMClassLoader.defineClass(libgcj.so.10) at 
java.lang.ClassLoader.defineClass(libgcj.so.10) at 
java.security.SecureClassLoader.defineClass(libgcj.so.10) at 
java.net.URLClassLoader.findClass(libgcj.so.10) at 
gnu.gcj.runtime.SystemClassLoader.findClass(libgcj.so.10) at 
java.lang.ClassLoader.loadClass(libgcj.so.10) at 
java.lang.ClassLoader.loadClass(libgcj.so.10) at 
gnu.java.lang.MainThread.run(libgcj.so.10) 
Input: /*! * jQuery JavaScript Library v1.7.2 * 
http://jquery.com/ * * Copyright 2011, John Resig * 
Dual licensed under the MIT or GPL Version 2 licenses. * 
http://jquery.org/license * * Incl in 
/path/to/includes/modules/Assetic/Exception/FilterException.php 
on line 40

I already checked with the server support, and they said to contact the developers. 我已经检查了服务器支持,他们说要与开发人员联系。 Any clue as to what this might be? 关于这可能是什么线索? I've also posted on Github, but no luck. 我也张贴在Github上,但是没有运气。

This is the Java version: 这是Java版本:

# java -version
java version "1.6.0_37"
Java(TM) SE Runtime Environment (build 1.6.0_37-b06)
Java HotSpot(TM) Server VM (build 20.12-b01, mixed mode)

See this similar thread or this discussion - basically, you should contact your server support to change their java runtime environment to be something proper instead of GCJ. 请参阅类似的主题讨论 -基本上,您应该与服务器支持联系以将其Java运行时环境更改为适当的东西,而不是GCJ。 Using a regular JDK would solve this. 使用常规的JDK将解决此问题。

If they insist on using GCJ, they at least need to fix it to be runnable. 如果他们坚持使用GCJ,则至少需要修复它以使其可运行。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM