Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-5508

Velocity error on a revision view when including a page with fewer versions

    XMLWordPrintable

Details

    • Unknown

    Description

      Steps to reproduce:

      • Create a page to include (e.g Sandbox.ToInclude) with some text
      • Go to http://localhost:8080/xwiki/bin/view/Panels and create a panel
      • Add the include to the panel content and save it:
        #panelheader('TestPanel')
        #includeForm('Sandbox.ToInclude')
        #panelfooter()
        
      • Also, save the panel a few times to make sure it has more revisions then the page to include
      • Go to the History tab and open the last revision
        As a result you will get the following error:
        Error number 4001 in 4: Error while parsing velocity page xwiki:Panels.TestPanel Wrapped Exception: Failed to evaluate content with id Test Panel
        
        Error number 4001 in 4: Error while parsing velocity page xwiki:Panels.TestPanel
        Wrapped Exception: Failed to evaluate content with id Test Panel
        com.xpn.xwiki.XWikiException: Error number 4001 in 4: Error while parsing velocity page xwiki:Panels.TestPanel
        Wrapped Exception: Failed to evaluate content with id Test Panel
        	at com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:122)
        	at com.xpn.xwiki.render.XWikiVelocityRenderer.render(XWikiVelocityRenderer.java:93)
        	at com.xpn.xwiki.render.DefaultXWikiRenderingEngine.renderText(DefaultXWikiRenderingEngine.java:292)
        	at com.xpn.xwiki.render.DefaultXWikiRenderingEngine.renderText(DefaultXWikiRenderingEngine.java:222)
        	at com.xpn.xwiki.render.DefaultXWikiRenderingEngine.renderText(DefaultXWikiRenderingEngine.java:190)
        	at com.xpn.xwiki.render.DefaultXWikiRenderingEngine.renderDocument(DefaultXWikiRenderingEngine.java:179)
        	at com.xpn.xwiki.doc.XWikiDocument.getRenderedContent(XWikiDocument.java:824)
        	at com.xpn.xwiki.doc.XWikiDocument.getRenderedContent(XWikiDocument.java:780)
        	at com.xpn.xwiki.doc.XWikiDocument.getRenderedContent(XWikiDocument.java:872)
        	at com.xpn.xwiki.api.Document.getRenderedContent(Document.java:527)
        	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        	at java.lang.reflect.Method.invoke(Method.java:592)
        	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:1855)
        	at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1793)
        	at com.xpn.xwiki.api.XWiki.parseTemplate(XWiki.java:896)
        	at sun.reflect.GeneratedMethodAccessor85.invoke(Unknown Source)
        	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        	at java.lang.reflect.Method.invoke(Method.java:592)
        	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: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.parseTemplate(XWiki.java:1903)
        	at com.xpn.xwiki.XWiki.evaluateTemplate(XWiki.java:1825)
        	at com.xpn.xwiki.web.Utils.parseTemplate(Utils.java:155)
        	at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:225)
        	at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:116)
        	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:707)
        	at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
        	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
        	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166)
        	at com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:129)
        	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
        	at com.xpn.xwiki.wysiwyg.server.filter.ConversionFilter.doFilter(ConversionFilter.java:152)
        	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
        	at com.xpn.xwiki.plugin.webdav.XWikiDavFilter.doFilter(XWikiDavFilter.java:68)
        	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
        	at org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:218)
        	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
        	at org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:112)
        	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
        	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
        	at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
        	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
        	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
        	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
        	at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
        	at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
        	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
        	at org.mortbay.jetty.Server.handle(Server.java:326)
        	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:536)
        	at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:915)
        	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:539)
        	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
        	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:405)
        	at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
        	at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
        
        Wrapped Exception:
        
        org.apache.velocity.exception.MethodInvocationException: Invocation of method 'includeForm' in class com.xpn.xwiki.api.XWiki threw exception com.xpn.xwiki.XWikiException: Error number 3205 in 3: Version 1.3 does not exist while reading document Panels.PanelSheet at /templates/macros.vmline 70, column 8? 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.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.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.render.XWikiVelocityRenderer.render(XWikiVelocityRenderer.java:93) at com.xpn.xwiki.render.DefaultXWikiRenderingEngine.renderText(DefaultXWikiRenderingEngine.java:292) at com.xpn.xwiki.render.DefaultXWikiRenderingEngine.renderText(DefaultXWikiRenderingEngine.java:222) at com.xpn.xwiki.render.DefaultXWikiRenderingEngine.renderText(DefaultXWikiRenderingEngine.java:190) at com.xpn.xwiki.render.DefaultXWikiRenderingEngine.renderDocument(DefaultXWikiRenderingEngine.java:179) at com.xpn.xwiki.doc.XWikiDocument.getRenderedContent(XWikiDocument.java:824) at com.xpn.xwiki.doc.XWikiDocument.getRenderedContent(XWikiDocument.java:780) at com.xpn.xwiki.doc.XWikiDocument.getRenderedContent(XWikiDocument.java:872) at com.xpn.xwiki.api.Document.getRenderedContent(Document.java:527) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:592) 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:1855) at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1793) at com.xpn.xwiki.api.XWiki.parseTemplate(XWiki.java:896) at sun.reflect.GeneratedMethodAccessor85.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:592) 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: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.parseTemplate(XWiki.java:1903) at com.xpn.xwiki.XWiki.evaluateTemplate(XWiki.java:1825) at com.xpn.xwiki.web.Utils.parseTemplate(Utils.java:155) at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:225) at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:116) 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:707) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166) at com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:129) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at com.xpn.xwiki.wysiwyg.server.filter.ConversionFilter.doFilter(ConversionFilter.java:152) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at com.xpn.xwiki.plugin.webdav.XWikiDavFilter.doFilter(XWikiDavFilter.java:68) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:218) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:112) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418) at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230) at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:326) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:536) at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:915) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:539) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:405) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409) at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582) Caused by: com.xpn.xwiki.XWikiException: Error number 3205 in 3: Version 1.3 does not exist while reading document Panels.PanelSheet at com.xpn.xwiki.store.XWikiHibernateVersioningStore.loadXWikiDoc(XWikiHibernateVersioningStore.java:220) at com.xpn.xwiki.XWiki.getDocument(XWiki.java:1484) at com.xpn.xwiki.doc.XWikiDocument.getTranslatedContent(XWikiDocument.java:5184) at com.xpn.xwiki.doc.XWikiDocument.getTranslatedContent(XWikiDocument.java:5173) at com.xpn.xwiki.doc.XWikiDocument.getRenderedContent(XWikiDocument.java:790) at com.xpn.xwiki.XWiki.getRenderedContent(XWiki.java:4269) at com.xpn.xwiki.XWiki.include(XWiki.java:4184) at com.xpn.xwiki.api.XWiki.includeForm(XWiki.java:1646) at com.xpn.xwiki.api.XWiki.includeForm(XWiki.java:1606) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:592) 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) ... 100 more
        

      Attachments

        Activity

          People

            sdumitriu Sergiu Dumitriu
            oana.tabaranu Elena-Oana Florea
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: