yui / yuicompressor

YUI Compressor
http://yui.github.com/yuicompressor/
Other
3.01k stars 664 forks source link

Error while Trying Minfiy Javascript using YUI compressor #283

Open axp235 opened 7 years ago

axp235 commented 7 years ago

java.lang.IllegalAccessError: tried to access class org.mozilla.javascript.DefaultErrorReporter from class org.mozilla.javascript.CompilerEnvirons at org.mozilla.javascript.CompilerEnvirons.(CompilerEnvirons.java:48) at com.yahoo.platform.yui.compressor.JavaScriptCompressor.parse(JavaScriptCompressor.java:312) at com.yahoo.platform.yui.compressor.JavaScriptCompressor.(JavaScriptCompressor.java:536) at com.metrosix.yuicompressor.anttask.YuiCompressorTask.compressJs(YuiCompressorTask.java:246) at com.metrosix.yuicompressor.anttask.YuiCompressorTask.compressFile(YuiCompressorTask.java:202) at com.metrosix.yuicompressor.anttask.YuiCompressorTask.execute(YuiCompressorTask.java:167) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.Target.execute(Target.java:392) at org.apache.tools.ant.Target.performTasks(Target.java:413) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399) at org.apache.tools.ant.Project.executeTarget(Project.java:1368) at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) at org.apache.tools.ant.Project.executeTargets(Project.java:1251) at org.apache.tools.ant.Main.runBuild(Main.java:811) at org.apache.tools.ant.Main.startAnt(Main.java:217) at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280) at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)

Chris2011 commented 7 years ago

Please attach your script, which you wanted to minify. Without any source, how do you think is it reproducable? Thx.

axp235 commented 7 years ago

We don't have one file we have 500 JS files and some and we see the same issue with different apps we maintain I don't think giving out our source code is not an option and doesn't look to be the cause the one file is causing the issue. We see that as some missing configuration and seeking help. Thank you

Chris2011 commented 7 years ago

So how can we reproduce it? It is only an error that you provided. Please provide some minimal example source, where you can reproduce the problem. Otherwise I think the owner of this repo will close the issue, because of less information. Thx.

bardware commented 7 years ago

java.lang.IllegalAccessError: tried to access class org.mozilla.javascript.DefaultErrorReporter from class org.mozilla.javascript.CompilerEnvirons

How do you call the compressor? DefaultErrorReporter is an interface. You have to somehow provide a class when you call the compressor.

worstenbrood commented 6 years ago

try to compress eg. jquery.js, spawns alot of syntax errors