Errors when JetGroovy uses groovy-1.6.0/embeddable/groovy-all-1.6.0.jar instead of groovy-1.6.0/lib/groovy-1.6.0.jar

I'm trying to use the latest Groovy 1.6 release with Intellij 8.1.

I have a simple program that succeeds when I run it from the command line but fails when I run inside of Intellij. The difference is that the command line uses groovy-1.6.0/lib/groovy-1.6.0.jar but Intellij uses groovy-1.6.0/embeddable/groovy-all-1.6.0.jar

How can I get JetGroovy to NOT use the embeddable jar?

The attached file attempts to parse some XML and write it out.

From the command line, I see:


cm096-46c:src mhusby$ groovy -version
Groovy Version: 1.6.0 JVM: 1.6.0_07
cm096-46c:src mhusby$ groovy ErrorExample.groovy
/Users/mhusby/Applications/groovy-1.6.0/lib/groovy-1.6.0.jar
cm096-46c:src mhusby$



 


From inside Intellij I get

/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/bin/java -Dgroovy.home=/Users/mhusby/Applications/groovy-1.6.0 -Dgroovy.starter.conf=/Users/mhusby/Applications/groovy-1.6.0/conf/groovy-starter.conf -Dtools.jar=/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/lib/tools.jar -Dfile.encoding=MacRoman -classpath /Users/mhusby/Applications/groovy-1.6.0/embeddable/groovy-all-1.6.0.jar org.codehaus.groovy.tools.GroovyStarter --main groovy.ui.GroovyMain --conf /Users/mhusby/Applications/groovy-1.6.0/conf/groovy-starter.conf --classpath "/Users/mhusby/IdeaProjects/GroovyThings/src:/Users/mhusby/IdeaProjects/GroovyThings/out/production/GroovyThings:/Users/mhusby/Applications/groovy-1.6.0/lib/servlet-api-2.4.jar:/Users/mhusby/Applications/groovy-1.6.0/lib/asm-tree-2.2.3.jar:/Users/mhusby/Applications/groovy-1.6.0/lib/antlr-2.7.7.jar:/Users/mhusby/Applications/groovy-1.6.0/lib/asm-2.2.3.jar:/Users/mhusby/Applications/groovy-1.6.0/lib/jsp-api-2.0.jar:/Users/mhusby/Applications/groovy-1.6.0/lib/ant-junit-1.7.1.jar:/Users/mhusby/Applications/groovy-1.6.0/lib/ant-launcher-1.7.1.jar:/Users/mhusby/Applications/groovy-1.6.0/lib/commons-cli-1.0.jar:/Users/mhusby/Applications/groovy-1.6.0/lib/asm-util-2.2.3.jar:/Users/mhusby/Applications/groovy-1.6.0/lib/asm-analysis-2.2.3.jar:/Users/mhusby/Applications/groovy-1.6.0/lib/bsf-2.4.0.jar:/Users/mhusby/Applications/groovy-1.6.0/lib/ant-1.7.1.jar:/Users/mhusby/Applications/groovy-1.6.0/lib/ivy-2.0.0.jar:/Users/mhusby/Applications/groovy-1.6.0/lib/junit-3.8.2.jar:/Users/mhusby/Applications/groovy-1.6.0/lib/jline-0.9.94.jar:/Users/mhusby/Applications/groovy-1.6.0/lib/xstream-1.3.jar:/Users/mhusby/Applications/groovy-1.6.0/lib/commons-logging-1.1.jar:/Users/mhusby/.maven/repository/ojdbc14/jars/ojdbc14-10.2.0.1.0.jar:" /Users/mhusby/IdeaProjects/GroovyThings/src/ErrorExample.groovy
/Users/mhusby/Applications/groovy-1.6.0/embeddable/groovy-all-1.6.0.jar
Caught: groovy.lang.MissingMethodException: No signature of method: groovy.xml.streamingmarkupsupport.StreamingMarkupWriter.attributeValue() is applicable for argument types: () values: []
at groovy.xml.StreamingMarkupBuilder$_closure6_closure17.doCall(StreamingMarkupBuilder.groovy:132)
at groovy.xml.StreamingMarkupBuilder$_closure6.doCall(StreamingMarkupBuilder.groovy:120)
at groovy.xml.StreamingMarkupBuilder$_closure6.doCall(StreamingMarkupBuilder.groovy:158)
at groovy.xml.StreamingMarkupBuilder$_closure4.doCall(StreamingMarkupBuilder.groovy:90)
at ErrorExample$_run_closure1.doCall(ErrorExample.groovy:20)
at groovy.xml.StreamingMarkupBuilder$_bind_closure7.doCall(StreamingMarkupBuilder.groovy:215)
at ErrorExample.run(ErrorExample.groovy:20)

Process finished with exit code 1



0

Your example works for me on Windows. I'll try on Mac later

0

I just tried this problem again, obviously, after restarting IDEA. And now it works!

So consider this issue resolved.

Thanks for trying it out.

0

That's a good news ;) but still weird

0

请先登录再写评论。