Groovy older version in Grails war -
for reason, 'grails war' including in "web-inf/lib" 'groovy-1.6.9.jar' , 'groovy-all-1.7.8.jar' files. i'm working grails 1.3.7 , when deploy war in tomcat, receive following error:
org.springframework.beans.factory.beancreationexception: error creating bean name 'pluginmanager' defined in servletcontext resource [/web-inf/applicationcontext.xml]: invocation of init method failed; nested exception java.lang.nosuchmethoderror: org.codehaus.groovy.control.sourceunit.getsource()lorg/codehaus/groovy/control/io/readersource;
the way i'm able deploy war removing older groovy file , application runs fine.
i debugged dependency process , find this:
[not required] org.codehaus.groovy#groovy;1.6.9!groovy.jar ... :: evicted modules: junit#junit;3.8.2 [junit#junit;4.8.1] in [test] in org.codehaus.groovy#groovy;1.6.9 latest-revision
so, continued , got file 'org.codehaus.groovy.modules.http-builder/http-builder/ivy-0.5.0-rc2.xml' contains following:
<dependency org="org.codehaus.groovy" name="groovy" rev="[1.5,1.6.99)"
i changed line "[1.7,1.7.8)" , dependency process works fine , war deploys without problem, i've never touched of before , i'm worried. correct way proceed grails dependencies?
all started happening after installing jquery ui plugin , after removing it, problem continued.
thanks
looks have http-builder in dependencies block in buildconfig.groovy. http-builder pulls in groovy transitive dependency. need exclude avoid conflict groovy-all shipped grails.
compile("org.codehaus.groovy.modules.http-builder:http-builder:0.5.0") { excludes 'groovy', 'xml-apis' }
(note: above example excludes xml-apis well, might want if you're on java 6, avoid duplicate classes)
to track down conflicts this, can use command:
grails dependency-report
which generates report under target/dependency-report/
Comments
Post a Comment