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

NPE when exporting to HTML and the attachment cannot be found

    XMLWordPrintable

Details

    • Unknown
    • N/A
    • N/A

    Description

      For example:

      2024-01-03 14:08:49,927 [qtp1827725498-19 - http://localhost:8080/xwiki/bin/export/Space/Page?format=html&pages=%25.%25&name=AllPages] ERROR c.x.x.w.ExportURLFactory       - Failed to create attachment URL 
      java.lang.NullPointerException: null
      	at com.xpn.xwiki.web.ExportURLFactory.createAttachmentURL(ExportURLFactory.java:534)
      	at com.xpn.xwiki.web.ExportURLFactory.createAttachmentURL(ExportURLFactory.java:556)
      	at com.xpn.xwiki.XWiki.getAttachmentURL(XWiki.java:5578)
      	at com.xpn.xwiki.XWiki.getAttachmentURL(XWiki.java:5589)
      	at com.xpn.xwiki.XWiki.getAttachmentURL(XWiki.java:5626)
      	at com.xpn.xwiki.XWiki.getAttachmentURL(XWiki.java:5614)
      	at com.xpn.xwiki.api.XWiki.getAttachmentURL(XWiki.java:1927)
      	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.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.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.InternalVelocityEngine.evaluate(InternalVelocityEngine.java:225)
      	at org.xwiki.velocity.internal.InternalVelocityEngine.evaluate(InternalVelocityEngine.java:173)
      	at org.xwiki.rendering.internal.macro.velocity.VelocityMacro.evaluateString(VelocityMacro.java:177)
      	at org.xwiki.rendering.internal.macro.velocity.VelocityMacro.evaluateString(VelocityMacro.java:60)
      	at org.xwiki.rendering.macro.script.AbstractScriptMacro.evaluateBlock(AbstractScriptMacro.java:279)
      	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:311)
      ...
      

      For:

      Attachments

        Activity

          People

            vmassol Vincent Massol
            vmassol Vincent Massol
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: