0

例外:java.lang.NoClassDefFoundError: com/atlassian/jira/rest/client/internal/async/AsynchronousJiraRestClientFactory

我到处搜索,但不知道如何解决。我想获取JIRA数据。

我正在使用与 http://invariantproperties.com/2013/08/07/using-the-jira-rest-java-client-introduction/类似的代码

我收到以下异常:

org.springframework.web.util.NestedServletException: Handler processing failed; nested exception is java.lang.NoClassDefFoundError: com/atlassian/jira/rest/client/internal/async/AsynchronousJiraRestClientFactory
    org.springframework.web.servlet.DispatcherServlet.triggerAfterCompletionWithError(DispatcherServlet.java:1287)
    org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:961)
    org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:877)
    org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:961)
    org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:852)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:624)
    org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

根本原因:

java.lang.NoClassDefFoundError: com/atlassian/jira/rest/client/internal/async/AsynchronousJiraRestClientFactory
    jira.HelloWorldController.jiramethod(HelloWorldController.java:58)
    jira.HelloWorldController.handleRequestInternal(HelloWorldController.java:32)
    org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:154)
    org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:50)
    org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:943)
    org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:877)
    org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:961)
    org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:852)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:624)
    org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

这是由以下原因引起的:

java.lang.ClassNotFoundException: com.atlassian.jira.rest.client.internal.async.AsynchronousJiraRestClientFactory
    org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1720)
    org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571)
    jira.HelloWorldController.jiramethod(HelloWorldController.java:58)
    jira.HelloWorldController.handleRequestInternal(HelloWorldController.java:32)
    org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:154)
    org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:50)
    org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:943)
    org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:877)
    org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:961)
    org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:852)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:624)
    org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

我不知道该怎么办。

我是新手,JIRA过去两天我一直在寻找解决方案。

4

1 回答 1

1

尝试在 pom.xml 中使用以下依赖项

<dependency>
        <groupId>org.openengsb.wrapped</groupId>
        <artifactId>jira-rest-java-client-api</artifactId>
        <version>2.0.0-m32.w1</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>org.openengsb.wrapped</groupId>
        <artifactId>jira-rest-java-client-core</artifactId>
        <version>2.0.0-m32.w1</version>
        <scope>provided</scope>
    </dependency>
于 2015-07-24T18:48:50.213 回答