Attachments in issues unable to open after upgrade to 8.15

ganfye83 February 3, 2021

I'm having a problem downloading existing attachments after upgraded Jira from 8.14 to 8.15.

Kindly help as urgent. Worry the original attachments are missing.Screenshot 2021-02-04 091639.png

7 answers

1 accepted

1 vote
Answer accepted
Pramodh M
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 3, 2021

Hi @ganfye83 

First, check with the following link here whether you have a different attachment name in the database and home directory, if yes you have to follow the guide in documentation to fix the problem.

Please check whether the files are present in the attachments directory of your home directory.

If you have a backup of your home directory of Jira Instance, restore it and check.

Did you check for modified files while you were upgrading the instance, if you have the old instance backup, please check and restore them as it is.

Hope this finds the solution to the issue.

Thanks,
Pramodh

ganfye83 February 3, 2021

Dear Pramodh,

I have checked with the link given. I gave you an example as follow:
Screenshot 2021-02-04 131726.pngScreenshot 2021-02-04 131829.pngScreenshot 2021-02-04 131939.pngScreenshot 2021-02-04 132020.png

ganfye83 February 3, 2021

I also have tried to re-install again, re-backup everything etc.

And I notice first time open any attachment will have an error 500.

as follow:

Technical details
Log's referral number: 81f122e3-27c2-4ce9-88db-b2bcb942984e

Cause
Referer URL: https://atlassian.ehors.com:9443/browse/EWVX-184

java.lang.ClassNotFoundException: com.atlassian.jira.web.servlet.ViewAttachmentServlet
java.lang.ClassNotFoundException: com.atlassian.jira.web.servlet.ViewAttachmentServlet
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1358) [catalina.jar:8.5.60]
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1180) [catalina.jar:8.5.60]
at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:545) [catalina.jar:8.5.60]
at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:526) [catalina.jar:8.5.60]
at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:150) [catalina.jar:8.5.60]
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1044) [catalina.jar:8.5.60]
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:763) [catalina.jar:8.5.60]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:134) [catalina.jar:8.5.60]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97) [catalina.jar:8.5.60]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:544) [catalina.jar:8.5.60]
at org.apache.catalina.valves.StuckThreadDetectionValve.invoke(StuckThreadDetectionValve.java:206) [catalina.jar:8.5.60]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:143) [catalina.jar:8.5.60]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81) [catalina.jar:8.5.60]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78) [catalina.jar:8.5.60]
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:690) [catalina.jar:8.5.60]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) [catalina.jar:8.5.60]
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:616) [tomcat-coyote.jar:8.5.60]
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) [tomcat-coyote.jar:8.5.60]
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:831) [tomcat-coyote.jar:8.5.60]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1634) [tomcat-coyote.jar:8.5.60]
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-coyote.jar:8.5.60]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_275]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_275]
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-util.jar:8.5.60]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_275]

Then next time open again will show the plain HTML codes on page 

ganfye83 February 3, 2021

I'm able to download all, however, that is really not a good option as some issues I have many big files.image.png

Pramodh M
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 3, 2021

Maybe characters are not being rendered as expected (an unsupported encoding/character set is being used somewhere).

Navigate to the attachment directory and run the commands on any one directory as documented here.

https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/5/html/international_language_support_guide/ch09s02

and restart the server.

Pramodh M
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 3, 2021

Please check the logs after restarting the server.

ganfye83 February 3, 2021

Tried, doesn't help either...

Not sure which logs you want me to check. I'm reading the catalina.out.

in the startup log can only found the following:
Other logs can be found here

