logo       

evaluate(file) inside script fails: msg#00123

lang.groovy.user

Subject: evaluate(file) inside script fails

Hello! I am calling embedded groovy from servlet. Call to
evaluate(new File(scriptFile)) causes exception in file scriptFile:
java.lang.ClassFormatError: Invalid index 1 in LocalVariableTable

Problem is fixed with extra println but I would like to take that
println away.

----------------- servlet
groovy.lang.Binding binding = new groovy.lang.Binding(data);
GroovyShell shell = new GroovyShell(binding);
shell.evaluate( new File(fileName) );
----------------- script
evaluate(new File(scriptFile));
----------------- scriptFile
println "abc"; // extra println
a="123";




__________________________________
Do you Yahoo!?
Y! Messenger - Communicate in real time. Download now.
http://messenger.yahoo.com



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise