Ordinal parameters error

Hello, I would like to ask your help with the following problem that is presented to me in xwiki

org.xwiki.rendering.macro.MacroExecutionException: Failed to evaluate Velocity Macro for content [#if ($request.xaction == 'switchContext')
  $response.sendRedirect($request.target)
  #stop
#end

#set ($adminAction = 'admin')
#set ($crtCategoryId = "$!{request.category}")
#if ($crtCategoryId != '')
  #set ($crtCategoryId = $mathtool.toInteger($crtCategoryId))
#end
#set ($crtSectionId = "$!{request.section}")

##
## Admin menu map
##
## displayInSection: menu.name | sectionOrder: 200 | page: Menu.MenuConfigurationSection
## displayInSection: panels.applications | sectionOrder: 400 | page: PanelsCode.ApplicationsPanelConfigurable
## displayInSection: panels.navigation | sectionOrder: 500 | page: PanelsCode.NavigationConfigurationSection
#set($adminMenu = [
  {
    'id' : 'lf',
    'icon': 'columns',
    'displayBeforeCategory': 'content',
    'children': [
       {'id' : 'Themes', 'perSpace' : true, 'order' : 100},
       {'id' : 'Panels.PanelWizard', 'perSpace' : true, 'order' : 300},
       {'id' : 'Presentation', 'perSpace' : true, 'order' : 600}
    ]
  },
  {
    'id' : 'usersgroups',
    'icon': 'group',
    'displayBeforeCategory': 'extensionmanager',
    'children': [
       {'id' : 'Users', 'order' : 100},
       {'id' : 'Groups', 'order' : 200},
       {'id' : 'Rights', 'perSpace' : false, 'order' : 300},
       {'id' : 'PageAndChildrenRights', 'perSpace' : true, 'order' : 300, 'global': false},
       {'id' : 'PageRights', 'perSpace' : true, 'order' : 350, 'global': false},
       {'id' : 'UserProfile', 'order' : 400},
       {'id' : 'Registration', 'order' : 500}
    ]
  },
  {
    'id' : 'other',
    'icon': 'wrench',
    'children' : []
  }
])

##
## Fill in the list of custom applications to configure
##
#findCustomSectionsToConfigure($adminMenu)
##
## Filter only the sections that are valid in the context
##
#set ($categoriesToRemove = [])
#foreach ($category in $adminMenu)
  #set ($sectionsToRemove = [])
  #foreach ($section in $category.children)
    #if ($editor == 'spaceadmin' && !$section.perSpace)
      #set ($discard = $sectionsToRemove.add($section))
    #elseif ($editor == 'globaladmin' && "$!section.global" == "false")
      ## For retro-compatibility, all sections are global unless the 'global' field is explicitly marked as false
      #set ($discard = $sectionsToRemove.add($section))
    #end
  #end
  #set ($discard = $category.children.removeAll($sectionsToRemove))
  #if ($category.children.size() == 0)
    #set ($discard = $categoriesToRemove.add($category))
  #end
#end
#set ($discard = $adminMenu.removeAll($categoriesToRemove))
#if ("$!crtCategoryId" != '' && $crtCategoryId >= $adminMenu.size())
  #set ($crtCategoryId = '')
#end

##
## Prepare the Admin menu map for processing
##
#set ($filteredAdminMenu = [])
#set ($crtSection = $NULL)
#set ($crtCategory = $NULL)
#foreach ($category in $adminMenu)
  ## "Standard" URLs and icons for categories
  #set ($category.url = $xwiki.getURL($currentDoc, $adminAction, "category=${mathtool.sub($velocityCount, 1)}"))
  #if ($xwiki.getDocument('XWiki.AdminSheet').getAttachment("${category.id}.png"))
    #set ($category.iconReference = "XWiki.AdminSheet@${category.id}.png")
  #else
    #set ($category.iconReference = "XWiki.ConfigurableClass@DefaultAdminSectionIcon.png")
  #end
  #set ($category.description = $services.localization.render("admin.${category.id}.description").trim())
  #set ($category.cssClass = "${category.id}Icon")
  #set ($category.name = $services.localization.render("admin.${category.id}").trim())
  #if ("$!{crtCategoryId}" != '' && $velocityCount == $mathtool.add($crtCategoryId, 1))
    #set ($crtCategory = $category)
  #end
  ##
  ## Process each admin section
  #set ($filteredCategoryChildren = [])
  #foreach ($section in $category.children)
    #if ($xwiki.exists($section.id) || $xwiki.exists("XWiki.Admin${section.id}Sheet"))
      #if ($crtSectionId == $section.id)
        #set ($crtSection = $section)
        #set ($crtCategory = $category)
      #end
      #set ($section.iconReference = '')
      #if ($section.id.indexOf('.') > 0)
        #set ($sectionDoc = $xwiki.getDocument($section.id))
        #set ($section.name = $sectionDoc.getDisplayTitle())
        #if ($sectionDoc.getAttachment('icon.png'))
          #set ($section.iconReference = "${sectionDoc}@icon.png")
        #else
          #set ($section.iconReference = 'XWiki.ConfigurableClass@DefaultAdminSectionIcon.png')
        #end
      #else
        #set ($sectionDoc = $xwiki.getDocument('XWiki.AdminSheet'))
        #set ($section.name = $services.localization.render("admin.${section.id.toLowerCase()}"))
        #set ($iconName = "${section.id.toLowerCase()}.png")
        #if ($sectionDoc.getAttachment($iconName))
          #set ($section.iconReference = "${sectionDoc}@${iconName}")
        #else
          #set ($section.iconReference = 'XWiki.ConfigurableClass@DefaultAdminSectionIcon.png')
        #end
      #end
      #set ($query = "editor=$escapetool.url(${editor})&section=$escapetool.url(${section.id})")
      #if ($editor != 'globaladmin')
        #set ($query = $query + "&space=$escapetool.url(${currentSpace})")
      #end
      #set ($action = "$!{section.action}")
      #if ($action == '')
        #set ($action = $adminAction)
      #end
      #set ($section.url = $xwiki.getURL($currentDoc, $action, $query))
      #set ($key = "admin.${section.id.toLowerCase()}.description")
      #if ($services.localization.get($key))
        #set ($section.description = $services.localization.render($key))
      #end
      #set ($discard = $filteredCategoryChildren.add($section))
    #elseif ($section.configurable)
      #if ($section.readOnly)
        #set ($section.cssClass = 'readOnly')
      #end
      #if ($crtSectionId == $section.id)
        #set ($crtSection = $section)
        #set ($crtCategory = $category)
      #end
      #set ($discard = $filteredCategoryChildren.add($section))
    #end
  #end
  #set ($category.children = $filteredCategoryChildren)
  #if ($filteredCategoryChildren.size() > 0)
    #set ($discard = $filteredAdminMenu.add($category))
  #end
#end
#set ($adminMenu = $filteredAdminMenu)

## Mark the active category/section. We use this flag when displaying the menu.
#if ($crtCategory)
  #set ($crtCategory.active = true)
  #if ($crtSection)
    #set ($crtSection.active = true)
  #else
    #set ($crtSectionId = $NULL)
  #end
#else
  #set ($crtCategoryId = $NULL)
#end

#**
 * Displays the sections from an administration category
 *
 * Expected format:
 * sections = vector of items
 * item = map with the following fields:
 *        'id'       : mandatory
 *        'name'     : the text displayed for the corresponding menu item;
 *                     optional, defaults to
 *                     $services.localization.render("$!{translationPrefix}${item.id}")
 *        'description' : the description displayed for the corresponding section;
 *                     optional
 *        'link'     : the "action" of the menu item; mandatory
 *        'cssClass' : a specific css class for the menu item for custom
 *                     styling; optional, defaults to ''
 *
 * @param $sections the sections list, in the format described above
 * @param $translationPrefix the translation prefix added to the id of each
 *        item, in order to generate the name and description; ignored when
 *        name or description are specified
 *#
