通過servlet(使用FileUploadServlet)爲Jira製作插件並進行數據交換。 測試有關JIRA 5.2.10是確定的,但在6.0有一個煩惱:插件可用於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] Detected an error (NoClassDefFoundError) instantiating the module for plugin 'com.polontech.jira.plugin.activity.smartact.SmartAct' for module 'dataServlet': org/apache/commons/fileupload/FileUploadException. This error is usually caused by your plugin using a imported component class that itself relies on other packages in the product. You can probably fix this by adding the missing class's package to your instructions; for more details on how to fix this, see 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] Unable to create 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>