尝试阅读JIRA问题时java.lang.ClassNotFoundException:com.atlassian.jira.rest.client.ProgressMonitor

时间:2013-04-29 08:11:44

标签: java-ee jira jira-rest-java-api

我是JIRA的新手。在maven中为JRJC添加了依赖项。我的方案是阅读我的Java EE应用程序中的问题。 我创建了一个简单的类 公共类IssueCollector {     public void readIssue(){

    final JerseyJiraRestClientFactory factory = new JerseyJiraRestClientFactory();
    try{
        final URI jiraServerUri = new URI("http://localhost:8080//jira");
        final JiraRestClient restClient = factory.createWithBasicHttpAuthentication(jiraServerUri,"username", "password");
        final NullProgressMonitor pm = new NullProgressMonitor();
        final Issue issue = restClient.getIssueClient().getIssue("AKE-1", pm);

        System.out.println(issue);
    }catch(Exception e){
        System.out.println("URI not found");
    }

}

}

但是当我跑步时,我会遇到像

这样的例外情况
java.lang.NoClassDefFoundError: com/atlassian/jira/rest/client/ProgressMonitor
    com.vxl.appanalytix.dataload.fromEmail.GenericEmailAttachmentDownloder.downloadEmailAttachments(GenericEmailAttachmentDownloder.java:28)
    com.vxl.appanalytix.controllers.controllerClasses.GenericEmailServiceClass.readEmailAttachments(GenericEmailServiceClass.java:13)
    com.vxl.appanalytix.controllers.GenericEmailServiceServlet.doPost(GenericEmailServiceServlet.java:57)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:728)

我错了路。必须创建Web服务而不是简单的java类

1 个答案:

答案 0 :(得分:0)

查看您正在使用的JRJC版本。他们改变了他们到达数据库的方式,因此不再需要ProgressMonitor 我不确定它发生了什么变化,但我相信版本1.0.0是带有ProgressMonitor的最后一个版本。