java.lang.NullPointerException
at java.io.StringReader.<init>(StringReader.java:50)
at org.codehaus.jackson.JsonFactory.createJsonParser(JsonFactory.java:636)
at org.codehaus.jackson.map.ObjectMapper.readValue(ObjectMapper.java:1854)
at com.okapya.jira.customfields.workflow.rules.ConditionRuleManager.areRulesRespectedForIssue(ConditionRuleManager.java:39)
at com.okapya.jira.customfields.workflow.AbstractChecklistValidator.validateChecklistFields(AbstractChecklistValidator.java:32)
at com.okapya.jira.customfields.workflow.conditions.ChecklistCondition.passesCondition(ChecklistCondition.java:26)
at com.atlassian.jira.plugin.workflow.WorkflowConditionModuleDescriptor$SafeConditionPlugin.passesCondition(WorkflowConditionModuleDescriptor.java:79)
at com.atlassian.jira.workflow.SkippableCondition.passesCondition(SkippableCondition.java:43)
at com.opensymphony.workflow.AbstractWorkflow.passesCondition(AbstractWorkflow.java:1049)
at com.opensymphony.workflow.AbstractWorkflow.passesConditions(AbstractWorkflow.java:1083)
at com.opensymphony.workflow.AbstractWorkflow.passesConditions(AbstractWorkflow.java:1107)
at com.opensymphony.workflow.AbstractWorkflow.getAvailableActionsForStep(AbstractWorkflow.java:714)
at com.opensymphony.workflow.AbstractWorkflow.getAvailableActions(AbstractWorkflow.java:115)
at com.atlassian.jira.workflow.IssueWorkflowManagerImpl.getAvailableActionIds(IssueWorkflowManagerImpl.java:166)
at com.atlassian.jira.workflow.IssueWorkflowManagerImpl.getAvailableActions(IssueWorkflowManagerImpl.java:57)
at com.atlassian.jira.workflow.IssueWorkflowManagerImpl.getSortedAvailableActions(IssueWorkflowManagerImpl.java:87)
at com.atlassian.jira.workflow.IssueWorkflowManagerImpl.getSortedAvailableActions(IssueWorkflowManagerImpl.java:82)
at com.atlassian.jira.issue.transitions.TransitionLinkFactory.getAvailableActions(TransitionLinkFactory.java:53)
at com.atlassian.jira.issue.transitions.TransitionLinkFactory.getItems(TransitionLinkFactory.java:43)
at com.atlassian.plugin.web.DefaultWebInterfaceManager.getDynamicWebItems(DefaultWebInterfaceManager.java:234)
at com.atlassian.plugin.web.DefaultWebInterfaceManager.getDisplayableWebItems(DefaultWebInterfaceManager.java:212)
at com.atlassian.jira.plugin.webfragment.DefaultSimpleLinkManager.getLinksForSection(DefaultSimpleLinkManager.java:120)
at com.atlassian.jira.plugin.webfragment.ThreadLocalCachingSimpleLinkManager.access$701(ThreadLocalCachingSimpleLinkManager.java:28)
at com.atlassian.jira.plugin.webfragment.ThreadLocalCachingSimpleLinkManager$3.load(ThreadLocalCachingSimpleLinkManager.java:149)
at com.atlassian.jira.plugin.webfragment.ThreadLocalCachingSimpleLinkManager$3.load(ThreadLocalCachingSimpleLinkManager.java:146)
at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3528)
at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2277)
at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2154)
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2044)
at com.google.common.cache.LocalCache.get(LocalCache.java:3952)
at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3974)
at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4958)
at com.google.common.cache.LocalCache$LocalLoadingCache.getUnchecked(LocalCache.java:4964)
at com.atlassian.jira.plugin.webfragment.ThreadLocalCachingSimpleLinkManager.getLinksForSection(ThreadLocalCachingSimpleLinkManager.java:153)
at com.atlassian.jira.plugin.webfragment.ThreadLocalCachingSimpleLinkManager.getLinksForSection(ThreadLocalCachingSimpleLinkManager.java:140)
at sun.reflect.GeneratedMethodAccessor541.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26)
at com.sun.proxy.$Proxy118.getLinksForSection(Unknown Source)
at sun.reflect.GeneratedMethodAccessor541.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)
at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56)
at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:136)
at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:124)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70)
at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:136)
at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:124)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)
at com.sun.proxy.$Proxy3497.getLinksForSection(Unknown Source)
at com.atlassian.jira.issue.util.IssueOperationsBarUtil.getLinksForSection(IssueOperationsBarUtil.java:192)
at com.atlassian.jira.issue.util.IssueOperationsBarUtil.getPromotedLinks(IssueOperationsBarUtil.java:113)
at com.atlassian.jira.rest.v2.issue.OpsbarBeanBuilder.buildOpsbarGroup(OpsbarBeanBuilder.java:95)
at com.atlassian.jira.rest.v2.issue.OpsbarBeanBuilder.build(OpsbarBeanBuilder.java:56)
at com.atlassian.jira.projects.issuenavigator.DefaultIssueRenderService.render(DefaultIssueRenderService.java:93)
at com.atlassian.jira.projects.issuenavigator.webaction.ProjectIssueNavigatorAction.doIssueViewWithSidebar(ProjectIssueNavigatorAction.java:195)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at webwork.util.InjectionUtils$DefaultInjectionImpl.invoke(InjectionUtils.java:70)
at webwork.util.InjectionUtils.invoke(InjectionUtils.java:56)
at webwork.action.ActionSupport.invokeCommand(ActionSupport.java:438)
at webwork.action.ActionSupport.execute(ActionSupport.java:157)
at com.atlassian.jira.action.JiraActionSupport.execute(JiraActionSupport.java:63)
at webwork.interceptor.DefaultInterceptorChain.proceed(DefaultInterceptorChain.java:39)
at webwork.interceptor.NestedInterceptorChain.proceed(NestedInterceptorChain.java:31)
at webwork.interceptor.ChainedInterceptor.intercept(ChainedInterceptor.java:16)
at webwork.interceptor.DefaultInterceptorChain.proceed(DefaultInterceptorChain.java:35)
at webwork.dispatcher.GenericDispatcher.executeAction(GenericDispatcher.java:225)
at webwork.dispatcher.GenericDispatcher.executeAction(GenericDispatcher.java:154)
at com.atlassian.jira.web.dispatcher.JiraWebworkActionDispatcher.service(JiraWebworkActionDispatcher.java:138)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:733)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)

image.png

ganfye83 February 3, 2021

Tried, and doesn't help

I'm not sure which log you referring to, kindly see the logs I have attached here

Pramodh M
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 3, 2021

Did you check with the character rendering as described here?

https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/5/html/international_language_support_guide/ch09s02

Once this is done, we have to check with Catalina logs

Thanks,
Pramodh

ganfye83 February 3, 2021

Tried, but seems nothing, and I don't know what character-setimage.png

image.png

Pramodh M
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 3, 2021

Hi @ganfye83 

Append --notest with the command you are running, its a dry run which means it will show what the effect will be, but no changes will be made.

So the command goes like this

conmv -f ascii -t utf8 --notest attachments/

conmv -f iso-8859-1 -t utf8 --notest attachments/

ganfye83 February 3, 2021

Executed, both reply "Ready!"

And the catalina.out after restarted Jira ended with the following --> here

And still cannot open any attachment; error as follows:

image.pngimage.pngimage.png

Pramodh M
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 3, 2021

To troubleshoot 500 Error

  • Check the attachments section in the admin settings
  • Do the full re-index and check

Check with this knowledge base to troubleshoot the Error.

https://confluence.atlassian.com/confkb/confluence-doesn-t-generate-thumbnails-154068.html

ganfye83 February 4, 2021

I think I found it... It's your installation file bugs.

These 2 files aren't available in folder:

AbstractViewFileServlet.class
ViewAttachmentServlet.class
/home/atlassian-opt/jira/atlassian-jira/WEB-INF/classes/com/atlassian/jira/web/servlet/

I have copied from V8.14.1 and solved it now!, please notice your developer and check the servlet files included. 

 

Working now! Many thanks anyway.image.png

Like # people like this
Pramodh M
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 4, 2021

Are you able to see the attachments in browser now.

ganfye83 February 4, 2021

Yes, after I copied the servlet files from older version I can now.

Like Pramodh M likes this
Pramodh M
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 4, 2021

Great @ganfye83 !

ganfye83 February 4, 2021

Hi @Pramodh M , can close case but please remind developer to check those servlet files on next release, thank you and have a good day.

stay safe and protected 

Pramodh M
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 4, 2021

Yes, for Sure @ganfye83 I will raise a support ticket and let them know!

Thank you!

Like Wouter Pieters likes this
1 vote
Janice Dawley June 20, 2021

Hi all --

I had this same problem and after researching for a while, found this article about changes to servlet file locations in recent versions that can be problematic if you have a modified web.xml file (as I did). The solution was to migrate my customizations into the new web.xml file rather than just copying my old one into the application directory.

https://confluence.atlassian.com/jirakb/attachments-are-not-available-with-classnotfoundexception-after-upgrading-to-8-15-0-1044096965.html

Hopefully this can help some other folks.

-- Janice

Scott Kimber
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 27, 2021

Yes, this was very helpful, thank you.  I wish there were a way to force http to https without modifying that web.xml file.

1 vote
Julian Somesan February 4, 2021

So the fix for the moment , only for this issue, is to add the 3 files

ViewThumbnailServlet.class

AbstractViewFileServlet.class
ViewAttachmentServlet.class

 

in the folder

jira/atlassian-jira/WEB-INF/classes/com/atlassian/jira/web/servlet/

 

@ganfye83 

1 vote
ganfye83 February 3, 2021

Screenshot 2021-02-04 093948.png

0 votes
Adarsh Hegde April 14, 2023

Also check for ownership of attachment files. this might affect sometimes. owner needs to be jirauser.

0 votes
Julian Somesan March 29, 2021

The issue is still there in jira server 8.16.0

 

same solution, but still ... nobody at atlassian is doing any minimal QA ?

Robert Buchinger
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 9, 2021

Still on 8.17.0 not solved. Seems that Atlassian is no longer interested in QA checks for the server instances even they provide "updates"

Janice Dawley July 9, 2021

Did you see my comment added above? I had this same problem, but it turned out to be because of some changes I had made to the web.xml file that were no longer compatible with the newer versions of Jira. There's more info about it here:

https://confluence.atlassian.com/jirakb/attachments-are-not-available-with-classnotfoundexception-after-upgrading-to-8-15-0-1044096965.html

The upshot is that if this is what is causing your problem, it will keep recurring every time you upgrade until you update the format of your web.xml file.

0 votes
Julian Somesan February 4, 2021

Thank you @ganfye83

I have spent last night few hours trying to debug the issue ( as i have the same issue)

Your solution fixed the problem, now the attachment can be seen

 

BUT

the thumbnails are still not generated  :-)

ganfye83 February 4, 2021

@Julian Somesan , correct I also noticed the thumbnail aren’t generate, luckily so far my issues doesn’t need to view in thumbnails as most of my issues have more than 10 files++

Stay safe and protected 

Pramodh M
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 4, 2021

For thumbnails

Check with reindexing once, if that did not solve the problem, here's the kb article.

https://confluence.atlassian.com/jirakb/attachment-thumbnails-not-displaying-after-jira-server-migration-830149793.html

Thanks,
Pramodh

Julian Somesan February 4, 2021

The above KB article is  not fixing the problem

 

Because even the Newly created attachments DOES NOT  have its thumbnail shown correctly ...

 

I suspect there is yet another file missing from :

jira/atlassian-jira/WEB-INF/classes/com/atlassian/jira/web/servlet/

 

ViewThumbnailServlet.class

Like # people like this
Julian Somesan February 4, 2021

Nope, adding the file ViewThumbnailServlet.class still not solved the issue.

 

I wonder if someone from Atlassian can fix their own software ?

Like ganfye83 likes this
ganfye83 February 4, 2021

@Julian Somesan  Good try, and I think those have to check again if any "error" show in any particular logs to see which files are having an issue or missing. (That's how I trace the attachment cannot be download issue). Only for now we really do not need the thumbnail yet, thus I should be fine to wait until the next fizxed version release.

Have a good day to you and stay safe and protected.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events