[xwiki-users] Groovy script with attached jars
Hello, AbstractJSR223ScriptMacro failed to evaluate Script (or Groovy) Macro when importing package of attached jar. My configuration: - XWiki 2.7 - Tomcat 6.0.28 - MySql 5.1.49 - Java SUN 6.22 - Ubuntu 10.10 The flowing works well {{groovy jars=attach:plantuml.jar}} def version = Class.forName(net.sourceforge.plantuml.version.Version, false, this.getClass().getClassLoader()).getConstructor().newInstance() print version.version() {{/groovy}} But this one fails {{groovy jars=attach:plantuml.jar}} import net.sourceforge.plantuml {{/groovy}} org.xwiki.rendering.macro.MacroExecutionException: Failed to evaluate Script Macro for content [import net.sourceforge.plantuml] at org.xwiki.rendering.macro.script.AbstractJSR223ScriptMacro.evaluateBlock(AbstractJSR223ScriptMacro.java:174) at org.xwiki.rendering.macro.script.AbstractJSR223ScriptMacro.evaluateBlock(AbstractJSR223ScriptMacro.java:52) at org.xwiki.rendering.macro.script.AbstractScriptMacro.execute(AbstractScriptMacro.java:190) at org.xwiki.rendering.macro.script.AbstractScriptMacro.execute(AbstractScriptMacro.java:57) at org.xwiki.rendering.internal.transformation.macro.MacroTransformation.transformOnce(MacroTransformation.java:184) at org.xwiki.rendering.internal.transformation.macro.MacroTransformation.transform(MacroTransformation.java:129) at org.xwiki.rendering.internal.transformation.DefaultTransformationManager.performTransformations(DefaultTransformationManager.java:72) at com.xpn.xwiki.doc.XWikiDocument.performSyntaxConversion(XWikiDocument.java:7471) at com.xpn.xwiki.doc.XWikiDocument.performSyntaxConversion(XWikiDocument.java:7420) at com.xpn.xwiki.doc.XWikiDocument.getRenderedContent(XWikiDocument.java:835) at com.xpn.xwiki.doc.XWikiDocument.getRenderedContent(XWikiDocument.java:783) at com.xpn.xwiki.doc.XWikiDocument.getRenderedContent(XWikiDocument.java:878) at com.xpn.xwiki.api.Document.getRenderedContent(Document.java:537) at sun.reflect.GeneratedMethodAccessor321.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.doInvoke(UberspectImpl.java:389) at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:378) at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:270) at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:252) at org.apache.velocity.runtime.parser.node.ASTReference.value(ASTReference.java:493) at org.apache.velocity.runtime.parser.node.ASTExpression.value(ASTExpression.java:71) at org.apache.velocity.runtime.parser.node.ASTSetDirective.render(ASTSetDirective.java:142) at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72) at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:336) at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:106) at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:336) at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:196) at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:161) at com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:116) at com.xpn.xwiki.XWiki.evaluateTemplate(XWiki.java:1895) at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1833) at com.xpn.xwiki.api.XWiki.parseTemplate(XWiki.java:860) at sun.reflect.GeneratedMethodAccessor159.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.doInvoke(UberspectImpl.java:389) at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:378) at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:270) at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:252) at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:332) at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72) at org.apache.velocity.runtime.directive.VelocimacroProxy.render(VelocimacroProxy.java:212) at org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:247) at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:175) at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72) at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:87) at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72) at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:336) at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:106) at
[xwiki-users] [Announce] Improved FAQ Application Tutorial
Hi XWikiers, in the spirit of Christmas and because I have some free time right now, I have updated the FAQ Application tutorial with 2 additions: - Explanation of how to add a template provider - makes it easier for users to create FAQ entries - Explanation of how to use a livetable as the homepage of the application - gives users more filtering options I know the FAQ application was the first one I ever wrote in XWiki a couple years back and it's still followed by many XWiki newcomers so I thought those would be 2 useful additions, since they make XWiki applications much smoother to use. Enjoy: http://platform.xwiki.org/xwiki/bin/view/DevGuide/FAQTutorial Merry Christmas (too late) and Happy New Year (too early) to everyone! Guillaume ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Groovy script with attached jars
Sorry, That works with import net.sourceforge.plantuml.* Arnaud. 2010/12/29 Arnaud bourree arnaud.bour...@gmail.com: Hello, AbstractJSR223ScriptMacro failed to evaluate Script (or Groovy) Macro when importing package of attached jar. My configuration: - XWiki 2.7 - Tomcat 6.0.28 - MySql 5.1.49 - Java SUN 6.22 - Ubuntu 10.10 The flowing works well {{groovy jars=attach:plantuml.jar}} def version = Class.forName(net.sourceforge.plantuml.version.Version, false, this.getClass().getClassLoader()).getConstructor().newInstance() print version.version() {{/groovy}} But this one fails {{groovy jars=attach:plantuml.jar}} import net.sourceforge.plantuml {{/groovy}} org.xwiki.rendering.macro.MacroExecutionException: Failed to evaluate Script Macro for content [import net.sourceforge.plantuml] at org.xwiki.rendering.macro.script.AbstractJSR223ScriptMacro.evaluateBlock(AbstractJSR223ScriptMacro.java:174) at org.xwiki.rendering.macro.script.AbstractJSR223ScriptMacro.evaluateBlock(AbstractJSR223ScriptMacro.java:52) at org.xwiki.rendering.macro.script.AbstractScriptMacro.execute(AbstractScriptMacro.java:190) at org.xwiki.rendering.macro.script.AbstractScriptMacro.execute(AbstractScriptMacro.java:57) at org.xwiki.rendering.internal.transformation.macro.MacroTransformation.transformOnce(MacroTransformation.java:184) at org.xwiki.rendering.internal.transformation.macro.MacroTransformation.transform(MacroTransformation.java:129) at org.xwiki.rendering.internal.transformation.DefaultTransformationManager.performTransformations(DefaultTransformationManager.java:72) at com.xpn.xwiki.doc.XWikiDocument.performSyntaxConversion(XWikiDocument.java:7471) at com.xpn.xwiki.doc.XWikiDocument.performSyntaxConversion(XWikiDocument.java:7420) at com.xpn.xwiki.doc.XWikiDocument.getRenderedContent(XWikiDocument.java:835) at com.xpn.xwiki.doc.XWikiDocument.getRenderedContent(XWikiDocument.java:783) at com.xpn.xwiki.doc.XWikiDocument.getRenderedContent(XWikiDocument.java:878) at com.xpn.xwiki.api.Document.getRenderedContent(Document.java:537) at sun.reflect.GeneratedMethodAccessor321.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.doInvoke(UberspectImpl.java:389) at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:378) at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:270) at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:252) at org.apache.velocity.runtime.parser.node.ASTReference.value(ASTReference.java:493) at org.apache.velocity.runtime.parser.node.ASTExpression.value(ASTExpression.java:71) at org.apache.velocity.runtime.parser.node.ASTSetDirective.render(ASTSetDirective.java:142) at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72) at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:336) at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:106) at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:336) at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:196) at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:161) at com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:116) at com.xpn.xwiki.XWiki.evaluateTemplate(XWiki.java:1895) at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1833) at com.xpn.xwiki.api.XWiki.parseTemplate(XWiki.java:860) at sun.reflect.GeneratedMethodAccessor159.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.doInvoke(UberspectImpl.java:389) at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:378) at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:270) at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:252) at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:332) at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72) at org.apache.velocity.runtime.directive.VelocimacroProxy.render(VelocimacroProxy.java:212) at org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:247) at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:175) at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72) at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:87) at
[xwiki-users] evaluating xwiki for our needs
Greetings XWiki Users, We are a small company of 3 people. For internal use and portal, I've rolled out Trac... Then Redmine... then back to Trac. I have fond memories of my Trac install and usage 3-4 years at the big company but now that the 3 of us are on our own it doesn't seem to be that helpful. Interconnecting Wiki, Issues/Tickets, and SCM Change Sets has great powers in Trac. But we don't seem to be taking advantage of that now. A year ago, I rolled out Plone for our external web. I managed to tweak an attractive Skin/Theme. I added necessary content. Now it sits -- getting old and tired. I'm starting to evaluate XWiki. So many options on a page is a bit overwhelming, but other than that it looks very usable. My idea is to merge our external web and internal portal -- so there isn't such a distinct line drawn between our knowledge base and our customer facing pages. I think we can manage (Trac) Issues/Tickets less formally on a wiki page. The SCM integration was nice, but a simple Source Repository Viewer might be all we need. We are all familiar with Java and normally use Linux. The WebDav fs features look nice. I'm concerned about vitality. Maybe half of the references for XWiki are stale -- site being dead or running something else now. I'm concerned about security. I'm concerned about resource footprint. (I imagine it's just App Server + a little, but migrating to a VPS would costly.) Maybe I need some encouragement as I go along. :) And ideas about how to make pages look less busy. Thanks, Scott ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users