Hi,
Please use something like pastebin (
http://pastebin.com/) or
tinypaste (
http://tinypaste.com/) when posting stack traces.
Actually this is not a good idea... pastebin and tinypaste remove
pastes after a few days.
Thanks
-Vincent
Can you post the velocity / groovy code you tried as
well.
Thanks.
- Asiri
On Thu, Apr 2, 2009 at 3:54 PM, walido
<walid.kharroubi(a)hraccess.com> wrote:
hi i want to developp a plugin of streaming on xwiki
and i want to know the scripting language groovy and velocity
so i tried to write the HelloWorld Class
i followed the steps in the xwiki tutorial but i have an
error :here is the
stacktrace :
[CODE]Error number 4001 in 4: Error while parsing velocity page
Main.HelloWorldFromVelocity
Wrapped Exception: Failed to evaluate content with id Hello World
From
Velocity
com.xpn.xwiki.XWikiException: Error number 4001 in 4: Error while
parsing
velocity page Main.HelloWorldFromVelocity
Wrapped Exception: Failed to evaluate content with id Hello World
From
Velocity
at
com
.xpn
.xwiki
.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:
114)
at
com
.xpn
.xwiki
.render.XWikiVelocityRenderer.render(XWikiVelocityRenderer.java:85)
at
com
.xpn
.xwiki
.render
.DefaultXWikiRenderingEngine
.renderText(DefaultXWikiRenderingEngine.java:272)
at
com
.xpn
.xwiki
.render
.DefaultXWikiRenderingEngine
.renderText(DefaultXWikiRenderingEngine.java:202)
at
com
.xpn
.xwiki
.render
.DefaultXWikiRenderingEngine
.renderText(DefaultXWikiRenderingEngine.java:170)
at
com
.xpn
.xwiki
.render
.DefaultXWikiRenderingEngine
.renderDocument(DefaultXWikiRenderingEngine.java:159)
at
com
.xpn.xwiki.doc.XWikiDocument.getRenderedContent(XWikiDocument.java:
470)
at
com.xpn.xwiki.api.Document.getRenderedContent(Document.java:365)
at sun.reflect.GeneratedMethodAccessor264.invoke(Unknown
Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
org.apache.velocity.util.introspection.UberspectImpl
$VelMethodImpl.invoke(UberspectImpl.java:295)
at
org
.apache
.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:245)
at
org
.apache
.velocity
.runtime.parser.node.ASTReference.execute(ASTReference.java:203)
at
org
.apache
.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:
294)
at
org
.apache
.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318)
at
org
.xwiki
.velocity.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:
178)
at
org
.xwiki
.velocity.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:
143)
at
com
.xpn
.xwiki
.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:
108)
at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1612)
at com.xpn.xwiki.api.XWiki.parseTemplate(XWiki.java:655)
at sun.reflect.GeneratedMethodAccessor168.invoke(Unknown
Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
org.apache.velocity.util.introspection.UberspectImpl
$VelMethodImpl.invoke(UberspectImpl.java:295)
at
org
.apache
.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:245)
at
org
.apache
.velocity
.runtime.parser.node.ASTReference.execute(ASTReference.java:203)
at
org
.apache
.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:
294)
at
org
.apache
.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318)
at
org
.apache
.velocity
.runtime.directive.VelocimacroProxy.render(VelocimacroProxy.java:194)
at
org
.apache
.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:
170)
at
org
.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:
74)
at
org
.apache
.velocity
.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:88)
at
org
.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:
74)
at
org
.apache
.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318)
at
org
.apache
.velocity
.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:107)
at
org
.apache
.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318)
at
org
.xwiki
.velocity.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:
178)
at
org
.xwiki
.velocity.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:
143)
at
com
.xpn
.xwiki
.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:
108)
at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1612)
at com.xpn.xwiki.web.Utils.parseTemplate(Utils.java:124)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:226)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:115)
at
org
.apache
.struts
.action.RequestProcessor.processActionPerform(RequestProcessor.java:
431)
at
org
.apache
.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:
1196)
at
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:596)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
428)
at
org.mortbay.jetty.servlet.WebApplicationHandler
$CachedChain.doFilter(WebApplicationHandler.java:830)
at
com.xpn.xwiki.plugin.webdav.DavFilter.doFilter(DavFilter.java:68)
at
org.mortbay.jetty.servlet.WebApplicationHandler
$CachedChain.doFilter(WebApplicationHandler.java:821)
at
com
.xpn
.xwiki
.wysiwyg
.server.filter.ConversionFilter.doFilter(ConversionFilter.java:96)
at
org.mortbay.jetty.servlet.WebApplicationHandler
$CachedChain.doFilter(WebApplicationHandler.java:821)
at
com
.xpn
.xwiki
.web
.SavedRequestRestorerFilter
.doFilter(SavedRequestRestorerFilter.java:287)
at
org.mortbay.jetty.servlet.WebApplicationHandler
$CachedChain.doFilter(WebApplicationHandler.java:821)
at
com
.xpn
.xwiki
.web
.SetCharacterEncodingFilter
.doFilter(SetCharacterEncodingFilter.java:112)
at
org.mortbay.jetty.servlet.WebApplicationHandler
$CachedChain.doFilter(WebApplicationHandler.java:821)
at
org
.mortbay
.jetty
.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:
471)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:
568)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1565)
at
org
.mortbay
.jetty
.servlet.WebApplicationContext.handle(WebApplicationContext.java:633)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1517)
at org.mortbay.http.HttpServer.service(HttpServer.java:954)
at
org.mortbay.http.HttpConnection.service(HttpConnection.java:816)
at
org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:983)
at org.mortbay.http.HttpConnection.handle(HttpConnection.java:
833)
at
org
.mortbay.http.SocketListener.handleConnection(SocketListener.java:
244)
at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:
357)
at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:
534)
Wrapped Exception:
org.apache.velocity.exception.MethodInvocationException: Invocation
of
method 'parseGroovyFromPage' in class com.xpn.xwiki.api.XWiki threw
exception com.xpn.xwiki.XWikiException: Error number 14001 in 14:
Failed
compiling groovy script Wrapped Exception: startup failed,
script1238667520150.groovy: 1: unexpected token: < @ line 1, column
1.
error
@ Main.HelloWorldFromVelocity1,29? at
org
.apache
.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:286)
at
org
.apache
.velocity
.runtime.parser.node.ASTReference.execute(ASTReference.java:203)
at
org
.apache
.velocity.runtime.parser.node.ASTReference.value(ASTReference.java:
419)
at
org
.apache
.velocity
.runtime.parser.node.ASTExpression.value(ASTExpression.java:73)
at
org
.apache
.velocity
.runtime.parser.node.ASTSetDirective.render(ASTSetDirective.java:125)
at
org
.apache
.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318)
at
org
.xwiki
.velocity.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:
178)
at
org
.xwiki
.velocity.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:
143)
at
com
.xpn
.xwiki
.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:
108)
at
com
.xpn
.xwiki
.render.XWikiVelocityRenderer.render(XWikiVelocityRenderer.java:85)
at
com
.xpn
.xwiki
.render
.DefaultXWikiRenderingEngine
.renderText(DefaultXWikiRenderingEngine.java:272)
at
com
.xpn
.xwiki
.render
.DefaultXWikiRenderingEngine
.renderText(DefaultXWikiRenderingEngine.java:202)
at
com
.xpn
.xwiki
.render
.DefaultXWikiRenderingEngine
.renderText(DefaultXWikiRenderingEngine.java:170)
at
com
.xpn
.xwiki
.render
.DefaultXWikiRenderingEngine
.renderDocument(DefaultXWikiRenderingEngine.java:159)
at
com
.xpn.xwiki.doc.XWikiDocument.getRenderedContent(XWikiDocument.java:
470)
at com.xpn.xwiki.api.Document.getRenderedContent(Document.java:365)
at
sun.reflect.GeneratedMethodAccessor264.invoke(Unknown Source) at
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at
java.lang.reflect.Method.invoke(Unknown Source) at
org.apache.velocity.util.introspection.UberspectImpl
$VelMethodImpl.invoke(UberspectImpl.java:295)
at
org
.apache
.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:245)
at
org
.apache
.velocity
.runtime.parser.node.ASTReference.execute(ASTReference.java:203)
at
org
.apache
.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:
294)
at
org
.apache
.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318)
at
org
.xwiki
.velocity.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:
178)
at
org
.xwiki
.velocity.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:
143)
at
com
.xpn
.xwiki
.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:
108)
at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1612) at
com.xpn.xwiki.api.XWiki.parseTemplate(XWiki.java:655) at
sun.reflect.GeneratedMethodAccessor168.invoke(Unknown Source) at
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at
java.lang.reflect.Method.invoke(Unknown Source) at
org.apache.velocity.util.introspection.UberspectImpl
$VelMethodImpl.invoke(UberspectImpl.java:295)
at
org
.apache
.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:245)
at
org
.apache
.velocity
.runtime.parser.node.ASTReference.execute(ASTReference.java:203)
at
org
.apache
.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:
294)
at
org
.apache
.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318)
at
org
.apache
.velocity
.runtime.directive.VelocimacroProxy.render(VelocimacroProxy.java:194)
at
org
.apache
.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:
170)
at
org
.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:
74)
at
org
.apache
.velocity
.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:88)
at
org
.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:
74)
at
org
.apache
.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318)
at
org
.apache
.velocity
.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:107)
at
org
.apache
.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318)
at
org
.xwiki
.velocity.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:
178)
at
org
.xwiki
.velocity.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:
143)
at
com
.xpn
.xwiki
.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:
108)
at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1612) at
com.xpn.xwiki.web.Utils.parseTemplate(Utils.java:124) at
com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:226) at
com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:115) at
org
.apache
.struts
.action.RequestProcessor.processActionPerform(RequestProcessor.java:
431)
at
org
.apache
.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:
1196)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:
414) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:596) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:689) at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
428) at
org.mortbay.jetty.servlet.WebApplicationHandler
$CachedChain.doFilter(WebApplicationHandler.java:830)
at com.xpn.xwiki.plugin.webdav.DavFilter.doFilter(DavFilter.java:
68) at
org.mortbay.jetty.servlet.WebApplicationHandler
$CachedChain.doFilter(WebApplicationHandler.java:821)
at
com
.xpn
.xwiki
.wysiwyg
.server.filter.ConversionFilter.doFilter(ConversionFilter.java:96)
at
org.mortbay.jetty.servlet.WebApplicationHandler
$CachedChain.doFilter(WebApplicationHandler.java:821)
at
com
.xpn
.xwiki
.web
.SavedRequestRestorerFilter
.doFilter(SavedRequestRestorerFilter.java:287)
at
org.mortbay.jetty.servlet.WebApplicationHandler
$CachedChain.doFilter(WebApplicationHandler.java:821)
at
com
.xpn
.xwiki
.web
.SetCharacterEncodingFilter
.doFilter(SetCharacterEncodingFilter.java:112)
at
org.mortbay.jetty.servlet.WebApplicationHandler
$CachedChain.doFilter(WebApplicationHandler.java:821)
at
org
.mortbay
.jetty
.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:
471)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:
568)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1565) at
org
.mortbay
.jetty
.servlet.WebApplicationContext.handle(WebApplicationContext.java:633)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1517) at
org.mortbay.http.HttpServer.service(HttpServer.java:954) at
org.mortbay.http.HttpConnection.service(HttpConnection.java:816) at
org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:983)
at
org.mortbay.http.HttpConnection.handle(HttpConnection.java:833) at
org
.mortbay.http.SocketListener.handleConnection(SocketListener.java:
244) at
org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357) at
org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)
Caused by:
com.xpn.xwiki.XWikiException: Error number 14001 in 14: Failed
compiling
groovy script Wrapped Exception: startup failed,
script1238667520150.groovy:
1: unexpected token: < @ line 1, column 1.
error
at
com
.xpn
.xwiki
.render
.groovy
.XWikiGroovyRenderer.parseGroovyFromString(XWikiGroovyRenderer.java:
385)
at com.xpn.xwiki.XWiki.parseGroovyFromString(XWiki.java:5792) at
com.xpn.xwiki.api.XWiki.parseGroovyFromPage(XWiki.java:2227) at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at
java.lang.reflect.Method.invoke(Unknown Source) at
org.apache.velocity.util.introspection.UberspectImpl
$VelMethodImpl.invoke(UberspectImpl.java:295)
at
org
.apache
.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:245)
… 79 more
[/CODE]
did i missed something?
--
View this message in context:
http://n2.nabble.com/HelloWorld-Class-tp2574406p2574406.html
Sent from the XWiki- Dev mailing list archive at
Nabble.com.
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs