Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

The method getIssue(String) from the type IssueRestClient refers to the missing type Promise.

Deleted user May 24, 2019

After following below tutorial

https://bitbucket.org/atlassian/jira-rest-java-client/src/75a64c9d81aad7d8bd9beb11e098148407b13cae/test/src/test/java/samples/Example1.java?at=master

 i created below mentioned class,  but i am getting compilation issues , even after adding all the jars.

public class Demo {

private static URI jiraServerUri = URI.create("https://MyCompanyAgileproj.atlassian.net/");
private static boolean quiet = false;

public static void main(String[] args) {
parseArgs(args);

final AsynchronousJiraRestClientFactory factory = new AsynchronousJiraRestClientFactory();
final JiraRestClient restClient = factory.createWithBasicHttpAuthentication(jiraServerUri, "email", "password");
try {

//This below line is giving the compilation issue: "The method getIssue(String) from the type IssueRestClient refers to the missing type Promise." I added the JARS mentioned at the end of this program

final Issue issue = restClient.getIssueClient().getIssue("Issue-1").claim();

}catch(Exception e){
e.printStackTrace();
}
}

private static void parseArgs(String[] argsArray) throws URISyntaxException {
final List<String> args = Lists.newArrayList(argsArray);
if (args.contains("-q")) {
quiet = true;
args.remove(args.indexOf("-q"));
}

if (!args.isEmpty()) {
jiraServerUri = new URI(args.get(0));
}
}
}

The below Jars were added.

1) jira-rest-java-client-0.2.jar

2) jira-rest-java-client-api-4.0.0.jar

3) jira-rest-java-client-app-5.1.0.jar

4) jira-rest-java-client-core-4.0.0.jar

5) jira-rest-java-client-test-5.0.4.jar

6) org.apache.commons.httpclient.jar

7) google-collections-1.0.jar

8) javax.ws.rs.jar

9) jersey-apache-client-1.6.jar

10)jersey-bundle-1.9.jar

11)jettison-1.2.jar

Please mention how to resolve it.

 

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events