#macro(admin_displayCategory $sections $translationPrefix)
(% class="admin-category" %)
  #set ($sortedSections = [])
  #sortCollectionOfMapsByField($sections, 'order', 9999, 'asc', $sortedSections)
  #foreach ($section in $sortedSections)
    * [[[[image:${section.iconReference}]] **${section.name}**>>path:${section.url}]] (% class="description" %)$!{section.description}
  #end
#end


#**
 * Displays the administration categories
 *
 * Expected format:
 * sections = vector of items
 * item = map with the following fields:
 *        'id'       : mandatory
 *        'name'     : the text displayed for the corresponding menu item;
 *                     optional, defaults to
 *                     $services.localization.render("$!{translationPrefix}${item.id}")
 *        'description' : the description displayed for the corresponding section;
 *                     optional
 *        'link'     : the "action" of the menu item; mandatory
 *        'cssClass' : a specific css class for the menu item for custom
 *                     styling; optional, defaults to ''
 *
 * @param $sections the sections list, in the format described above
 * @param $translationPrefix the translation prefix added to the id of each
 *        item, in order to generate the name and description; ignored when
 *        name or description are specified
 *#
#macro(admin_displayCategories $adminMenu $translationPrefix)
(% class="admin-category" %)
  #foreach ($category in $adminMenu)
    * [[[[image:${category.iconReference}]] **${category.name}**>>path:${category.url}]] (% class="description" %)$!{category.description}
  #end
#end

#macro (verticalNavigation $menu $options)
  {{html clean="false"}}
  <div id="$!options.id" class="panel-group $!options.cssClass" role="tablist" aria-multiselectable="true">
    <div class="panel xform">
      <label for="adminsearchmenu" class="hidden">$services.localization.render('search')</label>
      <input type="text" class="form-control panel-group-filter" autocomplete="off" id="adminsearchmenu"
        placeholder="$escapetool.xml($services.localization.render('administration.menu.search.hint'))" />
    </div>
    #foreach ($item in $menu)
      #verticalNavigationItem($item $options)
    #end
    <div class="panel panel-default noitems hidden">
      <div class="panel-heading collapsed">
        $escapetool.xml($services.localization.render('administration.menu.search.noResults'))
      </div>
    </div>
  </div>
  {{/html}}
#end

#macro (verticalNavigationItem $item $options)
  #set ($escapedId = $escapetool.xml($item.id))
  #set ($name = "$!item.name")
  #if ($name == '')
    #set ($name = $services.localization.render("$!options.translationPrefix$item.id"))
  #end
  #set ($isActive = $item.active == true)
  #set ($hasChildren = $item.children && $item.children.size() > 0)
  #if ($hasChildren)
    #set ($children = [])
    #sortCollectionOfMapsByField($item.children, 'order', 99999, 'asc', $children)
    <div class="panel panel-default">
      <a class="panel-heading#if (!$isActive) collapsed#end" role="tab" id="panel-heading-$escapedId"
        href="$!item.url" data-toggle="collapse"#if ("$!options.id" != '') data-parent="#$options.id" #end
        data-target="#panel-body-$escapedId" aria-expanded="$isActive" aria-controls="panel-body-$escapedId"
        title="$!escapetool.xml($item.description)">$!services.icon.renderHTML($item.icon)$escapetool.xml($name)</a>
      <div class="panel-collapse collapse#if ($isActive) in#end" role="tabpanel" id="panel-body-$escapedId"
          aria-labelledby="panel-heading-$escapedId">
        <div class="list-group">
          #foreach ($child in $children)
            #verticalNavigationItem($child $options)
          #end
        </div>
      </div>
    </div>
  #else
    <a class="list-group-item#if ($isActive) active#end" data-id="$escapedId"
      href="$!item.url" title="$!escapetool.xml($item.description)"
      >$!services.icon.renderHTML($item.icon)$escapetool.xml($name)</a>
  #end
#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 org.xwiki.display.internal.DocumentContentDisplayer.display(DocumentContentDisplayer.java:263)
	at org.xwiki.display.internal.DocumentContentDisplayer.display(DocumentContentDisplayer.java:133)
	at org.xwiki.display.internal.DocumentContentDisplayer.display(DocumentContentDisplayer.java:58)
	at org.xwiki.display.internal.DefaultDocumentDisplayer.display(DefaultDocumentDisplayer.java:96)
	at org.xwiki.display.internal.DefaultDocumentDisplayer.display(DefaultDocumentDisplayer.java:39)
	at org.xwiki.sheet.internal.SheetDocumentDisplayer.display(SheetDocumentDisplayer.java:245)
	at org.xwiki.sheet.internal.SheetDocumentDisplayer.applySheet(SheetDocumentDisplayer.java:225)
	at org.xwiki.sheet.internal.SheetDocumentDisplayer.maybeDisplayWithSheet(SheetDocumentDisplayer.java:180)
	at org.xwiki.sheet.internal.SheetDocumentDisplayer.display(SheetDocumentDisplayer.java:111)
	at org.xwiki.sheet.internal.SheetDocumentDisplayer.display(SheetDocumentDisplayer.java:52)
	at org.xwiki.display.internal.ConfiguredDocumentDisplayer.display(ConfiguredDocumentDisplayer.java:68)
	at org.xwiki.display.internal.ConfiguredDocumentDisplayer.display(ConfiguredDocumentDisplayer.java:42)
	at com.xpn.xwiki.script.display.DisplayScriptService.document(DisplayScriptService.java:143)
	at com.xpn.xwiki.script.display.DisplayScriptService.content(DisplayScriptService.java:206)
	at com.xpn.xwiki.script.display.DisplayScriptService.content(DisplayScriptService.java:165)
	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)
	at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:280)
	at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:369)
	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: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:2320)
	at com.xpn.xwiki.web.Utils.parseTemplate(Utils.java:179)
	at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:489)
	at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:210)
	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:622)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
	at com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:112)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
	at org.xwiki.wysiwyg.filter.ConversionFilter.doFilter(ConversionFilter.java:109)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
	at org.xwiki.container.servlet.filters.internal.SetHTTPHeaderFilter.doFilter(SetHTTPHeaderFilter.java:63)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
	at org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:208)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
	at org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:111)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
	at org.xwiki.resource.servlet.RoutingFilter.doFilter(RoutingFilter.java:134)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:624)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:349)
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:783)
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:789)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1437)
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
	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 [xwiki:XWiki.AdminSheet]
	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)
	... 94 more
Caused by: org.apache.velocity.exception.MethodInvocationException: Invocation of method 'execute' in  class org.xwiki.query.internal.ScriptQuery threw exception org.xwiki.query.QueryException: Exception while executing query. Query statement = [, BaseObject as obj, StringProperty as category, IntegerProperty as sectionOrder, IntegerProperty as global where obj.name = doc.fullName and obj.className = :className and category.id = obj.id and category.name = 'displayInCategory' and sectionOrder.id = obj.id and sectionOrder.name = 'sectionOrder' and global.id = obj.id and global.name = 'configureGlobally' and global.value = :global order by case when category.value is null or category.value = '' then 1 else 0 end, category.value, sectionOrder.value] at 54:xwiki:XWiki.AdminSheet[line 85, column 99]
	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.ASTMethod.execute(ASTMethod.java:151)
	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.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.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)
	... 96 more
