error installing xwiki 2.0.1

3 messages Options
Embed this post
Permalink
Michael Beetz

error installing xwiki 2.0.1

Reply Threaded More More options
Print post
Permalink
Hi all,

I've installed xwiki 2.0.1 on several systems.  I've got the error below on a few of them just opening the wiki for the "Recent Changes" - "Failed to execute macro: velocity".  I've solved it for one wiki (solved it by accident) exporting and importing that wiki.  The second one is to big to do so.  The error rises for a farm wiki and a standard wiki.

I am switching back to the 2.0 wiki ".war" using the 2.0.1 ".xar" pages.

Kind regards
mb

This is the < 100KB version of that Mail

org.xwiki.rendering.macro.MacroExecutionException: Failed to evaluate Velocity Macro for content [##
## Recent changes.
##
## Optional parameters :
##
## Parameters which can be set in velocity before including this page or can be passed as HTTP parameters.
## Note that HTTP parameters supercede velocity set variables.
##
##  - rcShowMinor (String set to "true" or "false"): show minor edits.
##  - rcShowDiff (String set to "true" or "false"): show diff in items.
##  - rcShowRss (String set to "true" or "false"): show RSS at the bottom of the list.
##  - rcChangesNb (String set to a numerical value): number of recent changes to display.
##  - rcSpace (List of string[s]): restrict recent changes retrieval to pages within the given space.
##  - rcTag (List of string[s]): restrict recent changes retrieval to pages with the given tag.
##  - rcAuthor (List of string[s]): restrict recent changes retrieval to pages with the given author.
##
## Parameters which can be set before including this page only.
##
##  - rcDocumentNames (Collection): The list of recentlyChanged documents, to reuse a previous search query.
##
$xwiki.jsx.use("Main.RecentChanges")##
$xwiki.ssx.use("Main.RecentChanges")##
#set($action = "$!request.getParameter('action')")
##
## Start execution timer
##
#set($execStart = $util.getDate())
##
## Go to diff URL service.
##
#if($action == "goToDiffURL")
  #set($page = "$!request.getParameter('page')")
  #set($author = "$!request.getParameter('author')")
  #set($date = "$!request.getParameter('date')")
  #set($period = $xwiki.criteriaService.getPeriodFactory().createDayPeriod($date))
  #set($criterion = $xwiki.criteriaService.getRevisionCriteriaFactory().createRevisionCriteria($author, $period))
  #if("$!request.getParameter('rcShowMinor')" == "true")
    #set($discard = $criterion.setIncludeMinorVersions(true))
  #end
  #set($diffDoc = $xwiki.getDocument($page))
  #set($revisions = $diffDoc.getRevisions($criterion))
  #set($rev1 = $listtool.get($revisions, 0))
  #set($revMax = $revisions.size() - 1)
  #set($rev2 = $listtool.get($revisions, $revMax))
  #if($rev2 != "1.1")
    #set($rev2 = $xwiki.getDocument($diffDoc, $rev2).getPreviousVersion())
  #end
  $response.sendRedirect($diffDoc.getURL("view", "viewer=changes&rev1=${rev1}&rev2=${rev2}"))
#end
## We have to use the HTML macro to avoid prints of multiple   on macro calls.
{{html}}
## Manage minor edits.
#setVariableFromRequest($rcShowMinor "rcShowMinor" false)
## Manage show diff in items.
#setVariableFromRequest($rcShowDiff "rcShowDiff" true)
## Manage show RSS links.
#setVariableFromRequest($rcShowRss "rcShowRss" true)
## Manage number of changes to display.
#setVariableFromRequest($rcChangesNb "rcChangesNb" 30)
## Manage tag criterion
#setVariableFromRequest($rcTag "rcTag" [])
## Manage space criterion
#setVariableFromRequest($rcSpace "rcSpace" [])
## Manage author criterion
#setVariableFromRequest($rcAuthor "rcAuthor" [])
{{/html}}
##
## Create a string containing one or more ? given the number of values in the passed list.
##
#macro(createQueryParameters $values $parameters)
  #foreach($value in $values)
    #if($parameters == "")
      #set($parameters = "?")
    #else
      #set($parameters = "${parameters}, ?")
    #end
  #end
#end
##
## Retrieve recently changed documents.
##
#set($criteria = $util.getHashMap())
#if("$!rcDocumentNames" == "")
  #if(!$xwiki.hasMinorEdit() || $rcShowMinor)
    #set ($hqlQuery = "where 1=1 order by doc.date desc")
  #else
    #set ($hqlQuery = ", XWikiRCSNodeInfo as ni where doc.id=ni.id.docId and ni.id.version2=1 #if(!$isAdvancedUser)and doc.author != 'superadmin'#end group by doc.space, doc.name order by max(ni.date) desc")
  #end
  ## Create space criterion.
  #if($rcSpace.size() > 0)
    #set($spaceParameters = "")
    #createQueryParameters($rcSpace $spaceParameters)
    #set($discard = $criteria.put("doc.space in (${spaceParameters})", $rcSpace))
  #end
  ## Create tag criterion.
  #if("$!xwiki.getPlugin('tag')" != "" && $rcTag.size() > 0)
    #set($docsWithTag = $util.getArrayList())
    #foreach($item in $rcTag)
      #set($discard = $docsWithTag.addAll($xwiki.tag.getDocumentsWithTag($item)))
    #end
    #set($docsWithTagParameters = "")
    #createQueryParameters($docsWithTag $docsWithTagParameters)
    #set($discard = $criteria.put("doc.fullName in (${docsWithTagParameters})", $docsWithTag))
  #end
  #if($rcAuthor.size() > 0)
    #set($authorParameters = "")
    #createQueryParameters($rcAuthor $authorParameters)
    #set($discard = $criteria.put("doc.author in (${authorParameters})", $rcAuthor))
  #end
  #if($criteria.size() > 0)
    ## If any, loop over criterias to add them to the query, then perform the query.
    #set($values = $util.getArrayList())
    #foreach($criterion in $criteria.keySet())
      #if($criteria.get($criterion).size() > 0)
        #set($hqlQuery = $hqlQuery.replaceAll("where", "where ${criterion} and"))
        #set($discard = $values.addAll($criteria.get($criterion)))
      #end
    #end
    #set($rcDocumentNames = $xwiki.searchDocuments($hqlQuery, $rcChangesNb, 0, $values))
  #else
    ## No query criterion, perform the query as is.
    #set($rcDocumentNames = $xwiki.searchDocuments($hqlQuery, $rcChangesNb, 0))
  #end
#end
##
## Prepare comments handling
#set($commentsOrder = false)
#if($xwiki.getWebPreferenceAsInt("commentsorder",1) == 0)
  #set($commentsOrder = true)
#end
##
## Comment handling macro.
## Retreive page's last comment if any and
## overwrite variables if this comment is the last modification on the page.
##
#macro(handleComment $rcDoc $rcType $rcDt $commentsOrder)
  ## Retrieve comments from last to first.
  #set($rcComments = $rcDoc.getComments($commentsOrder))
  #if($rcComments.size() > 0)
    ## Retrieve last comment.
    #set($lastComment = $listtool.get($rcComments, 0))
    #set($lastCommentDate = $lastComment.getProperty("date").getValue())
    ## If the last modification on the page is the comment, overwrite values.
    ## We don't test compareTo() == 0 since the comment date and the save date may vary a little bit.
    #if($lastCommentDate.compareTo($rcDt.toDate()) > -1 && $lastCommentDate.compareTo($rcDt.toDate()) <= 1)
      #set($rcType = "comment")
    #end
  #end
#end
##
## Attachments handling macro.
## Retrieve page's attachments and put those which upload matches the modification entry (author and timeframe)
## in the $rcAttachments List.
##
#macro(handleAttachments $rcDoc $rcAuthor $rcDt)
  #set($attachments = $rcDoc.getAttachmentList())
  #foreach($attachment in $attachments)
    #set($attachmentDt = $xwiki.jodatime.getDateTime($attachment.getDate().getTime()))
    #if($rcAuthor == $attachment.getAuthor() && $rcDt.getYear() == $attachmentDt.getYear() && $rcDt.getDayOfYear() == $attachmentDt.getDayOfYear())
      #set($discard = $rcAttachments.add($attachment))
    #end
  #end
#end
##
##
##
#macro(displayRcAuthor $author)
  #useravatar($author)
  <br/><span class="recentChangesAuthor">
  #if($author == "XWikiGuest")
    Guest
  #else
    #set($localUserName = $xwiki.getLocalUserName($author))
    #if($localUserName == "")
      ## localUserName can be empty when the page has been saved without specifying the author.
      ## We're printing a non-breaking space to ensure xhtml validity (ie: avoid empty paragraph).
       
    #else
      $localUserName
    #end
  #end
  </span>
#end
#macro(displayRcVersion $version)
  #if($version == "1.1")
    <span class="rcVersion">(<span class="newVersion">$msg.get("xe.recentchanges.entry.new")</span>)</span>
  #end
#end
##
## Display the recent changes list.
##
#set($previousDt = $xwiki.jodatime.getDateTime(0))
#set($discard = $previousDate.setTime(0))
#set($previousAuthor = "")
## Get this very doc, useful when it is included from another one.
#set($recentChangesDoc = $xwiki.getDocument("Main.RecentChanges"))
{{html}}
<table class="recentChanges">
  <tr class="recentChangesHeader"><th>$msg.get("xe.recentchanges.column.authoranddate")</th><th>$msg.get("xe.recentchanges.column.changes")</th></tr>
  #foreach ($rcDocName in $rcDocumentNames)
    #set($row = "")
    #set($rcAttachments = $util.arrayList)
    ## Verify user access level on the document
    #if ($xwiki.hasAccessLevel("view", $context.user, "${context.database}:${rcDocName}"))
      #set($rcDoc = $xwiki.getDocument($rcDocName))
      #set($rcType = "page")
      #set($rcAuthor = $rcDoc.getAuthor()) ## TODO : check comments
      #set($rcDt = $xwiki.jodatime.getDateTime($rcDoc.getDate().getTime()))
      ## The handleComment macro overwrites rcType variable if the last modification is a comment.
      #handleComment($rcDoc $rcType $rcDt $commentsOrder)
      ## The handleAttachments macro put a list of attachments uploaded during the day by the author in $rcAttachments.
      #handleAttachments($rcDoc $rcAuthor $rcDt)
      #if($rcAuthor == $previousAuthor && $rcDt.getYear() == $previousDt.getYear() && $rcDt.getDayOfYear() == $previousDt.getDayOfYear())
        ## Same day and author, continue in the same row.
      #else
        ## Different day or author, end previous row and start a new one.
        #if($velocityCount > 1)</ul></td></tr>#end ## close previous row if needed
        <tr><td class="recentChangesLeft">#displayRcAuthor($rcAuthor)<br/>
        <span class="recentChangesDate">$xwiki.formatDate($rcDt.toDate(), "MMMM d")</span></td>
        <td class="recentChangesRight"><ul class="xlist"> ## open next cell
      #end
      ## Compute a GUID for this modification with page name, modification date and author.
      #set($modGUID = "${rcDoc.fullName}_${xwiki.formatDate($rcDt.toDate(), 'yyyyMMdd')}_${rcAuthor}")
      ## Build the URL used to retreive the diff viewer URL
      #set($goToDiffURL = $recentChangesDoc.getURL("view", "xpage=plain&action=goToDiffURL&page=${rcDoc.getFullName()}&author=${rcAuthor}&date=${xwiki.formatDate($rcDt.toDate(), 'yyyyMMdd')}&rcShowMinor=${rcShowMinor}"))
      <li class="xitem xunderline xhighlight ${rcType}">
        <div class="xitemcontainer">
          #if($rcType == "comment")
            <div class="modifiedPage"><a href="$rcDoc.getURL()" title="$msg.get("xe.recentchanges.entry.comment.tooltip", [$xwiki.formatDate($rcDt.toDate(), "HH:mm")]) ">$xwiki.getXMLEncoded($rcDoc.getDisplayTitle())</a></div>
            #if($rcShowDiff)
              <div class="xshowonhover modifiedPageActions"><a class="ajax" href="$rcDoc.getURL("vire", "viewer=comments")" onclick="toggleClass(document.getElementById('$modGUID'), 'hidden'); toggleClass(document.getElementById('${modGUID}_comShow'), 'hidden'); toggleClass(document.getElementById('${modGUID}_comHide'), 'hidden'); return false;"><span id="${modGUID}_comShow">[+] $msg.get("xe.recentchanges.entry.comment.show")</span><span id="${modGUID}_comHide" class="hidden">[-] $msg.get("xe.recentchanges.entry.comment.hide")</span> $msg.get("xe.recentchanges.entry.comment")</a></div>
              <div class="commentContainer hidden" id="$modGUID">
                <div class="commentQuote lQuo"> </div>
                <div class="commentQuote rQuo"> </div>
                <div class="comment">
                  $lastComment.get("comment")
                </div>
                ## Display discussion link, this link point to the comments anchor.
                <div class="commentAdd"><img src="$xwiki.getSkinFile("icons/silk/comment.gif")" alt="Reply icon" /> <a href="${rcDoc.getURL("view")}#Comments">$msg.get("xe.recentchanges.entry.comment.seediscussion")</a></div>
              </div>
            #end
          #else
            <div class="modifiedPage"><a href="$rcDoc.getURL()" title="$msg.get("xe.recentchanges.entry.page.tooltip", [$rcDoc.getVersion(), $xwiki.formatDate($rcDt.toDate())])">$xwiki.getXMLEncoded($rcDoc.getDisplayTitle())</a> #displayRcVersion($rcDoc.getVersion())</div>
            #if($rcShowDiff)
              <div class="xshowonhover modifiedPageActions"><a href="$goToDiffURL">$msg.get("xe.recentchanges.entry.page.seemodifications")</a></div>
              ## If the author has uploaded attachments during the day in this page, display them.
              #if($rcAttachments.size() > 0)
                <div class="attachmentContainer" id="$modGUID">
                  <ul>
                    #foreach($rcAttachment in $rcAttachments)
                      <li class="attachment"><a href="$rcDoc.getAttachmentURL($rcAttachment.filename)">$rcAttachment.filename</a> #displayRcVersion($rcAttachment.getVersion())</li>
                    #end
                  </ul>
                </div>
              #end
            #end
          #end
          <div class="xspacer"> </div>
        </div>
      </li>
    #end
    #set($previousAuthor = $rcAuthor)
    #set($previousDt = $rcDt)
  #end
  ## Close last row if any.
  #if($rcDocumentNames.size() > 1)</ul></td></tr>#end
</table>
{{/html}}
##
## Rebuild URL query string
## Workaround until we fix $request.getQueryString()
##
#set($queryString = "")
#set($paramMap = $request.getParameterMap())
#foreach($key in $paramMap.keySet())
  #foreach($value in $paramMap.get($key))
    #set($queryString = "${queryString}&${key}=${value}")
  #end
#end
##
## Provide links to display minor edits and RSS feed.
##
#if($xwiki.hasMinorEdit())
  {{html}}
  <p class="recentChangesMoreActions">
    #if($rcShowMinor)
      <a href="$xwiki.getURL($tdoc.getFullName(), "view", $queryString.replaceAll('rcShowMinor=true', ''))"><img src="$xwiki.getSkinFile("icons/silk/zoom_out.gif")" alt="Hide minor icon"/>$msg.get("xe.recentchanges.hideminor")</a>
    #else
      <a href="$xwiki.getURL($tdoc.getFullName(), "view", "${queryString}&rcShowMinor=true")"><img src="$xwiki.getSkinFile("icons/silk/zoom_in.gif")" alt="Show minor icon"/>$msg.get("xe.recentchanges.showminor")</a>
    #end
    #if($rcShowRss)
      #set($rssURL = "")
      #if($rcTag.size() > 0)
        ## Temporary harcoded URL until we refactor our RSS feeds.
        #set($rssURL = $xwiki.getURL("Main.TagsRss", "view", "xpage=plain&outputSyntax=plain&tag=$listtool.get($rcTag, 0)"))
      #else
        #set($rssURL = $xwiki.getURL('Main.WebRss', 'view', 'xpage=plain'))
      #end
      <a href="${rssURL}"><img src="$xwiki.getSkinFile("icons/silk/feed.gif")" alt="RSS icon"/>$msg.get("xe.recentchanges.rssfeed")</a>
    #end
  </p>
  {{/html}}
#end]
            at org.xwiki.rendering.internal.macro.velocity.VelocityMacro.evaluate(VelocityMacro.java:118)
            at org.xwiki.rendering.internal.macro.velocity.VelocityMacro.evaluate(VelocityMacro.java:44)
            at org.xwiki.rendering.macro.script.AbstractScriptMacro.execute(AbstractScriptMacro.java:200)
            at org.xwiki.rendering.macro.script.AbstractScriptMacro.execute(AbstractScriptMacro.java:52)
            at org.xwiki.rendering.internal.transformation.MacroTransformation.transformOnce(MacroTransformation.java:176)
            at org.xwiki.rendering.internal.transformation.MacroTransformation.transform(MacroTransformation.java:120)
            at org.xwiki.rendering.internal.transformation.DefaultTransformationManager.performTransformations(DefaultTransformationManager.java:72)
            at com.xpn.xwiki.doc.XWikiDocument.performSyntaxConversion(XWikiDocument.java:5584)
            at com.xpn.xwiki.doc.XWikiDocument.performSyntaxConversion(XWikiDocument.java:5559)
            at com.xpn.xwiki.doc.XWikiDocument.getRenderedContent(XWikiDocument.java:557)
            at com.xpn.xwiki.doc.XWikiDocument.getRenderedContent(XWikiDocument.java:571)
            at com.xpn.xwiki.api.Document.getRenderedContent(Document.java:475)
            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.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:191)
            at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:156)
            at com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:108)
            at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1697)
            at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1618)
            at com.xpn.xwiki.api.XWiki.parseTemplate(XWiki.java:657)
            at sun.reflect.GeneratedMethodAccessor146.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.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 org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:336)
            at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:191)
            at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:156)
            at com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:108)
            at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1697)
            at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1618)
            at com.xpn.xwiki.web.Utils.parseTemplate(Utils.java:124)
            at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:224)
            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:617)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at com.xpn.xwiki.wysiwyg.server.filter.ConversionFilter.doFilter(ConversionFilter.java:155)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:117)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at com.xpn.xwiki.plugin.webdav.XWikiDavFilter.doFilter(XWikiDavFilter.java:68)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at com.xpn.xwiki.web.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:295)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:112)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
            at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
            at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:859)
            at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:574)
            at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1527)
            at java.lang.Thread.run(Unknown Source)
Caused by: org.xwiki.velocity.XWikiVelocityException: Failed to evaluate content with id [velocity macro]
            at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:200)
            at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:156)
            at org.xwiki.rendering.internal.macro.velocity.VelocityMacro.evaluate(VelocityMacro.java:110)
            ... 91 more
Caused by: org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getDisplayTitle' in  class com.xpn.xwiki.api.Document threw exception java.lang.NullPointerException at velocity macro[line 243, column 195]
            at org.apache.velocity.runtime.parser.node.ASTMethod.handleInvocationException(ASTMethod.java:337)
            at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:284)
            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.ASTMethod.execute(ASTMethod.java:155)
            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.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.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.directive.Foreach.render(Foreach.java:366)
            at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:175)
            at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:336)
            at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:191)
            ... 93 more
Caused by: java.lang.NullPointerException
            at com.xpn.xwiki.doc.XWikiDocument.getXDOM(XWikiDocument.java:5540)
            at com.xpn.xwiki.doc.XWikiDocument.getRenderedContentTitle(XWikiDocument.java:780)
            at com.xpn.xwiki.doc.XWikiDocument.getRenderedTitle(XWikiDocument.java:838)
            at com.xpn.xwiki.doc.XWikiDocument.getDisplayTitle(XWikiDocument.java:725)
            at com.xpn.xwiki.api.Document.getDisplayTitle(Document.java:254)
            at sun.reflect.GeneratedMethodAccessor179.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.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)
            ... 108 more




_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users
Michael Beetz

Re: error installing xwiki 2.0.1

Reply Threaded More More options
Print post
Permalink
Hi all,

Just a note:  This mail is "for information only", I'll do the next test on that issue running the 2.0.2 version.

Thanks
mb

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Michael Beetz
Sent: Tuesday, October 20, 2009 10:15 PM
To: XWiki Users
Subject: [xwiki-users] error installing xwiki 2.0.1

Hi all,

I've installed xwiki 2.0.1 on several systems.  I've got the error below on a few of them just opening the wiki for the "Recent Changes" - "Failed to execute macro: velocity".  I've solved it for one wiki (solved it by accident) exporting and importing that wiki.  The second one is to big to do so.  The error rises for a farm wiki and a standard wiki.

I am switching back to the 2.0 wiki ".war" using the 2.0.1 ".xar" pages.

Kind regards
mb

This is the < 100KB version of that Mail

org.xwiki.rendering.macro.MacroExecutionException: Failed to evaluate Velocity Macro for content [##
## Recent changes.
##
## Optional parameters :
##
## Parameters which can be set in velocity before including this page or can be passed as HTTP parameters.
## Note that HTTP parameters supercede velocity set variables.
##
##  - rcShowMinor (String set to "true" or "false"): show minor edits.
##  - rcShowDiff (String set to "true" or "false"): show diff in items.
##  - rcShowRss (String set to "true" or "false"): show RSS at the bottom of the list.
##  - rcChangesNb (String set to a numerical value): number of recent changes to display.
##  - rcSpace (List of string[s]): restrict recent changes retrieval to pages within the given space.
##  - rcTag (List of string[s]): restrict recent changes retrieval to pages with the given tag.
##  - rcAuthor (List of string[s]): restrict recent changes retrieval to pages with the given author.
##
## Parameters which can be set before including this page only.
##
##  - rcDocumentNames (Collection): The list of recentlyChanged documents, to reuse a previous search query.
##
$xwiki.jsx.use("Main.RecentChanges")##
$xwiki.ssx.use("Main.RecentChanges")##
#set($action = "$!request.getParameter('action')")
##
## Start execution timer
##
#set($execStart = $util.getDate())
##
## Go to diff URL service.
##
#if($action == "goToDiffURL")
  #set($page = "$!request.getParameter('page')")
  #set($author = "$!request.getParameter('author')")
  #set($date = "$!request.getParameter('date')")
  #set($period = $xwiki.criteriaService.getPeriodFactory().createDayPeriod($date))
  #set($criterion = $xwiki.criteriaService.getRevisionCriteriaFactory().createRevisionCriteria($author, $period))
  #if("$!request.getParameter('rcShowMinor')" == "true")
    #set($discard = $criterion.setIncludeMinorVersions(true))
  #end
  #set($diffDoc = $xwiki.getDocument($page))
  #set($revisions = $diffDoc.getRevisions($criterion))
  #set($rev1 = $listtool.get($revisions, 0))
  #set($revMax = $revisions.size() - 1)
  #set($rev2 = $listtool.get($revisions, $revMax))
  #if($rev2 != "1.1")
    #set($rev2 = $xwiki.getDocument($diffDoc, $rev2).getPreviousVersion())
  #end
  $response.sendRedirect($diffDoc.getURL("view", "viewer=changes&rev1=${rev1}&rev2=${rev2}"))
#end
## We have to use the HTML macro to avoid prints of multiple   on macro calls.
{{html}}
## Manage minor edits.
#setVariableFromRequest($rcShowMinor "rcShowMinor" false)
## Manage show diff in items.
#setVariableFromRequest($rcShowDiff "rcShowDiff" true)
## Manage show RSS links.
#setVariableFromRequest($rcShowRss "rcShowRss" true)
## Manage number of changes to display.
#setVariableFromRequest($rcChangesNb "rcChangesNb" 30)
## Manage tag criterion
#setVariableFromRequest($rcTag "rcTag" [])
## Manage space criterion
#setVariableFromRequest($rcSpace "rcSpace" [])
## Manage author criterion
#setVariableFromRequest($rcAuthor "rcAuthor" [])
{{/html}}
##
## Create a string containing one or more ? given the number of values in the passed list.
##
#macro(createQueryParameters $values $parameters)
  #foreach($value in $values)
    #if($parameters == "")
      #set($parameters = "?")
    #else
      #set($parameters = "${parameters}, ?")
    #end
  #end
#end
##
## Retrieve recently changed documents.
##
#set($criteria = $util.getHashMap())
#if("$!rcDocumentNames" == "")
  #if(!$xwiki.hasMinorEdit() || $rcShowMinor)
    #set ($hqlQuery = "where 1=1 order by doc.date desc")
  #else
    #set ($hqlQuery = ", XWikiRCSNodeInfo as ni where doc.id=ni.id.docId and ni.id.version2=1 #if(!$isAdvancedUser)and doc.author != 'superadmin'#end group by doc.space, doc.name order by max(ni.date) desc")
  #end
  ## Create space criterion.
  #if($rcSpace.size() > 0)
    #set($spaceParameters = "")
    #createQueryParameters($rcSpace $spaceParameters)
    #set($discard = $criteria.put("doc.space in (${spaceParameters})", $rcSpace))
  #end
  ## Create tag criterion.
  #if("$!xwiki.getPlugin('tag')" != "" && $rcTag.size() > 0)
    #set($docsWithTag = $util.getArrayList())
    #foreach($item in $rcTag)
      #set($discard = $docsWithTag.addAll($xwiki.tag.getDocumentsWithTag($item)))
    #end
    #set($docsWithTagParameters = "")
    #createQueryParameters($docsWithTag $docsWithTagParameters)
    #set($discard = $criteria.put("doc.fullName in (${docsWithTagParameters})", $docsWithTag))
  #end
  #if($rcAuthor.size() > 0)
    #set($authorParameters = "")
    #createQueryParameters($rcAuthor $authorParameters)
    #set($discard = $criteria.put("doc.author in (${authorParameters})", $rcAuthor))
  #end
  #if($criteria.size() > 0)
    ## If any, loop over criterias to add them to the query, then perform the query.
    #set($values = $util.getArrayList())
    #foreach($criterion in $criteria.keySet())
      #if($criteria.get($criterion).size() > 0)
        #set($hqlQuery = $hqlQuery.replaceAll("where", "where ${criterion} and"))
        #set($discard = $values.addAll($criteria.get($criterion)))
      #end
    #end
    #set($rcDocumentNames = $xwiki.searchDocuments($hqlQuery, $rcChangesNb, 0, $values))
  #else
    ## No query criterion, perform the query as is.
    #set($rcDocumentNames = $xwiki.searchDocuments($hqlQuery, $rcChangesNb, 0))
  #end
#end
##
## Prepare comments handling
#set($commentsOrder = false)
#if($xwiki.getWebPreferenceAsInt("commentsorder",1) == 0)
  #set($commentsOrder = true)
#end
##
## Comment handling macro.
## Retreive page's last comment if any and
## overwrite variables if this comment is the last modification on the page.
##
#macro(handleComment $rcDoc $rcType $rcDt $commentsOrder)
  ## Retrieve comments from last to first.
  #set($rcComments = $rcDoc.getComments($commentsOrder))
  #if($rcComments.size() > 0)
    ## Retrieve last comment.
    #set($lastComment = $listtool.get($rcComments, 0))
    #set($lastCommentDate = $lastComment.getProperty("date").getValue())
    ## If the last modification on the page is the comment, overwrite values.
    ## We don't test compareTo() == 0 since the comment date and the save date may vary a little bit.
    #if($lastCommentDate.compareTo($rcDt.toDate()) > -1 && $lastCommentDate.compareTo($rcDt.toDate()) <= 1)
      #set($rcType = "comment")
    #end
  #end
#end
##
## Attachments handling macro.
## Retrieve page's attachments and put those which upload matches the modification entry (author and timeframe)
## in the $rcAttachments List.
##
#macro(handleAttachments $rcDoc $rcAuthor $rcDt)
  #set($attachments = $rcDoc.getAttachmentList())
  #foreach($attachment in $attachments)
    #set($attachmentDt = $xwiki.jodatime.getDateTime($attachment.getDate().getTime()))
    #if($rcAuthor == $attachment.getAuthor() && $rcDt.getYear() == $attachmentDt.getYear() && $rcDt.getDayOfYear() == $attachmentDt.getDayOfYear())
      #set($discard = $rcAttachments.add($attachment))
    #end
  #end
#end
##
##
##
#macro(displayRcAuthor $author)
  #useravatar($author)
  <br/><span class="recentChangesAuthor">
  #if($author == "XWikiGuest")
    Guest
  #else
    #set($localUserName = $xwiki.getLocalUserName($author))
    #if($localUserName == "")
      ## localUserName can be empty when the page has been saved without specifying the author.
      ## We're printing a non-breaking space to ensure xhtml validity (ie: avoid empty paragraph).
       
    #else
      $localUserName
    #end
  #end
  </span>
#end
#macro(displayRcVersion $version)
  #if($version == "1.1")
    <span class="rcVersion">(<span class="newVersion">$msg.get("xe.recentchanges.entry.new")</span>)</span>
  #end
#end
##
## Display the recent changes list.
##
#set($previousDt = $xwiki.jodatime.getDateTime(0))
#set($discard = $previousDate.setTime(0))
#set($previousAuthor = "")
## Get this very doc, useful when it is included from another one.
#set($recentChangesDoc = $xwiki.getDocument("Main.RecentChanges"))
{{html}}
<table class="recentChanges">
  <tr class="recentChangesHeader"><th>$msg.get("xe.recentchanges.column.authoranddate")</th><th>$msg.get("xe.recentchanges.column.changes")</th></tr>
  #foreach ($rcDocName in $rcDocumentNames)
    #set($row = "")
    #set($rcAttachments = $util.arrayList)
    ## Verify user access level on the document
    #if ($xwiki.hasAccessLevel("view", $context.user, "${context.database}:${rcDocName}"))
      #set($rcDoc = $xwiki.getDocument($rcDocName))
      #set($rcType = "page")
      #set($rcAuthor = $rcDoc.getAuthor()) ## TODO : check comments
      #set($rcDt = $xwiki.jodatime.getDateTime($rcDoc.getDate().getTime()))
      ## The handleComment macro overwrites rcType variable if the last modification is a comment.
      #handleComment($rcDoc $rcType $rcDt $commentsOrder)
      ## The handleAttachments macro put a list of attachments uploaded during the day by the author in $rcAttachments.
      #handleAttachments($rcDoc $rcAuthor $rcDt)
      #if($rcAuthor == $previousAuthor && $rcDt.getYear() == $previousDt.getYear() && $rcDt.getDayOfYear() == $previousDt.getDayOfYear())
        ## Same day and author, continue in the same row.
      #else
        ## Different day or author, end previous row and start a new one.
        #if($velocityCount > 1)</ul></td></tr>#end ## close previous row if needed
        <tr><td class="recentChangesLeft">#displayRcAuthor($rcAuthor)<br/>
        <span class="recentChangesDate">$xwiki.formatDate($rcDt.toDate(), "MMMM d")</span></td>
        <td class="recentChangesRight"><ul class="xlist"> ## open next cell
      #end
      ## Compute a GUID for this modification with page name, modification date and author.
      #set($modGUID = "${rcDoc.fullName}_${xwiki.formatDate($rcDt.toDate(), 'yyyyMMdd')}_${rcAuthor}")
      ## Build the URL used to retreive the diff viewer URL
      #set($goToDiffURL = $recentChangesDoc.getURL("view", "xpage=plain&action=goToDiffURL&page=${rcDoc.getFullName()}&author=${rcAuthor}&date=${xwiki.formatDate($rcDt.toDate(), 'yyyyMMdd')}&rcShowMinor=${rcShowMinor}"))
      <li class="xitem xunderline xhighlight ${rcType}">
        <div class="xitemcontainer">
          #if($rcType == "comment")
            <div class="modifiedPage"><a href="$rcDoc.getURL()" title="$msg.get("xe.recentchanges.entry.comment.tooltip", [$xwiki.formatDate($rcDt.toDate(), "HH:mm")]) ">$xwiki.getXMLEncoded($rcDoc.getDisplayTitle())</a></div>
            #if($rcShowDiff)
              <div class="xshowonhover modifiedPageActions"><a class="ajax" href="$rcDoc.getURL("vire", "viewer=comments")" onclick="toggleClass(document.getElementById('$modGUID'), 'hidden'); toggleClass(document.getElementById('${modGUID}_comShow'), 'hidden'); toggleClass(document.getElementById('${modGUID}_comHide'), 'hidden'); return false;"><span id="${modGUID}_comShow">[+] $msg.get("xe.recentchanges.entry.comment.show")</span><span id="${modGUID}_comHide" class="hidden">[-] $msg.get("xe.recentchanges.entry.comment.hide")</span> $msg.get("xe.recentchanges.entry.comment")</a></div>
              <div class="commentContainer hidden" id="$modGUID">
                <div class="commentQuote lQuo"> </div>
                <div class="commentQuote rQuo"> </div>
                <div class="comment">
                  $lastComment.get("comment")
                </div>
                ## Display discussion link, this link point to the comments anchor.
                <div class="commentAdd"><img src="$xwiki.getSkinFile("icons/silk/comment.gif")" alt="Reply icon" /> <a href="${rcDoc.getURL("view")}#Comments">$msg.get("xe.recentchanges.entry.comment.seediscussion")</a></div>
              </div>
            #end
          #else
            <div class="modifiedPage"><a href="$rcDoc.getURL()" title="$msg.get("xe.recentchanges.entry.page.tooltip", [$rcDoc.getVersion(), $xwiki.formatDate($rcDt.toDate())])">$xwiki.getXMLEncoded($rcDoc.getDisplayTitle())</a> #displayRcVersion($rcDoc.getVersion())</div>
            #if($rcShowDiff)
              <div class="xshowonhover modifiedPageActions"><a href="$goToDiffURL">$msg.get("xe.recentchanges.entry.page.seemodifications")</a></div>
              ## If the author has uploaded attachments during the day in this page, display them.
              #if($rcAttachments.size() > 0)
                <div class="attachmentContainer" id="$modGUID">
                  <ul>
                    #foreach($rcAttachment in $rcAttachments)
                      <li class="attachment"><a href="$rcDoc.getAttachmentURL($rcAttachment.filename)">$rcAttachment.filename</a> #displayRcVersion($rcAttachment.getVersion())</li>
                    #end
                  </ul>
                </div>
              #end
            #end
          #end
          <div class="xspacer"> </div>
        </div>
      </li>
    #end
    #set($previousAuthor = $rcAuthor)
    #set($previousDt = $rcDt)
  #end
  ## Close last row if any.
  #if($rcDocumentNames.size() > 1)</ul></td></tr>#end
</table>
{{/html}}
##
## Rebuild URL query string
## Workaround until we fix $request.getQueryString()
##
#set($queryString = "")
#set($paramMap = $request.getParameterMap())
#foreach($key in $paramMap.keySet())
  #foreach($value in $paramMap.get($key))
    #set($queryString = "${queryString}&${key}=${value}")
  #end
#end
##
## Provide links to display minor edits and RSS feed.
##
#if($xwiki.hasMinorEdit())
  {{html}}
  <p class="recentChangesMoreActions">
    #if($rcShowMinor)
      <a href="$xwiki.getURL($tdoc.getFullName(), "view", $queryString.replaceAll('rcShowMinor=true', ''))"><img src="$xwiki.getSkinFile("icons/silk/zoom_out.gif")" alt="Hide minor icon"/>$msg.get("xe.recentchanges.hideminor")</a>
    #else
      <a href="$xwiki.getURL($tdoc.getFullName(), "view", "${queryString}&rcShowMinor=true")"><img src="$xwiki.getSkinFile("icons/silk/zoom_in.gif")" alt="Show minor icon"/>$msg.get("xe.recentchanges.showminor")</a>
    #end
    #if($rcShowRss)
      #set($rssURL = "")
      #if($rcTag.size() > 0)
        ## Temporary harcoded URL until we refactor our RSS feeds.
        #set($rssURL = $xwiki.getURL("Main.TagsRss", "view", "xpage=plain&outputSyntax=plain&tag=$listtool.get($rcTag, 0)"))
      #else
        #set($rssURL = $xwiki.getURL('Main.WebRss', 'view', 'xpage=plain'))
      #end
      <a href="${rssURL}"><img src="$xwiki.getSkinFile("icons/silk/feed.gif")" alt="RSS icon"/>$msg.get("xe.recentchanges.rssfeed")</a>
    #end
  </p>
  {{/html}}
#end]
            at org.xwiki.rendering.internal.macro.velocity.VelocityMacro.evaluate(VelocityMacro.java:118)
            at org.xwiki.rendering.internal.macro.velocity.VelocityMacro.evaluate(VelocityMacro.java:44)
            at org.xwiki.rendering.macro.script.AbstractScriptMacro.execute(AbstractScriptMacro.java:200)
            at org.xwiki.rendering.macro.script.AbstractScriptMacro.execute(AbstractScriptMacro.java:52)
            at org.xwiki.rendering.internal.transformation.MacroTransformation.transformOnce(MacroTransformation.java:176)
            at org.xwiki.rendering.internal.transformation.MacroTransformation.transform(MacroTransformation.java:120)
            at org.xwiki.rendering.internal.transformation.DefaultTransformationManager.performTransformations(DefaultTransformationManager.java:72)
            at com.xpn.xwiki.doc.XWikiDocument.performSyntaxConversion(XWikiDocument.java:5584)
            at com.xpn.xwiki.doc.XWikiDocument.performSyntaxConversion(XWikiDocument.java:5559)
            at com.xpn.xwiki.doc.XWikiDocument.getRenderedContent(XWikiDocument.java:557)
            at com.xpn.xwiki.doc.XWikiDocument.getRenderedContent(XWikiDocument.java:571)
            at com.xpn.xwiki.api.Document.getRenderedContent(Document.java:475)
            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.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:191)
            at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:156)
            at com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:108)
            at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1697)
            at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1618)
            at com.xpn.xwiki.api.XWiki.parseTemplate(XWiki.java:657)
            at sun.reflect.GeneratedMethodAccessor146.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.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 org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:336)
            at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:191)
            at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:156)
            at com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:108)
            at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1697)
            at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1618)
            at com.xpn.xwiki.web.Utils.parseTemplate(Utils.java:124)
            at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:224)
            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:617)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at com.xpn.xwiki.wysiwyg.server.filter.ConversionFilter.doFilter(ConversionFilter.java:155)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:117)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at com.xpn.xwiki.plugin.webdav.XWikiDavFilter.doFilter(XWikiDavFilter.java:68)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at com.xpn.xwiki.web.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:295)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:112)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
            at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
            at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:859)
            at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:574)
            at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1527)
            at java.lang.Thread.run(Unknown Source)
Caused by: org.xwiki.velocity.XWikiVelocityException: Failed to evaluate content with id [velocity macro]
            at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:200)
            at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:156)
            at org.xwiki.rendering.internal.macro.velocity.VelocityMacro.evaluate(VelocityMacro.java:110)
            ... 91 more
Caused by: org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getDisplayTitle' in  class com.xpn.xwiki.api.Document threw exception java.lang.NullPointerException at velocity macro[line 243, column 195]
            at org.apache.velocity.runtime.parser.node.ASTMethod.handleInvocationException(ASTMethod.java:337)
            at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:284)
            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.ASTMethod.execute(ASTMethod.java:155)
            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.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.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.directive.Foreach.render(Foreach.java:366)
            at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:175)
            at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:336)
            at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:191)
            ... 93 more
Caused by: java.lang.NullPointerException
            at com.xpn.xwiki.doc.XWikiDocument.getXDOM(XWikiDocument.java:5540)
            at com.xpn.xwiki.doc.XWikiDocument.getRenderedContentTitle(XWikiDocument.java:780)
            at com.xpn.xwiki.doc.XWikiDocument.getRenderedTitle(XWikiDocument.java:838)
            at com.xpn.xwiki.doc.XWikiDocument.getDisplayTitle(XWikiDocument.java:725)
            at com.xpn.xwiki.api.Document.getDisplayTitle(Document.java:254)
            at sun.reflect.GeneratedMethodAccessor179.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.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)
            ... 108 more




_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users
Sergiu Dumitriu-2

Re: error installing xwiki 2.0.1

Reply Threaded More More options
Print post
Permalink
In reply to this post by Michael Beetz
On 10/20/2009 10:15 PM, Michael Beetz wrote:

> Hi all,
>
> I've installed xwiki 2.0.1 on several systems.  I've got the error below on a few of them just opening the wiki for the "Recent Changes" - "Failed to execute macro: velocity".  I've solved it for one wiki (solved it by accident) exporting and importing that wiki.  The second one is to big to do so.  The error rises for a farm wiki and a standard wiki.
>
> I am switching back to the 2.0 wiki ".war" using the 2.0.1 ".xar" pages.
>
> Kind regards
> mb
>
> This is the<  100KB version of that Mail

Looks like the content cannot be parsed. Could be the same problem as
http://markmail.org/thread/lztsoczh24oosa5k ?

> Caused by: java.lang.NullPointerException
>              at com.xpn.xwiki.doc.XWikiDocument.getXDOM(XWikiDocument.java:5540)


--
Sergiu Dumitriu
http://purl.org/net/sergiu/
_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users