I've packaged my app into a war (by grails war
), and as I see, it have built all required resources. For example I have coffeescript
code, that have translated to into js
dir. Same for scss
, etc. I mean I have all static resources, that can be served directly (and I want to server it from Nginx, not Tomcat)
But after deploying this war
into Tomcat, I'm getting errors like:
ERROR plugins.DefaultGrailsPluginManager - Error configuring dynamic methods for plugin [resources:1.1.6]: java.lang.NoSuchMethodError: org.mozilla.javascript.Parser.parse(Ljava/io/Reader;Ljava/lang/String;I)Lorg/mozilla/javascript/ScriptOrFnNode;
org.codehaus.groovy.runtime.InvokerInvocationException: java.lang.NoSuchMethodError: org.mozilla.javascript.Parser.parse(Ljava/io/Reader;Ljava/lang/String;I)Lorg/mozilla/javascript/ScriptOrFnNode;
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)
Caused by: java.lang.NoSuchMethodError: org.mozilla.javascript.Parser.parse(Ljava/io/Reader;Ljava/lang/String;I)Lorg/mozilla/javascript/ScriptOrFnNode;
at com.yahoo.platform.yui.compressor.JavaScriptCompressor.parse(JavaScriptCompressor.java:312)
This one is from yui-minify-resources
plugin. Similar thing happening for coffeescript-resources
plugin. Maybe it's because there is something wrong with this plugins, but it's crazy, because I already have all resources, prepared/processed/compiled to static files. I don't need this plugins on production mode.
How I can disable all this resource plugins on production mode? Is it possible?
PS same thing for grails run-war
This is likely due to coffeescript-resources
and yui-minify-resources
both having a dependency to Rhino javascript engine, but the YUI team has made some modifications to their version of Rhino, which causes it to be incompatible with vanilla Rhino. You have two options:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With