Hi Inge,
I have no idea what this tagcloud snippet works (it's contributed
code). All I can tell is that the error seems because the snippet is
passing a NULL list to the XWiki sort() method. Actually the
implementation of the sort method cannot be simpler:
public List sort(List list)
{
Collections.sort(list);
return list;
}
So you should check the tagcloud code and modify it so that it
doesn't call sort when the list is NULL (and update the script in the
code zone when you've fixed it! :)).
Thanks
-Vincent
On Sep 21, 2007, at 8:10 AM, I.T. van den Dobbelsteen-Heemskerk wrote:
Recently I included the tagcloud snippet in one of my
panels. In
some pages it works fine, but in other pages I get this error
message in stead of the cloud:
Error number 4001 in 4: Error while parsing velocity page Main.Tags
Wrapped Exception: Invocation of method 'sort' in class
com.xpn.xwiki.api.XWiki threw exception
java.lang.NullPointerException @ Main.Tags3,25?
Error number 4001 in 4: Error while parsing velocity page Main.Tags
Wrapped Exception: Invocation of method 'sort' in class
com.xpn.xwiki.api.XWiki threw exception
java.lang.NullPointerException @ Main.Tags3,25?
com.xpn.xwiki.XWikiException: Error number 4001 in 4: Error while
parsing velocity page Main.Tags
Wrapped Exception: Invocation of method 'sort' in class
com.xpn.xwiki.api.XWiki threw exception
java.lang.NullPointerException @ Main.Tags3,25?
at com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate
(XWikiVelocityRenderer.java:148)
at com.xpn.xwiki.render.XWikiVelocityRenderer.render
(XWikiVelocityRenderer.java:91)
at com.xpn.xwiki.render.DefaultXWikiRenderingEngine.renderText
(DefaultXWikiRenderingEngine.java:222)
at com.xpn.xwiki.render.DefaultXWikiRenderingEngine.renderText
(DefaultXWikiRenderingEngine.java:154)
at com.xpn.xwiki.render.DefaultXWikiRenderingEngine.renderText
(DefaultXWikiRenderingEngine.java:125)
at com.xpn.xwiki.doc.XWikiDocument.getRenderedContent
(XWikiDocument.java:411)
at com.xpn.xwiki.objects.classes.TextAreaClass.displayView
(TextAreaClass.java:163)
at com.xpn.xwiki.doc.XWikiDocument.display(XWikiDocument.java:1312)
at com.xpn.xwiki.doc.XWikiDocument.display(XWikiDocument.java:1292)
at com.xpn.xwiki.api.Document.display(Document.java:866)
at sun.reflect.GeneratedMethodAccessor153.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
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.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.ASTBlock.render
(ASTBlock.java:74)
at org.apache.velocity.runtime.parser.node.ASTIfStatement.render
(ASTIfStatement.java:88)
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.directive.Foreach.render
(Foreach.java:448)
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.SimpleNode.render
(SimpleNode.java:318)
at com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate
(XWikiVelocityRenderer.java:240)
at com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate
(XWikiVelocityRenderer.java:143)
at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1271)
at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1240)
at com.xpn.xwiki.api.XWiki.parseTemplate(XWiki.java:511)
at sun.reflect.GeneratedMethodAccessor135.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
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.SimpleNode.render
(SimpleNode.java:318)
at com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate
(XWikiVelocityRenderer.java:240)
at com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate
(XWikiVelocityRenderer.java:143)
at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1271)
at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1240)
at com.xpn.xwiki.api.XWiki.parseTemplate(XWiki.java:511)
at sun.reflect.GeneratedMethodAccessor135.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
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.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 com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate
(XWikiVelocityRenderer.java:240)
at com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate
(XWikiVelocityRenderer.java:143)
at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1271)
at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1240)
at com.xpn.xwiki.web.Utils.parseTemplate(Utils.java:94)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:157)
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:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterChain.java:173)
at com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter
(SetCharacterEncodingFilter.java:117)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke
(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke
(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke
(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke
(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke
(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service
(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process
(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol
$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:
664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket
(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt
(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run
(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
Wrapped Exception:
java.lang.NullPointerException
at java.util.Collections.sort(Collections.java:116)
at com.xpn.xwiki.api.XWiki.sort(XWiki.java:1687)
at sun.reflect.GeneratedMethodAccessor179.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
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.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 com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate
(XWikiVelocityRenderer.java:240)
at com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate
(XWikiVelocityRenderer.java:143)
at com.xpn.xwiki.render.XWikiVelocityRenderer.render
(XWikiVelocityRenderer.java:91)
at com.xpn.xwiki.render.DefaultXWikiRenderingEngine.renderText
(DefaultXWikiRenderingEngine.java:222)
at com.xpn.xwiki.render.DefaultXWikiRenderingEngine.renderText
(DefaultXWikiRenderingEngine.java:154)
at com.xpn.xwiki.render.DefaultXWikiRenderingEngine.renderText
(DefaultXWikiRenderingEngine.java:125)
at com.xpn.xwiki.doc.XWikiDocument.getRenderedContent
(XWikiDocument.java:411)
at com.xpn.xwiki.objects.classes.TextAreaClass.displayView
(TextAreaClass.java:163)
at com.xpn.xwiki.doc.XWikiDocument.display(XWikiDocument.java:1312)
at com.xpn.xwiki.doc.XWikiDocument.display(XWikiDocument.java:1292)
at com.xpn.xwiki.api.Document.display(Document.java:866)
at sun.reflect.GeneratedMethodAccessor153.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
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.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.ASTBlock.render
(ASTBlock.java:74)
at org.apache.velocity.runtime.parser.node.ASTIfStatement.render
(ASTIfStatement.java:88)
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.directive.Foreach.render
(Foreach.java:448)
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.SimpleNode.render
(SimpleNode.java:318)
at com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate
(XWikiVelocityRenderer.java:240)
at com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate
(XWikiVelocityRenderer.java:143)
at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1271)
at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1240)
at com.xpn.xwiki.api.XWiki.parseTemplate(XWiki.java:511)
at sun.reflect.GeneratedMethodAccessor135.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
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.SimpleNode.render
(SimpleNode.java:318)
at com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate
(XWikiVelocityRenderer.java:240)
at com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate
(XWikiVelocityRenderer.java:143)
at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1271)
at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1240)
at com.xpn.xwiki.api.XWiki.parseTemplate(XWiki.java:511)
at sun.reflect.GeneratedMethodAccessor135.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
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.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 com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate
(XWikiVelocityRenderer.java:240)
at com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate
(XWikiVelocityRenderer.java:143)
at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1271)
at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1240)
at com.xpn.xwiki.web.Utils.parseTemplate(Utils.java:94)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:157)
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:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterChain.java:173)
at com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter
(SetCharacterEncodingFilter.java:117)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke
(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke
(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke
(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke
(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke
(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service
(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process
(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol
$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:
664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket
(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt
(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run
(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
Sorry for the long text.
When I want to view All Tags from my menu, I get no tags, and the
source of the page shows a similar error message.
Any help is welcome.
Inge
De disclaimer van toepassing op e-mail van de gemeente Den Haag
vindt u op:
http://www.denhaag.nl/disclaimer
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users