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

NPEs when adding comments with CAPTCHA as guest user which causes weird behavior, preventing adding further comments in all wiki pages

    XMLWordPrintable

Details

    • Bug
    • Resolution: Solved By
    • Critical
    • 14.0-rc-1
    • 12.10.11, 13.4.5, 13.10.2
    • Flamingo Skin, Old Core
    • None
    • Windows 11 Pro 64 bit, Edge 97, using a local instance of XWiki 13.10.2 on (MySQL 8/ Tomcat 9.0.56), tested also on Jetty+HSQLDB package with 13.10.2, 13.4.5, 13.4.6 and 12.10.11
    • Unknown
    • N/A
    • N/A

    Description

      STEPS TO REPRODUCE

      1. Login as Admin
      2. Go to Administer Wiki > Users & Rights > Rights
      3. Check 'Require unregistered users to solve a CAPTCHA when posting a comment on a page'
      4. Create a page
      5. On that page, go to Administer Page > Users & Rights > Rights: Page > Users
      6. Grant 'Comment' right to Unregistered users
      7. Logout
      8. Add some comments one after another as a guest user by filling the CAPTCHA

      EXPECTED RESULTS

      All comments are added successfully without errors.

      ACTUAL RESULTS

      Often, when adding one comment after another, a warning is displayed in console which prevents adding further comments:

      2022-01-17 15:29:39,337 [qtp717386707-121 - http://localhost:1345/xwiki/bin/commentadd/Pag3/WebHome?viewer=comments] WARN  c.x.x.w.XWikiAction            - Uncaught exception: Error number 3201 in 3: Exception while saving document xwiki:Pag3.WebHome
      com.xpn.xwiki.XWikiException: Error number 3201 in 3: Exception while saving document xwiki:Pag3.WebHome
              at com.xpn.xwiki.store.XWikiHibernateStore.saveXWikiDoc(XWikiHibernateStore.java:729)
              at com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:257)
              at com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:217)
              at com.xpn.xwiki.XWiki.saveDocument(XWiki.java:2052)
              at com.xpn.xwiki.web.CommentAddAction.action(CommentAddAction.java:120)
              at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:588)
              at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:286)
              at com.xpn.xwiki.web.LegacyActionServlet.service(LegacyActionServlet.java:115)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
              at org.eclipse.jetty.servlet.ServletHolder$NotAsyncServlet.service(ServletHolder.java:1411)
              at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:763)
              at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1631)
              at com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:122)
              at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1618)
              at org.xwiki.wysiwyg.filter.ConversionFilter.doFilter(ConversionFilter.java:106)
              at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1618)
              at org.xwiki.container.servlet.filters.internal.SetHTTPHeaderFilter.doFilter(SetHTTPHeaderFilter.java:63)
              at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1618)
              at org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:208)
              at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1618)
              at org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:111)
              at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1618)
              at org.xwiki.resource.servlet.RoutingFilter.doFilter(RoutingFilter.java:132)
              at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610)
              at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:549)
              at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
              at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:602)
              at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
              at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
              at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1610)
              at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
              at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1369)
              at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
              at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:489)
              at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1580)
              at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
              at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1284)
              at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
              at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:221)
              at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:146)
              at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
              at org.eclipse.jetty.server.Server.handle(Server.java:501)
              at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:383)
              at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:556)
              at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:375)
              at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:273)
              at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
              at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
              at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
              at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)
              at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)
              at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)
              at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)
              at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:375)
              at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:806)
              at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:938)
              at java.base/java.lang.Thread.run(Thread.java:833)
      Caused by: com.xpn.xwiki.XWikiException: Error number 3211 in 3: Exception while saving object Pag3.WebHome
              at com.xpn.xwiki.store.XWikiHibernateStore.saveXWikiCollection(XWikiHibernateStore.java:1445)
              at com.xpn.xwiki.store.XWikiHibernateStore.saveXWikiDoc(XWikiHibernateStore.java:701)
              ... 56 common frames omitted
      Caused by: java.lang.NullPointerException: Cannot invoke "com.xpn.xwiki.objects.classes.PropertyClass.newProperty()" because "classProperty" is null
              at com.xpn.xwiki.store.XWikiHibernateStore.saveXWikiCollection(XWikiHibernateStore.java:1411)
              ... 57 common frames omitted

      If the page is refreshed at this point, the last comment added is removed from Comments list and further comments appear to be added, but after page refresh they dissappear.

      Sometimes, when adding another comment, an error is displayed on the browser and console, see Guest_user_Error_commentsinline.vm_3rd_comment.png:

      2022-01-17 15:30:21,218 [qtp717386707-124 - http://localhost:1345/xwiki/bin/commentadd/Pag3/WebHome?viewer=comments] WARN  c.x.x.w.XWikiAction            - Uncaught exception: Error number 0 in 11: Uncaught exception
      com.xpn.xwiki.XWikiException: Error number 0 in 11: Uncaught exception
              at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:616)
              at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:286)
              at com.xpn.xwiki.web.LegacyActionServlet.service(LegacyActionServlet.java:115)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
              at org.eclipse.jetty.servlet.ServletHolder$NotAsyncServlet.service(ServletHolder.java:1411)
              at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:763)
              at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1631)
              at com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:122)
              at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1618)
              at org.xwiki.wysiwyg.filter.ConversionFilter.doFilter(ConversionFilter.java:106)
              at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1618)
              at org.xwiki.container.servlet.filters.internal.SetHTTPHeaderFilter.doFilter(SetHTTPHeaderFilter.java:63)
              at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1618)
              at org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:208)
              at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1618)
              at org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:111)
              at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1618)
              at org.xwiki.resource.servlet.RoutingFilter.doFilter(RoutingFilter.java:132)
              at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610)
              at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:549)
              at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
              at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:602)
              at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
              at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
              at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1610)
              at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
              at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1369)
              at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
              at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:489)
              at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1580)
              at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
              at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1284)
              at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
              at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:221)
              at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:146)
              at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
              at org.eclipse.jetty.server.Server.handle(Server.java:501)
              at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:383)
              at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:556)
              at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:375)
              at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:273)
              at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
              at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
              at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
              at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)
              at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)
              at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)
              at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)
              at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:375)
              at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:806)
              at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:938)
              at java.base/java.lang.Thread.run(Thread.java:833)
      Caused by: java.lang.NullPointerException: Cannot invoke "com.xpn.xwiki.objects.BaseProperty.getValue()" because the return value of "com.xpn.xwiki.objects.BaseObject.get(String)" is null
              at com.xpn.xwiki.web.CommentAddAction.action(CommentAddAction.java:98)
              at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:588)
              ... 51 common frames omitted		
      2022-01-17 15:30:21,283 [qtp717386707-124 - http://localhost:1345/xwiki/bin/commentadd/Pag3/WebHome?viewer=comments] ERROR o.a.v.d.null                   - Exception in macro #displayComment called at /templates/xpart.vm[line 144, column 1]
      2022-01-17 15:30:21,284 [qtp717386707-124 - http://localhost:1345/xwiki/bin/commentadd/Pag3/WebHome?viewer=comments] ERROR o.a.v.d.null                   - Exception in macro #displayThread called at /templates/xpart.vm[line 426, column 1]
      2022-01-17 15:30:21,286 [qtp717386707-124 - http://localhost:1345/xwiki/bin/commentadd/Pag3/WebHome?viewer=comments] ERROR c.x.x.XWiki                    - Error while evaluating velocity template [commentsinline.vm]
      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 com.xpn.xwiki.XWiki.evaluateTemplate(XWiki.java:2512)
              at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:2490)
              at com.xpn.xwiki.api.XWiki.parseTemplate(XWiki.java:997)
              at jdk.internal.reflect.GeneratedMethodAccessor144.invoke(Unknown Source)
              at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.base/java.lang.reflect.Method.invoke(Method.java:568)
              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)
              at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:368)
              at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:492)
              at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:147)
              at org.apache.velocity.runtime.directive.VelocimacroProxy.render(VelocimacroProxy.java:218)
              at org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:331)
              at org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:261)
              at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:304)
              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)
              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:225)
              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)
              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 com.xpn.xwiki.XWiki.evaluateTemplate(XWiki.java:2512)
              at com.xpn.xwiki.web.Utils.parseTemplate(Utils.java:179)
              at com.xpn.xwiki.web.Utils.parseTemplate(Utils.java:88)
              at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:670)
              at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:286)
              at com.xpn.xwiki.web.LegacyActionServlet.service(LegacyActionServlet.java:115)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
              at org.eclipse.jetty.servlet.ServletHolder$NotAsyncServlet.service(ServletHolder.java:1411)
              at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:763)
              at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1631)
              at com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:122)
              at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1618)
              at org.xwiki.wysiwyg.filter.ConversionFilter.doFilter(ConversionFilter.java:106)
              at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1618)
              at org.xwiki.container.servlet.filters.internal.SetHTTPHeaderFilter.doFilter(SetHTTPHeaderFilter.java:63)
              at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1618)
              at org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:208)
              at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1618)
              at org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:111)
              at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1618)
              at org.xwiki.resource.servlet.RoutingFilter.doFilter(RoutingFilter.java:132)
              at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610)
              at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:549)
              at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
              at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:602)
              at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
              at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
              at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1610)
              at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
              at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1369)
              at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
              at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:489)
              at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1580)
              at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
              at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1284)
              at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
              at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:221)
              at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:146)
              at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
              at org.eclipse.jetty.server.Server.handle(Server.java:501)
              at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:383)
              at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:556)
              at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:375)
              at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:273)
              at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
              at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
              at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
              at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)
              at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)
              at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)
              at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)
              at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:375)
              at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:806)
              at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:938)
              at java.base/java.lang.Thread.run(Thread.java:833)
      Caused by: org.xwiki.rendering.RenderingException: Failed to evaluate template with id [/skins/flamingo/commentsinline.vm]
              at com.xpn.xwiki.internal.template.TemplateAsyncRenderer.evaluateContent(TemplateAsyncRenderer.java:227)
              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)
              ... 98 common frames omitted
      Caused by: org.xwiki.velocity.XWikiVelocityException: Failed to evaluate content with namespace [/templates/xpart.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:225)
              ... 104 common frames omitted
      Caused by: org.apache.velocity.exception.MethodInvocationException: Invocation of method 'resolveDocument' in  class org.xwiki.model.script.ModelScriptService threw exception java.lang.NullPointerException: Cannot read field "parent" because "reference" is null at /templates/xpart.vm[line 167, column 66]
              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.ASTComparisonNode.evaluate(ASTComparisonNode.java:72)
              at org.apache.velocity.runtime.parser.node.ASTAndNode.evaluate(ASTAndNode.java:115)
              at org.apache.velocity.runtime.parser.node.ASTAndNode.value(ASTAndNode.java:80)
              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.directive.VelocimacroProxy.render(VelocimacroProxy.java:218)
              at org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:331)
              at org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:261)
              at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:304)
              at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:147)
              at org.apache.velocity.runtime.directive.Foreach.renderBlock(Foreach.java:309)
              at org.apache.velocity.runtime.directive.Foreach.render(Foreach.java:279)
              at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:304)
              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.directive.VelocimacroProxy.render(VelocimacroProxy.java:218)
              at org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:331)
              at org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:261)
              at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:304)
              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.SimpleNode.render(SimpleNode.java:439)
              at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:190)
              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)
              ... 107 common frames omitted
      Caused by: java.lang.NullPointerException: Cannot read field "parent" because "reference" is null
              at org.xwiki.model.reference.EntityReference.<init>(EntityReference.java:88)
              at org.xwiki.model.reference.AbstractLocalizedEntityReference.<init>(AbstractLocalizedEntityReference.java:113)
              at org.xwiki.model.reference.DocumentReference.<init>(DocumentReference.java:71)
              at org.xwiki.model.script.ModelScriptService.resolveDocument(ModelScriptService.java:457)
              at jdk.internal.reflect.GeneratedMethodAccessor238.invoke(Unknown Source)
              at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.base/java.lang.reflect.Method.invoke(Method.java:568)
              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.xwiki.velocity.introspection.MethodArgumentsUberspector$ConvertingVelMethod.invoke(MethodArgumentsUberspector.java:201)
              at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:221)
              ... 139 common frames omitted

      What is odd is that sometimes the above error doesn't occur, but the CKEditor input field is missing, see Guest_user_No_CKeditor_section.png

      The issue reproduces also on XWiki 13.4.5 and 13.4.6. On XWiki 12.10.11 was reproduced only the NPE from the first stacktrace above, after which no other comments can be added.
       

      Attachments

        Issue Links

          Activity

            People

              mleduc Manuel Leduc
              iandriuta Ilie Andriuta
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: