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

Navigating the Extension to page 2 during upgrade causes error

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Minor
    • None
    • 11.3
    • None
    • None
    • Unknown

    Description

      During the upgrade form 10.4 to 11.3, there were more than 5 extensions to upgrade ... so I hit the second page navigation element at the bottom ... which caused:

       

      org.xwiki.rendering.macro.MacroExecutionException: Failed to evaluate Velocity Macro for content [#if ("$!request.action" == '')
      {{ ## Display the step.}}
      {{ #set ($discard = "#getExtensionUpdaterPlan($plan)")}}
      {{ #if (!$isAjaxRequest)}}
      {{ ## The list of outdated/invalid extensions is paginated so we load the CSS here because the request is not AJAX.}}
      {{ ## Make sure the browser won't keep the same version of the resource in cache from one version of XWiki to another}}
      {{ #set ($discard = $xwiki.ssfx.use('uicomponents/pagination/pagination.css', {'forceSkinAction': true, 'version': $environmentVersion}))}}
      {{ $services.localization.render('platform.extension.distributionWizard.extensionsStepDescription', [}}
      {{ '[[', '>>http://platform.xwiki.org/xwiki/bin/view/Features/Applications]]',}}
      {{ '[[', '>>http://extensions.xwiki.org/xwiki/bin/view/Extension/Wiki+Macro+Bridge+Application]]',}}
      {{ '[[', '>>http://extensions.xwiki.org/xwiki/bin/view/Extension/Color+Theme+Application]]',}}
      {{ '[[', '>>http://extensions.xwiki.org/xwiki/bin/view/Extension/Component+Module]]',}}
      {{ '[', '>>http://extensions.xwiki.org/xwiki/bin/view/Extension/Script+Module#HScriptServices]'])}}{{html#displayExtensionUpdaterTrigger($plan)/html}}#end
      {{ (% class="extensionUpdater" %)(((}}
      {{ #if ($plan.state == 'FINISHED')}}
      {{ (% class="xHint" %)}}
      {{ $services.localization.render('platform.extension.updater.lastCheckDate',}}
      {{ [$xwiki.formatDate($plan.endDate)])}}{{html#displayExtensionUpdaterPlan($plan)/html}}
      {{ #set ($showCompleteStepButton = $invalid.isEmpty())}}
      {{ #elseif ($plan)}}
      {{ (% class="xHint" %)}}
      {{ translation key="platform.extension.updater.loading"/}}{{html}}
      {{ #displayJobProgressBar($plan)}}
      {{ #displayExtensionUpdaterPlanStatus($plan)}}
      {{ /html}}
      {{ #end}}
      {{ )))}}
      #elseif ($request.action.startsWith('checkForUpdates'))
      {{ #computeExtensionUpdaterPlan($plan $request.action.equals('checkForUpdatesGlobally'))}}
      #end]
      {{ at org.xwiki.rendering.internal.macro.velocity.VelocityMacro.evaluateString(VelocityMacro.java:139)}}
      {{ at org.xwiki.rendering.internal.macro.velocity.VelocityMacro.evaluateString(VelocityMacro.java:52)}}
      {{ at org.xwiki.rendering.macro.script.AbstractScriptMacro.evaluateBlock(AbstractScriptMacro.java:286)}}
      {{ at org.xwiki.rendering.macro.script.AbstractScriptMacro.execute(AbstractScriptMacro.java:182)}}
      {{ at org.xwiki.rendering.macro.script.AbstractScriptMacro.execute(AbstractScriptMacro.java:58)}}
      {{ at org.xwiki.rendering.internal.transformation.macro.MacroTransformation.transform(MacroTransformation.java:297)}}
      {{ at org.xwiki.rendering.internal.transformation.DefaultRenderingContext.transformInContext(DefaultRenderingContext.java:183)}}
      {{ at org.xwiki.rendering.internal.transformation.DefaultTransformationManager.performTransformations(DefaultTransformationManager.java:101)}}
      {{ at com.xpn.xwiki.internal.template.InternalTemplateManager.transform(InternalTemplateManager.java:569)}}
      {{ at com.xpn.xwiki.internal.template.InternalTemplateManager.execute(InternalTemplateManager.java:806)}}
      {{ at com.xpn.xwiki.internal.template.InternalTemplateManager.lambda$execute$1(InternalTemplateManager.java:817)}}
      {{ at com.xpn.xwiki.internal.security.authorization.DefaultAuthorExecutor.call(DefaultAuthorExecutor.java:98)}}
      {{ at com.xpn.xwiki.internal.template.InternalTemplateManager.execute(InternalTemplateManager.java:817)}}
      {{ at com.xpn.xwiki.internal.template.InternalTemplateManager.executeNoException(InternalTemplateManager.java:774)}}
      {{ at com.xpn.xwiki.internal.template.DefaultTemplateManager.executeNoException(DefaultTemplateManager.java:126)}}
      {{ at org.xwiki.extension.distribution.internal.job.step.AbstractDistributionStep.executeInteractive(AbstractDistributionStep.java:125)}}
      {{ at org.xwiki.extension.distribution.internal.DistributionInternalScriptService.renderCurrentStepToXHTML(DistributionInternalScriptService.java:246)}}
      {{ at org.xwiki.extension.distribution.internal.DistributionInternalScriptService.renderCurrentStepToXHTML(DistributionInternalScriptService.java:232)}}
      {{ at sun.reflect.GeneratedMethodAccessor556.invoke(Unknown Source)}}
      {{ at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)}}
      {{ at java.lang.reflect.Method.invoke(Method.java:498)}}
      {{ at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.doInvoke(UberspectImpl.java:395)}}
      {{ at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:384)}}
      {{ at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:173)}}
      {{ at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:280)}}
      {{ at org.apache.velocity.runtime.parser.node.ASTReference.value(ASTReference.java:567)}}
      {{ 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:342)}}
      {{ 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.directive.VelocimacroProxy.render(VelocimacroProxy.java:216)}}
      {{ at org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:311)}}
      {{ at org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:230)}}
      {{ at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:207)}}
      {{ at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72)}}
      {{ at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:342)}}
      {{ 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.SimpleNode.render(SimpleNode.java:342)}}
      {{ at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:106)}}
      {{ at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:342)}}
      {{ at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluateInternal(DefaultVelocityEngine.java:259)}}
      {{ at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:222)}}
      {{ at com.xpn.xwiki.render.DefaultVelocityManager.evaluate(DefaultVelocityManager.java:358)}}
      {{ at com.xpn.xwiki.internal.template.InternalTemplateManager.evaluateContent(InternalTemplateManager.java:874)}}
      {{ at com.xpn.xwiki.internal.template.InternalTemplateManager.render(InternalTemplateManager.java:750)}}
      {{ at com.xpn.xwiki.internal.template.InternalTemplateManager.lambda$renderFromSkin$0(InternalTemplateManager.java:725)}}
      {{ at com.xpn.xwiki.internal.security.authorization.DefaultAuthorExecutor.call(DefaultAuthorExecutor.java:98)}}
      {{ at com.xpn.xwiki.internal.template.InternalTemplateManager.renderFromSkin(InternalTemplateManager.java:724)}}
      {{ at com.xpn.xwiki.internal.template.InternalTemplateManager.renderFromSkin(InternalTemplateManager.java:703)}}
      {{ at com.xpn.xwiki.internal.template.InternalTemplateManager.render(InternalTemplateManager.java:689)}}
      {{ at com.xpn.xwiki.internal.template.DefaultTemplateManager.render(DefaultTemplateManager.java:78)}}
      {{ at com.xpn.xwiki.XWiki.evaluateTemplate(XWiki.java:2354)}}
      {{ at com.xpn.xwiki.web.Utils.parseTemplate(Utils.java:179)}}
      {{ at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:513)}}
      {{ at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:215)}}
      {{ at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425)}}
      {{ at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228)}}
      {{ at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)}}
      {{ at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)}}
      {{ at javax.servlet.http.HttpServlet.service(HttpServlet.java:624)}}
      {{ at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)}}
      {{ at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)}}
      {{ at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)}}
      {{ at com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:112)}}
      {{ at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)}}
      {{ at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)}}
      {{ at org.xwiki.wysiwyg.filter.ConversionFilter.doFilter(ConversionFilter.java:109)}}
      {{ at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)}}
      {{ at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)}}
      {{ at org.xwiki.container.servlet.filters.internal.SetHTTPHeaderFilter.doFilter(SetHTTPHeaderFilter.java:63)}}
      {{ at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)}}
      {{ at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)}}
      {{ at org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:208)}}
      {{ at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)}}
      {{ at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)}}
      {{ at org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:111)}}
      {{ at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)}}
      {{ at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)}}
      {{ at org.xwiki.resource.servlet.RoutingFilter.doFilter(RoutingFilter.java:132)}}
      {{ at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)}}
      {{ at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)}}
      {{ at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:218)}}
      {{ at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:110)}}
      {{ at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)}}
      {{ at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)}}
      {{ at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:962)}}
      {{ at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)}}
      {{ at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:445)}}
      {{ at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1087)}}
      {{ at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637)}}
      {{ at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)}}
      {{ at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)}}
      {{ at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)}}
      {{ at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)}}
      {{ at java.lang.Thread.run(Thread.java:748)}}
      Caused by: org.xwiki.velocity.XWikiVelocityException: Failed to evaluate content with id [/templates/distribution.vm]
      {{ at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:227)}}
      {{ at com.xpn.xwiki.render.DefaultVelocityManager.evaluate(DefaultVelocityManager.java:358)}}
      {{ at org.xwiki.rendering.internal.macro.velocity.VelocityMacro.evaluateString(VelocityMacro.java:131)}}
      {{ ... 97 more}}
      Caused by: org.apache.velocity.exception.MethodInvocationException: Invocation of method 'subList' in class java.util.ArrayList threw exception java.lang.IllegalArgumentException: fromIndex(5) > toIndex(2) at 28:/templates/distribution.vm[line 1606, column 25]
      {{ at org.apache.velocity.runtime.parser.node.ASTMethod.handleInvocationException(ASTMethod.java:243)}}
      {{ at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:187)}}
      {{ at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:280)}}
      {{ at org.apache.velocity.runtime.parser.node.ASTReference.value(ASTReference.java:567)}}
      {{ 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.directive.VelocimacroProxy.render(VelocimacroProxy.java:216)}}
      {{ at org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:311)}}
      {{ at org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:230)}}
      {{ at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:207)}}
      {{ at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72)}}
      {{ at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:342)}}
      {{ 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.SimpleNode.render(SimpleNode.java:342)}}
      {{ 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.directive.VelocimacroProxy.render(VelocimacroProxy.java:216)}}
      {{ at org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:311)}}
      {{ at org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:230)}}
      {{ at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:207)}}
      {{ 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.ASTIfStatement.render(ASTIfStatement.java:87)}}
      {{ at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:342)}}
      {{ at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluateInternal(DefaultVelocityEngine.java:259)}}
      {{ at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:222)}}
      {{ ... 99 more}}
      Caused by: java.lang.IllegalArgumentException: fromIndex(5) > toIndex(2)
      {{ at java.util.ArrayList.subListRangeCheck(ArrayList.java:1014)}}
      {{ at java.util.ArrayList.subList(ArrayList.java:1004)}}
      {{ at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)}}
      {{ at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)}}
      {{ at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)}}
      {{ at java.lang.reflect.Method.invoke(Method.java:498)}}
      {{ at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.doInvoke(UberspectImpl.java:395)}}
      {{ at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:384)}}
      {{ at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:173)}}
      {{ ... 126 more}} 

       

      Completed the upgrade in the Admin UI afterwards, so no big deal ...

      Attachments

        Issue Links

          Activity

            People

              tmortagne Thomas Mortagne
              bbu@netsuccess.ch Beat Burgener
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: