Unable to Access Attachment Page with java.lang.ClassCastException Error

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. 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

Symptoms

Unable to access the attachment in the page. Instead of getting the attachment page, java.lang.ClassCastException Error is encountered.

The following appears in the atlassian-confluence.log:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2014-01-02 14:26:05,944 ERROR [http-8090-25] [atlassian.confluence.servlet.ConfluenceServletDispatcher] sendError Could not execute action -- url: /pages/viewpageattachments.action | userName: sternm40 | referer: http://localhost:8090/pages/viewpage.action?pageId=3407911 java.lang.IllegalArgumentException: java.lang.ClassCastException@6461c58e at sun.reflect.GeneratedMethodAccessor6114.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at com.opensymphony.xwork.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:302) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:170) at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.atlassian.confluence.validation.MessageHolderInterceptor.intercept(MessageHolderInterceptor.java:42) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) ...

Cause 1

OpenJDK 64-bit is used which is not compatible with Confluence.

Cause 2

A plugin can cause this issue.

Resolution for Cause 1

Use a supported JDK. Refer to Confluence supported platform documentation to find out more about supported JDKs for latest version of Confluence. (visit this link for earlier versions of Confluence)

Resolution for Cause 2

Use safe mode to verify that a third party plugin is the culprit as described in the following article: Disabling and enabling apps

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.