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

NPE occurs when there is no WikiModel implementation registered

    XMLWordPrintable

    Details

    • Tests:
      Unit
    • Difficulty:
      Unknown
    • Similar issues:

      Description

      Using the Rendering module outside of XWiki (http://code.xwiki.org/xwiki/bin/view/Modules/RenderingModule#HUsingtheRenderingmoduleoutsideofXWiki)

      It looks like a NPE occurs when passing an attachment link input such as :

      [[text>>attach:img.png]]
      

      Stackrace is :

       
      java.lang.NullPointerException
      	at org.xwiki.rendering.internal.renderer.xhtml.DefaultXHTMLLinkRenderer.beginExternalLink(DefaultXHTMLLinkRenderer.java:194)
      	at org.xwiki.rendering.internal.renderer.xhtml.DefaultXHTMLLinkRenderer.beginLink(DefaultXHTMLLinkRenderer.java:161)
      	at org.xwiki.rendering.internal.renderer.xhtml.XHTMLChainingRenderer.beginLink(XHTMLChainingRenderer.java:263)
      	at org.xwiki.rendering.listener.chaining.AbstractChainingListener.beginLink(AbstractChainingListener.java:163)
      	at org.xwiki.rendering.listener.chaining.EmptyBlockChainingListener.beginLink(EmptyBlockChainingListener.java:143)
      	at org.xwiki.rendering.listener.chaining.AbstractChainingListener.beginLink(AbstractChainingListener.java:163)
      	at org.xwiki.rendering.listener.chaining.BlockStateChainingListener.beginLink(BlockStateChainingListener.java:305)
      	at org.xwiki.rendering.listener.chaining.AbstractChainingListener.beginLink(AbstractChainingListener.java:163)
      	at org.xwiki.rendering.block.LinkBlock.before(LinkBlock.java:94)
      	at org.xwiki.rendering.block.AbstractFatherBlock.traverse(AbstractFatherBlock.java:65)
      	at org.xwiki.rendering.block.AbstractFatherBlock.traverse(AbstractFatherBlock.java:68)
      	at org.xwiki.rendering.block.AbstractFatherBlock.traverse(AbstractFatherBlock.java:68)
      	at org.xwiki.rendering.internal.renderer.AbstractBlockRenderer.render(AbstractBlockRenderer.java:59)
      	at org.xwiki.rendering.internal.renderer.AbstractBlockRenderer.render(AbstractBlockRenderer.java:47)
      	at org.xwiki.rendering.internal.converter.DefaultConverter.convert(DefaultConverter.java:56)
      

        Attachments

          Activity

            People

            Assignee:
            tmortagne Thomas Mortagne
            Reporter:
            plamarque Patrice Lamarque
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: