"500 - Internal server error" while trying to view an attachment

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Problem

Complications in previewing attachments in Confluence such as PDF and PowerPoint files with the error:


pageId : 42863378
fileName : Testpowerpointfile.pptx
caused by: java.lang.RuntimeException: Error rendering template for decorator root
at com.atlassian.confluence.setup.velocity.ApplyDecoratorDirective.render(ApplyDecoratorDirective.java:191)
caused by: java.lang.RuntimeException: Error rendering template for decorator page
at com.atlassian.confluence.setup.velocity.ApplyDecoratorDirective.render(ApplyDecoratorDirective.java:191)
caused by: org.apache.velocity.exception.MethodInvocationException: Invocation of method 'replace' in  class java.lang.String threw exception java.lang.NullPointerException at /originaltheme/templates/decorators/includes/velocity-macros.vm[line 229, column 47]
at org.apache.velocity.runtime.parser.node.ASTMethod.handleInvocationException(ASTMethod.java:337)
caused by: java.lang.NullPointerException
at java.lang.String.replace(Unknown Source)


The following appears in the atlassian-confluence.log

2015-07-21 11:16:39,747 ERROR [ajp-bio-127.0.0.1-7990-exec-48] [atlassian.confluence.servlet.ConfluenceServletDispatcher] sendError Could not execute action
 -- url: /pages/worddav/preview.action | userName: kh280 | referer: https://ruterwiki.ruter.no/pages/viewpageattachments.action?pageId=44566815
java.lang.RuntimeException: Error rendering template for decorator root
	at com.atlassian.confluence.setup.velocity.ApplyDecoratorDirective.render(ApplyDecoratorDirective.java:191)
	at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:175)
	at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:336)
	at org.apache.velocity.Template.merge(Template.java:328)
	at org.apache.velocity.Template.merge(Template.java:235)
	at com.opensymphony.webwork.dispatcher.VelocityResult.doExecute(VelocityResult.java:91)
	at com.atlassian.xwork.results.ProfiledVelocityResult.doExecute(ProfiledVelocityResult.java:21)
	at com.atlassian.confluence.setup.webwork.EncodingVelocityResult.doExecute(EncodingVelocityResult.java:48)
Caused by: java.lang.RuntimeException: Error rendering template for decorator page
	at com.atlassian.confluence.setup.velocity.ApplyDecoratorDirective.render(ApplyDecoratorDirective.java:191)
	at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:175)
Caused by: org.apache.velocity.exception.MethodInvocationException: Invocation of method 'replace' in  class java.lang.String threw exception java.lang.NullPointerException at /originaltheme/templates/decorators/includes/velocity-macros.vm[line 229, column 47]
	at org.apache.velocity.runtime.parser.node.ASTMethod.handleInvocationException(ASTMethod.java:337)
	at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:284)
Caused by: java.lang.NullPointerException
	at java.lang.String.replace(Unknown Source)
	at sun.reflect.GeneratedMethodAccessor6307.invoke(Unknown Source)

Diagnosis

Environment

  • The line from the logs:

    /originaltheme/templates/decorators/includes/velocity-macros.vm

    Indicates that you have RefinedWiki Original Theme installed in your instance

Cause

This is a know bug from  RefinedWiki Original Theme:

Resolution

Make sure you have the plugin up to date. see Managing Add-ons or Plugins to manage all your third party plugins.

Last modified on Mar 20, 2024

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.