Hi,
I haven`t played with groovy in XWiki enough. My only suggestion is to
debug the problem by reducing it to a state that works (even an empty
groovy page) and then add stuff until it breaks to identify the cause.
Hope this helps,
Eduard
On Tue, Aug 5, 2014 at 4:37 PM, Jeremie BOUSQUET <jeremie.bousquet(a)gmail.com
wrote:
Hello XWiki Community,
Got some issue with executing groovy in a page ...
I have a page with a groovy class, that needs some jars dependencies.
The following "works":
{{groovy jars="attach:toto.jar,..."}}
import ...
public class MyClass {
...
}
def myobj = new MyClass()
// do something with myobj ...
{{/groovy}}
Then I'd like to execute this code from another page.
So I removed the {{groovy}} macro tags and the isolated code at the end,
leaving only the class declaration and imports.
From the other page I use the following version of parseGroovyFromPage:
http://maven.xwiki.org/site/docs/xwiki-javadoc-4.1.x/com/xpn/xwiki/api/XWik…
I provide it with the name of the page containing my groovy class, twice
(once for the script and once for the jars).
It results in a page loading infinitely until it time-outs ... From the
logs it seems my class never gets executed.
Any idea ?
Note: I think it's a "crappy" method, and I plan to put this as a java
component, but in a "proof of concept" stage the groovy script is very
useful.
Thanks,
Jeremie
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users