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

xwikivar.vm throws a NullPointerException when called with $doc = null and Show page annotations = Yes

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 13.8
    • Fix Version/s: 12.10.11, 13.4.4, 13.9-rc-1
    • Component/s: Live Data
    • Labels:
      None
    • Tests:
      Unit
    • Difficulty:
      Unknown
    • Documentation:
      N/A
    • Documentation in Release Notes:
      N/A
    • Similar issues:

      Description

      Still getting the error "no exceptionMapper found" in livetables (e.g. Admin/emailStatus, Admin/Logging). 

      Page shows "Updating the entries failed for an unknown reason", debug info in browser shows this:

      URL causing the error:

      http://xwiki.dev.xxmydomainxx.com:8080/rest/liveData/sources/liveTable/entries?timestamp=1633691359108&namespace=wiki%3Axwiki&sourceParams.resultPage=XWiki.LoggingAdminTableJson&sourceParams.translationPrefix=logging.admin.livetable.&sourceParams.queryFilters=currentlanguage%2Chidden&properties=logger&properties=level&properties=actions&offset=0&limit=15&sort=logger&descending=

      HTTP and Port 8080 is correct for my dev environment. 

      And the response of the call shows this:

      No ExceptionMapper was found for class [org.xwiki.livedata.LiveDataException].
      org.xwiki.livedata.LiveDataException: Failed to execute the live data query.
      	at org.xwiki.livedata.internal.livetable.LiveTableLiveDataEntryStore.get(LiveTableLiveDataEntryStore.java:130)
      	at org.xwiki.livedata.internal.rest.DefaultLiveDataEntriesResource.getEntries(DefaultLiveDataEntriesResource.java:193)
      	at org.xwiki.livedata.internal.rest.DefaultLiveDataEntriesResource.getEntries(DefaultLiveDataEntriesResource.java:79)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
      	at org.restlet.ext.jaxrs.internal.wrappers.AbstractMethodWrapper.internalInvoke(AbstractMethodWrapper.java:162)
      	at org.restlet.ext.jaxrs.internal.wrappers.ResourceMethod.invoke(ResourceMethod.java:281)
      	at org.restlet.ext.jaxrs.JaxRsRestlet.invokeMethod(JaxRsRestlet.java:997)
      	at org.restlet.ext.jaxrs.JaxRsRestlet.handle(JaxRsRestlet.java:746)
      	at org.restlet.routing.Filter.doHandle(Filter.java:150)
      	at org.restlet.routing.Filter.handle(Filter.java:197)
      	at org.restlet.routing.Router.doHandle(Router.java:422)
      	at org.restlet.routing.Router.handle(Router.java:641)
      	at org.restlet.routing.Filter.doHandle(Filter.java:150)
      	at org.restlet.routing.Filter.handle(Filter.java:197)
      	at org.restlet.routing.Filter.doHandle(Filter.java:150)
      	at org.restlet.routing.Filter.handle(Filter.java:197)
      	at org.restlet.routing.Filter.doHandle(Filter.java:150)
      	at org.restlet.routing.Filter.handle(Filter.java:197)
      	at org.restlet.routing.Filter.doHandle(Filter.java:150)
      	at org.restlet.routing.Filter.handle(Filter.java:197)
      	at org.restlet.routing.Filter.doHandle(Filter.java:150)
      	at org.restlet.engine.application.StatusFilter.doHandle(StatusFilter.java:140)
      	at org.restlet.routing.Filter.handle(Filter.java:197)
      	at org.restlet.routing.Filter.doHandle(Filter.java:150)
      	at org.restlet.routing.Filter.handle(Filter.java:197)
      	at org.restlet.engine.CompositeHelper.handle(CompositeHelper.java:202)
      	at org.restlet.engine.application.ApplicationHelper.handle(ApplicationHelper.java:77)
      	at org.restlet.Application.handle(Application.java:385)
      	at org.restlet.routing.Filter.doHandle(Filter.java:150)
      	at org.restlet.routing.Filter.handle(Filter.java:197)
      	at org.restlet.routing.Router.doHandle(Router.java:422)
      	at org.restlet.routing.Router.handle(Router.java:641)
      	at org.restlet.routing.Filter.doHandle(Filter.java:150)
      	at org.restlet.routing.Filter.handle(Filter.java:197)
      	at org.restlet.routing.Router.doHandle(Router.java:422)
      	at org.restlet.routing.Router.handle(Router.java:641)
      	at org.restlet.routing.Filter.doHandle(Filter.java:150)
      	at org.restlet.routing.Filter.handle(Filter.java:197)
      	at org.restlet.engine.CompositeHelper.handle(CompositeHelper.java:202)
      	at org.restlet.Component.handle(Component.java:408)
      	at org.restlet.Server.handle(Server.java:507)
      	at org.restlet.engine.connector.ServerHelper.handle(ServerHelper.java:63)
      	at org.restlet.engine.adapter.HttpServerHelper.handle(HttpServerHelper.java:143)
      	at org.restlet.ext.servlet.ServerServlet.service(ServerServlet.java:1117)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)
      	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.XWikiContextInitializationFilter.doFilter(XWikiContextInitializationFilter.java:82)
      	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.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)
      	at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
      	at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
      	at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:389)
      	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:196)
      	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
      	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:542)
      	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)
      	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
      	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:698)
      	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
      	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:364)
      	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:624)
      	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
      	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:831)
      	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1650)
      	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
      	at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
      	at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
      	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      	at java.base/java.lang.Thread.run(Thread.java:829)
      Caused by: java.lang.RuntimeException: org.xwiki.rendering.RenderingException: Failed to execute renderer
      	at org.xwiki.livedata.internal.livetable.LiveTableLiveDataEntryStore.lambda$getLiveTableResultsFromPage$1(LiveTableLiveDataEntryStore.java:186)
      	at org.xwiki.livedata.internal.livetable.LiveTableRequestHandler.getLiveTableResults(LiveTableRequestHandler.java:114)
      	at org.xwiki.livedata.internal.livetable.LiveTableLiveDataEntryStore.getLiveTableResultsFromPage(LiveTableLiveDataEntryStore.java:178)
      	at org.xwiki.livedata.internal.livetable.LiveTableLiveDataEntryStore.getLiveTableResultsJSON(LiveTableLiveDataEntryStore.java:151)
      	at org.xwiki.livedata.internal.livetable.LiveTableLiveDataEntryStore.get(LiveTableLiveDataEntryStore.java:121)
      	... 87 more
      Caused by: org.xwiki.rendering.RenderingException: Failed to execute renderer
      	at org.xwiki.rendering.async.internal.DefaultAsyncRendererExecutor.syncRender(DefaultAsyncRendererExecutor.java:270)
      	at org.xwiki.rendering.async.internal.DefaultAsyncRendererExecutor.render(DefaultAsyncRendererExecutor.java:250)
      	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 org.xwiki.livedata.internal.livetable.LiveTableLiveDataEntryStore.lambda$getLiveTableResultsFromPage$1(LiveTableLiveDataEntryStore.java:181)
      	... 91 more
      Caused by: org.xwiki.rendering.RenderingException: Failed to evaluate template with id [/templates/xwikivars.vm]
      	at com.xpn.xwiki.internal.template.TemplateAsyncRenderer.evaluateContent(TemplateAsyncRenderer.java:219)
      	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:267)
      	at com.xpn.xwiki.internal.security.authorization.DefaultAuthorExecutor.call(DefaultAuthorExecutor.java:98)
      	at org.xwiki.rendering.async.internal.DefaultAsyncRendererExecutor.syncRender(DefaultAsyncRendererExecutor.java:267)
      	... 99 more
      Caused by: org.xwiki.velocity.XWikiVelocityException: Failed to evaluate content with namespace [/templates/xwikivars.vm]
      	at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:288)
      	at com.xpn.xwiki.render.DefaultVelocityManager.evaluate(DefaultVelocityManager.java:321)
      	at com.xpn.xwiki.internal.template.VelocityTemplateEvaluator.evaluateContent(VelocityTemplateEvaluator.java:95)
      	at com.xpn.xwiki.internal.template.TemplateAsyncRenderer.evaluateContent(TemplateAsyncRenderer.java:217)
      	... 105 more
      Caused by: org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getAnnotations' in  class org.xwiki.annotation.script.AnnotationScriptService threw exception java.lang.NullPointerException at /templates/xwikivars.vm[line 65, column 54]
      	at org.apache.velocity.runtime.parser.node.ASTMethod.handleInvocationException(ASTMethod.java:308)
      	at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:235)
      	at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:368)
      	at org.apache.velocity.runtime.parser.node.ASTReference.value(ASTReference.java:704)
      	at org.apache.velocity.runtime.parser.node.ASTExpression.value(ASTExpression.java:75)
      	at org.apache.velocity.runtime.parser.node.ASTSetDirective.render(ASTSetDirective.java:242)
      	at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:147)
      	at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:171)
      	at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:147)
      	at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:171)
      	at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:147)
      	at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:171)
      	at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:439)
      	at org.apache.velocity.Template.merge(Template.java:358)
      	at org.apache.velocity.Template.merge(Template.java:262)
      	at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:280)
      	... 108 more
      Caused by: java.lang.NullPointerException
      	at org.xwiki.annotation.reference.internal.AbstractTypedStringEntityReferenceResolver.getSerializedType(AbstractTypedStringEntityReferenceResolver.java:78)
      	at org.xwiki.annotation.reference.internal.AbstractTypedStringEntityReferenceResolver.resolve(AbstractTypedStringEntityReferenceResolver.java:55)
      	at org.xwiki.annotation.rights.internal.XWikiAnnotationRightService.getDocumentReference(XWikiAnnotationRightService.java:127)
      	at org.xwiki.annotation.rights.internal.XWikiAnnotationRightService.canViewAnnotations(XWikiAnnotationRightService.java:114)
      	at org.xwiki.annotation.script.AnnotationScriptService.getAnnotations(AnnotationScriptService.java:214)
      	at jdk.internal.reflect.GeneratedMethodAccessor328.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:571)
      	at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:554)
      	at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:221)
      	... 122 more

       

       

       

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              mleduc Manuel Leduc
              Reporter:
              schnutz Gerd Schnoetzinger
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Date of First Response: