通过servlet进行数据交换(使用FileUploadServlet)为Jira制作插件。 在Jira 5.2.10上进行测试没问题,但在6.0上有一个问题:
2013-06-27 21:46:26,575 http-bio-8080-exec-24 ERROR anri 1306x1054x1 4bhuqg 169.254.57.250 / plugins / servlet / smartActDataServlet [atlassian.plugin.module.PrefixDelegatingModuleFactory]检测到错误(NoClassDefFoundError)为插件实例化模块' com.polontech.jira.plugin.activity.smartact.SmartAct' for module' dataServlet':org / apache / commons / fileupload / FileUploadException。此错误通常是由您的插件使用导入的组件类引起的,该组件类本身依赖于产品中的其他软件包。你可以通过在你的指示中添加缺少的课程包来解决这个问题。有关如何解决此问题的详细信息,请参阅https://developer.atlassian.com/display/DOCS/NoClassDefFoundError。
2013-06-27 21:46:26,577 http-bio-8080-exec-24 ERROR anri 1306x1054x1 4bhuqg 169.254.57.250 / plugins / servlet / smartActDataServlet [atlassian.plugin.servlet.DefaultServletModuleManager]无法创建servlet com.atlassian.util.concurrent.LazyReference $ InitializationException:java.lang.NoClassDefFoundError:org / apache / commons / fileupload / FileUploadException
为什么呢? 5.2.10和6.0之间的区别是什么?如何解决问题? 我得到的问题是FileUpload。也许,有一种方法可以将其添加到我的项目中? 依赖关系在他们的位置:
<dependency> <groupId>commons-fileupload</groupId> <artifactId>commons-fileupload</artifactId> <version>1.2.1</version> </dependency>
答案 0 :(得分:0)
错误似乎很模糊。我们无法知道有什么区别,但是每个软件产品都会在版本和内容之间发生变化,中断或被弃用。
转到Atlassian Support和Answers网站,从开发JIRA的人那里得到你想要的答案。他们会知道如何提供帮助。
答案 1 :(得分:0)
同时查看有关https://developer.atlassian.com/display/JIRADEV/Preparing+for+JIRA+6.0的所有信息 因为6.0是主要版本
答案 2 :(得分:0)
问题解决了。只需检查所有依赖项的版本:我必须使用common-fileupload-1.2.2:
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.2.2</version>
</dependency>