Caused by: org.xwiki.query.QueryException: Exception while executing query. Query statement = [, BaseObject as obj, StringProperty as category, IntegerProperty as sectionOrder, IntegerProperty as global where obj.name = doc.fullName and obj.className = :className and category.id = obj.id and category.name = 'displayInCategory' and sectionOrder.id = obj.id and sectionOrder.name = 'sectionOrder' and global.id = obj.id and global.name = 'configureGlobally' and global.value = :global order by case when category.value is null or category.value = '' then 1 else 0 end, category.value, sectionOrder.value]
	at com.xpn.xwiki.store.hibernate.query.HqlQueryExecutor.execute(HqlQueryExecutor.java:195)
	at org.xwiki.query.internal.DefaultQueryExecutorManager.execute(DefaultQueryExecutorManager.java:72)
	at org.xwiki.query.internal.SecureQueryExecutorManager.execute(SecureQueryExecutorManager.java:67)
	at org.xwiki.query.internal.DefaultQuery.execute(DefaultQuery.java:296)
	at org.xwiki.query.internal.ScriptQuery.execute(ScriptQuery.java:245)
	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)
	... 116 more
Caused by: com.xpn.xwiki.XWikiException: Error number 0 in 3: Exception while hibernate execute
	at com.xpn.xwiki.store.XWikiHibernateBaseStore.execute(XWikiHibernateBaseStore.java:927)
	at com.xpn.xwiki.store.XWikiHibernateBaseStore.executeRead(XWikiHibernateBaseStore.java:990)
	at com.xpn.xwiki.store.hibernate.query.HqlQueryExecutor.execute(HqlQueryExecutor.java:177)
	... 127 more
Caused by: org.hibernate.QueryParameterException: Position beyond number of declared ordinal parameters. Remember that ordinal parameters are 1-based! Position: 1
	at org.hibernate.engine.query.ParameterMetadata.getOrdinalParameterDescriptor(ParameterMetadata.java:81)
	at org.hibernate.engine.query.ParameterMetadata.getOrdinalParameterExpectedType(ParameterMetadata.java:87)
	at org.hibernate.impl.AbstractQueryImpl.determineType(AbstractQueryImpl.java:444)
	at org.hibernate.impl.AbstractQueryImpl.setParameter(AbstractQueryImpl.java:416)
	at com.xpn.xwiki.store.hibernate.query.HqlQueryExecutor.populateParameters(HqlQueryExecutor.java:391)
	at com.xpn.xwiki.store.hibernate.query.HqlQueryExecutor.createHibernateQuery(HqlQueryExecutor.java:221)
	at com.xpn.xwiki.store.hibernate.query.HqlQueryExecutor$1.doInHibernate(HqlQueryExecutor.java:183)
	at com.xpn.xwiki.store.hibernate.query.HqlQueryExecutor$1.doInHibernate(HqlQueryExecutor.java:178)
	at com.xpn.xwiki.store.XWikiHibernateBaseStore.execute(XWikiHibernateBaseStore.java:921)
	... 129 more

Hi, could you tell us what version of XWiki you’re using?

Hi,
version: 10.11.8

EDIT

Error message: Failed to execute the [velocity] macro. Cause: [Position beyond number of declared ordinal parameters. Remember that ordinal parameters are 1-based! Position: 1]. Click on this message for details.

Tomcat log:

2019-07-09 11:56:26,355 [http://localhost:8080/xwiki-platform-distribution-war-10.11.8/bin/admin/XWiki/XWikiPreferences] ERROR o.x.v.i.DefaultVelocityEngine - Exception in macro #findNamesOfAppsToConfigure called at 78:xwiki:XWiki.AdminSheet[line 95, column 1]
2019-07-09 11:56:26,355 [http://localhost:8080/xwiki-platform-distribution-war-10.11.8/bin/admin/XWiki/XWikiPreferences] ERROR o.x.v.i.DefaultVelocityEngine - Exception in macro #findCustomSectionsToConfigure called at 78:xwiki:XWiki.AdminSheet[line 54, column 1]

now i change version for 11.5 and it’s works fine :smiley: