XWiki - XWiki Syntax Guide

Page / - 最后修改者 leeb chi 打开 2020/05/13, 02:14

XWiki Syntax Guide

最后修改者 leeb chi

打开 2020/05/13, 02:14

内容列表

XWiki Syntax 2.1: All

Failed to execute the [velocity] macro. Cause: [xwiki-mysql-db]. Click on this message for details.

org.xwiki.rendering.macro.MacroExecutionException: Failed to evaluate Velocity Macro for content [#set($SUPPORTED_SYNTAXES = {})

#set($void = $SUPPORTED_SYNTAXES.put('1.0', 'XWiki Syntax 1.0'))

#set($void = $SUPPORTED_SYNTAXES.put('2.0', 'XWiki Syntax 2.0'))

#set($void = $SUPPORTED_SYNTAXES.put('2.1', 'XWiki Syntax 2.1'))

##

## needed for sections that contain descriptions valid for several syntaxes

## basically it is hack to reuse the 2.0 descriptions for 2.1

#set($SUPPORTED_SYNTAX_ORDER = ['1.0', '2.0', '2.1'])

##

## filter all syntaxes that are not installed/configured

#set($configuredSyntaxes = $services.rendering.getConfiguredSyntaxes())

#set($enabledSyntaxIds = [])

#foreach($syntax in $configuredSyntaxes)

#set($discard = $enabledSyntaxIds.add($syntax.toIdString()))

#end

#set($unavailableSyntaxes=[])

#foreach($supportedSyntax in $SUPPORTED_SYNTAX_ORDER)

#set($fullSyntaxId = "xwiki/$supportedSyntax")

#if(!$enabledSyntaxIds.contains($fullSyntaxId))

#set($discard = $unavailableSyntaxes.add($supportedSyntax))

#end

#end

#foreach($unavailableSyntax in $unavailableSyntaxes)

#set($discard = $SUPPORTED_SYNTAX_ORDER.remove($unavailableSyntax))

#set($discard = $SUPPORTED_SYNTAXES.removeKey($unavailableSyntax))

#end

#if ($request.xaction == 'switchContext')

$response.sendRedirect($request.target)

#stop

#end

#set ($crtCategoryId = "$!{request.category}")

#if ($crtCategoryId != '')

#set ($crtCategoryId = $mathtool.toInteger($crtCategoryId))

#end

#set ($crtSectionId = "$!{request.section}")

#set ($crtSyntaxVer = "$!{request.syntax}")

#if (!$SUPPORTED_SYNTAXES.containsKey($crtSyntaxVer))

## Default to the most current one (if we have any)

#if(!$SUPPORTED_SYNTAX_ORDER.isEmpty())

#set ($crtSyntaxVer = $SUPPORTED_SYNTAX_ORDER.get($mathtool.sub($SUPPORTED_SYNTAX_ORDER.size(),1)))

#end

#end

#set($crtSyntaxPos = $SUPPORTED_SYNTAX_ORDER.indexOf($crtSyntaxVer))

#set ($extraParamList = [])

#if ($request.language)

#set ($discard = $extraParamList.add("language=$escapetool.url($request.language)"))

#end

#if ($request.xpage)

#set ($discard = $extraParamList.add("xpage=$escapetool.url($request.xpage)"))

#end

#if ($extraParamList.isEmpty())

#set ($extraParams = '')

#else

#set ($extraParams = '&'+$stringtool.join($extraParamList,'&'))

#end

##

## Syntax menu map

##

#set($syntaxMenu = [])

#set($catCount = -1)

#set($catName = "")

#set($catChildren = [])

#set($results = $services.query.xwql('from doc.object(XWiki.XWikiSyntaxClass) as syntax order by syntax.category, syntax.section').addFilter('currentlanguage').addFilter('unique').execute())

#if($results.empty)

No syntax sections found!

#else

#foreach ($item in $results)

#set($sectionDoc = $xwiki.getDocument($item))

#set($obj = $sectionDoc.getObject("XWiki.XWikiSyntaxClass"))

## detect if we entered a new category

#if($catCount < $obj.getProperty("category").value)

## Put previous category into map (if existing), and reset children map

#if($catId)

#set($cat = { 'id' : $catId, 'name' : $catName, 'children' : $catChildren })

$syntaxMenu.add($cat)

#set($catChildren = [])

#end

## extract new catId and catName values, and sectionTitle as we are already traveling the DOM

#foreach($headerBlock in $sectionDoc.getDocument().getXDOM().getBlocks('class:HeaderBlock', 'DESCENDANT'))

#if($headerBlock.getLevel().getAsInt() == 1)

#set($catId = $headerBlock.getId().substring(1))

#set($catName = $services.rendering.render($headerBlock, 'plain/1.0'))

#elseif($headerBlock.getLevel().getAsInt() == 2)

#set($sectionTitle = $services.rendering.render($headerBlock, 'plain/1.0'))

#break

#end

#end

#foreach($headerBlock in $sectionDoc.getTranslatedDocument().getDocument().getXDOM().getBlocks('class:HeaderBlock', 'DESCENDANT'))

#if($headerBlock.getLevel().getAsInt() == 1)

#set($catName = $services.rendering.render($headerBlock, 'plain/1.0'))

#elseif($headerBlock.getLevel().getAsInt() == 2)

#set($sectionTitle = $services.rendering.render($headerBlock, 'plain/1.0'))

#break ## otherwise finds nested example headlines

#end

#end

#set($catCount = $obj.getProperty("category").value)

#else

## still in same category, only need new section title

#foreach($headerBlock in $sectionDoc.getTranslatedDocument().getDocument().getXDOM().getBlocks('class:HeaderBlock', 'DESCENDANT'))

#if($headerBlock.getLevel().getAsInt() == 2)

#set($sectionTitle = $services.rendering.render($headerBlock, 'plain/1.0'))

#break

#end

#end

#end

## Add new sections to category children map

#set($child = {'id' : $sectionDoc.documentReference.name.substring(11), 'minSyntax' : $obj.getProperty("minSyntaxId").value, 'maxSyntax' : $obj.getProperty("maxSyntaxId").value, 'name' : $sectionTitle})

$catChildren.add($child)

#end

#end

#set($cat = { 'id' : $catId, 'name' : $catName, 'children' : $catChildren })

$syntaxMenu.add($cat)

##

## Filter only the sections that are valid for a Syntax

##

#set ($categoriesToRemove = [])

#foreach ($category in $syntaxMenu)

#set ($sectionsToRemove = [])

#foreach ($section on $category.children)

#set($minSyntaxPos = $SUPPORTED_SYNTAX_ORDER.indexOf($section.minSyntax))

#if ($minSyntaxPos > $crtSyntaxPos)

#set ($discard = $sectionsToRemove.add($section))

#if ($section.id == $crtSectionId)

#set ($crtSectionId = '') ## clear section if it doesn't exist (can happen when switching from 2.x to 1.0 syntax)

#end

#end

#end

#set ($discard = $category.children.removeAll($sectionsToRemove))

#if ($category.children.size() == 0)

#set ($discard = $categoriesToRemove.add($category))

#end

#end

#set ($discard = $syntaxMenu.removeAll($categoriesToRemove))

#if ("$!crtCategoryId" != '' && $crtCategoryId >= $syntaxMenu.size())

#set ($crtCategoryId = '')

#end

#if ($crtSectionId != '')

#set ($crtItemId = $crtSectionId)

#elseif ($crtCategoryId != '')

#set ($crtItemId = $syntaxMenu.get($crtCategoryId).id)

#end

#set ($crtSection = $util.null)

#set ($crtCategory = $util.null)

##

## Prepare the Syntax menu map for processing

##

#foreach ($category in $syntaxMenu)

## "Standard" URLs and icons for categories

#set ($category.url = "?syntax=$escapetool.url(${crtSyntaxVer})&category=${mathtool.sub($velocityCount, 1)}${extraParams}")

#set ($category.cssClass = "${category.id}Icon")

#if ("$!{crtCategoryId}" != '' && $velocityCount == $mathtool.add($crtCategoryId, 1))

#set ($crtCategory = $category)

#end

##

## Process each syntax section

#foreach ($section in $category.children)

#if ($xwiki.exists("XWiki.XWikiSyntax${section.id}"))

#if ($crtSectionId == $section.id)

#set ($crtSection = $section)

#set ($crtCategory = $category)

#end

#set ($section.url = "?syntax=$escapetool.url(${crtSyntaxVer})&section=$escapetool.url(${section.id})${extraParams}")

#end

#end

#end

#**

* Displays the sections from a syntax 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}")

*

* @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

* @param $heading the heading syntax

*#

#macro(syntax_displayCategory $sections $translationPrefix $heading)

#foreach ($section in $sections)

#syntax_displaySection($section $translationPrefix $heading)

#end

#end

#macro(syntax_displaySection $section $translationPrefix $heading)

#set ($displayVersion = $crtSyntaxVer)

## here is the hack to display the description for 2.0 if we have no description for 2.x

## this likely needs more work if e.g. there is a 3.x which is not compatible with 2.x

#set($maxSyntaxPos = $SUPPORTED_SYNTAX_ORDER.indexOf($section.maxSyntax))

#if ($crtSyntaxPos > $maxSyntaxPos)

#set ($displayVersion = $section.maxSyntax)

#end

#if($heading)

(% class="sectionheader" %)

$heading $section.name $heading

#end

{{include reference="XWiki.XWikiSyntax${section.id}" section="H${displayVersion}${section.id}"/}}

#end

#**

* Displays the syntax 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}")

*

* @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(syntax_displayCategories $syntaxMenu $translationPrefix)

#set ($subHeading = '====')

#foreach ($category in $syntaxMenu)

== $category.name ==

#syntax_displayCategory($category.children 'syntax.' '===')

#end

#end

#**

* Displays the drop down allowing to switch the syntax.

*#

#macro (syntaxSwitch)

#set ($crtSelection = "")

#if ("$!{crtCategoryId}" != '')

#set ($crtSelection = "category=$escapetool.url($!{crtCategoryId})")

#elseif ($crtSectionId != '')

#set ($crtSelection = "section=$escapetool.url($!{crtSectionId})")

#end

#if ($crtSelection != "")

#set ($crtSelection = "${crtSelection}${extraParams}")

#else

#set ($crtSelection = "$extraParams")

#end

{{html}}

<form id="change-context" class="xformInline" action="$doc.getURL()">

<div>

<input type="hidden" name="xaction" value="switchContext" />

#if ($request.language)

<input type="hidden" name="language" value="$escapetool.xml($request.language)" />

#end

#if ($request.xpage)

<input type="hidden" name="xpage" value="$escapetool.xml($request.xpage)" />

#end

<select id="goto-select" name="target" title="$escapetool.xml($services.localization.render("help.changesyntax"))">

<optgroup label="$services.localization.render('help.choose_syntax')">

#foreach($syntaxId in $SUPPORTED_SYNTAX_ORDER)

#set ($query = "syntax=${escapetool.url($syntaxId)}&${crtSelection}")

<option value="$escapetool.xml($doc.getURL('view', $query))"#if($crtSyntaxVer == $syntaxId) selected="selected"#end>$escapetool.html($SUPPORTED_SYNTAXES.get($syntaxId))</option>

#end

</optgroup>

</select>

<span class="buttonwrapper"><input type="submit" value="$escapetool.xml($services.localization.render('admin.switchContext'))" class="button" /></span>

</div>

</form>

{{/html}}

#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.DocumentContentAsyncExecutor.executeInCurrentExecutionContext(DocumentContentAsyncExecutor.java:348)

at org.xwiki.display.internal.DocumentContentAsyncExecutor.execute(DocumentContentAsyncExecutor.java:221)

at org.xwiki.display.internal.DocumentContentAsyncRenderer.execute(DocumentContentAsyncRenderer.java:107)

at org.xwiki.rendering.async.internal.block.AbstractBlockAsyncRenderer.render(AbstractBlockAsyncRenderer.java:157)

at org.xwiki.rendering.async.internal.block.AbstractBlockAsyncRenderer.render(AbstractBlockAsyncRenderer.java:54)

at org.xwiki.rendering.async.internal.DefaultAsyncRendererExecutor.syncRender(DefaultAsyncRendererExecutor.java:270)

at org.xwiki.rendering.async.internal.DefaultAsyncRendererExecutor.render(DefaultAsyncRendererExecutor.java:247)

at org.xwiki.rendering.async.internal.block.DefaultBlockAsyncRendererExecutor.execute(DefaultBlockAsyncRendererExecutor.java:125)

at org.xwiki.display.internal.DocumentContentDisplayer.display(DocumentContentDisplayer.java:67)

at org.xwiki.display.internal.DocumentContentDisplayer.display(DocumentContentDisplayer.java:43)

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:123)

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.doc.XWikiDocument.display(XWikiDocument.java:1210)

at com.xpn.xwiki.doc.XWikiDocument.getRenderedContent(XWikiDocument.java:1351)

at com.xpn.xwiki.doc.XWikiDocument.getRenderedContent(XWikiDocument.java:1318)

at com.xpn.xwiki.doc.XWikiDocument.getRenderedContent(XWikiDocument.java:1228)

at com.xpn.xwiki.doc.XWikiDocument.getRenderedContent(XWikiDocument.java:1360)

at com.xpn.xwiki.api.Document.getRenderedContent(Document.java:791)

at jdk.internal.reflect.GeneratedMethodAccessor459.invoke(Unknown Source)

at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.base/java.lang.reflect.Method.invoke(Method.java:566)

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.directive.Foreach.render(Foreach.java:420)

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)

at com.xpn.xwiki.render.DefaultVelocityManager.evaluate(DefaultVelocityManager.java:358)

at com.xpn.xwiki.internal.template.VelocityTemplateEvaluator.evaluateContent(VelocityTemplateEvaluator.java:95)

at com.xpn.xwiki.internal.template.TemplateAsyncRenderer.evaluateContent(TemplateAsyncRenderer.java:217)

at com.xpn.xwiki.internal.template.TemplateAsyncRenderer.renderVelocity(TemplateAsyncRenderer.java:180)

at com.xpn.xwiki.internal.template.TemplateAsyncRenderer.render(TemplateAsyncRenderer.java:137)

at com.xpn.xwiki.internal.template.TemplateAsyncRenderer.render(TemplateAsyncRenderer.java:53)

at org.xwiki.rendering.async.internal.DefaultAsyncRendererExecutor.lambda$syncRender$0(DefaultAsyncRendererExecutor.java:264)

at com.xpn.xwiki.internal.security.authorization.DefaultAuthorExecutor.call(DefaultAuthorExecutor.java:98)

at org.xwiki.rendering.async.internal.DefaultAsyncRendererExecutor.syncRender(DefaultAsyncRendererExecutor.java:264)

at org.xwiki.rendering.async.internal.DefaultAsyncRendererExecutor.render(DefaultAsyncRendererExecutor.java:247)

at org.xwiki.rendering.async.internal.block.DefaultBlockAsyncRendererExecutor.render(DefaultBlockAsyncRendererExecutor.java:154)

at com.xpn.xwiki.internal.template.InternalTemplateManager.render(InternalTemplateManager.java:772)

at com.xpn.xwiki.internal.template.InternalTemplateManager.renderFromSkin(InternalTemplateManager.java:745)

at com.xpn.xwiki.internal.template.InternalTemplateManager.renderFromSkin(InternalTemplateManager.java:725)

at com.xpn.xwiki.internal.template.InternalTemplateManager.render(InternalTemplateManager.java:711)

at com.xpn.xwiki.internal.template.DefaultTemplateManager.render(DefaultTemplateManager.java:78)

at com.xpn.xwiki.XWiki.evaluateTemplate(XWiki.java:2490)

at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:2468)

at com.xpn.xwiki.pdf.impl.PdfExportImpl.export(PdfExportImpl.java:152)

at com.xpn.xwiki.web.ExportAction.export(ExportAction.java:185)

at com.xpn.xwiki.web.ExportAction.render(ExportAction.java:91)

at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:500)

at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:218)

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:634)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)

at com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:112)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)

at org.xwiki.wysiwyg.filter.ConversionFilter.doFilter(ConversionFilter.java:109)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)

at org.xwiki.container.servlet.filters.internal.SetHTTPHeaderFilter.doFilter(SetHTTPHeaderFilter.java:63)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)

at org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:208)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)

at org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:111)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)

at org.xwiki.resource.servlet.RoutingFilter.doFilter(RoutingFilter.java:132)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)

at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)

at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)

at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:543)

at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)

at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)

at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:690)

at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)

at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)

at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:615)

at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)

at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:818)

at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1627)

at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)

at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)

at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)

at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)

at java.base/java.lang.Thread.run(Thread.java:834)

Caused by: org.xwiki.velocity.XWikiVelocityException: Failed to evaluate content with id [xwiki:XWiki.XWikiSyntax]

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)

... 109 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 = [ select doc.fullName from XWikiDocument as doc , BaseObject as syntax , com.xpn.xwiki.objects.IntegerProperty as syntax_category1, com.xpn.xwiki.objects.IntegerProperty as syntax_section2 WHERE 1=1 and doc.fullName=syntax.name and syntax.className='XWiki.XWikiSyntaxClass' and syntax_category1.id.id=syntax.id and syntax_category1.id.name='category' and syntax_section2.id.id=syntax.id and syntax_section2.id.name='section' order by syntax_category1.value , syntax_section2.value ] at 22689:xwiki:XWiki.XWikiSyntax[line 67, column 181]

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.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)

... 111 more

Caused by: org.xwiki.query.QueryException: Exception while executing query. Query statement = [ select doc.fullName from XWikiDocument as doc , BaseObject as syntax , com.xpn.xwiki.objects.IntegerProperty as syntax_category1, com.xpn.xwiki.objects.IntegerProperty as syntax_section2 WHERE 1=1 and doc.fullName=syntax.name and syntax.className='XWiki.XWikiSyntaxClass' and syntax_category1.id.id=syntax.id and syntax_category1.id.name='category' and syntax_section2.id.id=syntax.id and syntax_section2.id.name='section' order by syntax_category1.value , syntax_section2.value ]

at com.xpn.xwiki.store.hibernate.query.HqlQueryExecutor.execute(HqlQueryExecutor.java:182)

at org.xwiki.query.internal.DefaultQueryExecutorManager.execute(DefaultQueryExecutorManager.java:72)

at org.xwiki.query.internal.DefaultQuery.execute(DefaultQuery.java:306)

at org.xwiki.query.xwql.internal.XWQLQueryExecutor.execute(XWQLQueryExecutor.java:124)

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:306)

at org.xwiki.query.internal.ScriptQuery.execute(ScriptQuery.java:252)

at jdk.internal.reflect.GeneratedMethodAccessor357.invoke(Unknown Source)

at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.base/java.lang.reflect.Method.invoke(Method.java:566)

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)

... 118 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:826)

at com.xpn.xwiki.store.XWikiHibernateBaseStore.executeRead(XWikiHibernateBaseStore.java:889)

at com.xpn.xwiki.store.hibernate.query.HqlQueryExecutor.execute(HqlQueryExecutor.java:170)

... 131 more

Caused by: org.hibernate.exception.JDBCConnectionException: Unable to acquire JDBC Connection

at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:112)

at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42)

at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:113)

at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:99)

at org.hibernate.resource.jdbc.internal.LogicalConnectionManagedImpl.acquireConnectionIfNeeded(LogicalConnectionManagedImpl.java:107)

at org.hibernate.resource.jdbc.internal.LogicalConnectionManagedImpl.getPhysicalConnection(LogicalConnectionManagedImpl.java:134)

at org.hibernate.resource.jdbc.internal.LogicalConnectionManagedImpl.getConnectionForTransactionManagement(LogicalConnectionManagedImpl.java:250)

at org.hibernate.resource.jdbc.internal.LogicalConnectionManagedImpl.begin(LogicalConnectionManagedImpl.java:258)

at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl$TransactionDriverControlImpl.begin(JdbcResourceLocalTransactionCoordinatorImpl.java:246)

at org.hibernate.engine.transaction.internal.TransactionImpl.begin(TransactionImpl.java:83)

at org.hibernate.internal.AbstractSharedSessionContract.beginTransaction(AbstractSharedSessionContract.java:467)

at org.hibernate.engine.spi.SessionDelegatorBaseImpl.beginTransaction(SessionDelegatorBaseImpl.java:486)

at com.xpn.xwiki.internal.store.hibernate.HibernateStore.beginTransaction(HibernateStore.java:790)

at com.xpn.xwiki.internal.store.hibernate.HibernateStore.beginTransaction(HibernateStore.java:741)

at com.xpn.xwiki.store.XWikiHibernateBaseStore.beginTransaction(XWikiHibernateBaseStore.java:532)

at com.xpn.xwiki.store.XWikiHibernateBaseStore.execute(XWikiHibernateBaseStore.java:819)

... 133 more

Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.

at jdk.internal.reflect.GeneratedConstructorAccessor1129.newInstance(Unknown Source)

at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)

at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)

at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:990)

at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:341)

at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2187)

at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2219)

at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2014)

at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:776)

at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47)

at jdk.internal.reflect.GeneratedConstructorAccessor312.newInstance(Unknown Source)

at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)

at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)

at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:386)

at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:330)

at org.apache.commons.dbcp2.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:55)

at org.apache.commons.dbcp2.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:355)

at org.apache.commons.pool2.impl.GenericObjectPool.create(GenericObjectPool.java:889)

at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:424)

at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:349)

at org.apache.commons.dbcp2.PoolingDataSource.getConnection(PoolingDataSource.java:134)

at org.apache.commons.dbcp2.BasicDataSource.getConnection(BasicDataSource.java:753)

at com.xpn.xwiki.store.DBCPConnectionProvider.getConnection(DBCPConnectionProvider.java:254)

at org.hibernate.internal.NonContextualJdbcConnectionAccess.obtainConnection(NonContextualJdbcConnectionAccess.java:38)

at org.hibernate.resource.jdbc.internal.LogicalConnectionManagedImpl.acquireConnectionIfNeeded(LogicalConnectionManagedImpl.java:104)

... 144 more

Caused by: java.net.UnknownHostException: xwiki-mysql-db

at java.base/java.net.InetAddress$CachedAddresses.get(InetAddress.java:797)

at java.base/java.net.InetAddress.getAllByName0(InetAddress.java:1505)

at java.base/java.net.InetAddress.getAllByName(InetAddress.java:1364)

at java.base/java.net.InetAddress.getAllByName(InetAddress.java:1298)

at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:188)

at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:300)

... 165 more

XWiki Syntax 2.1

XWiki Syntax 2.1: All