error 404 when using jrjc

Asik November 18, 2012

using the tutorial to connect to jira, i get this error (404)

the errro is occur when trying to get issue

JerseyJiraRestClientFactory factory = new JerseyJiraRestClientFactory();
    	
        final URI jiraServerUri = new URI("http://192.168.1.10:8084/jira");
        final JiraRestClient restClient = factory.createWithBasicHttpAuthentication(jiraServerUri, "MyUser", "myPass");
        final NullProgressMonitor pm = new NullProgressMonitor();
        final IssueRestClient asd = restClient.getIssueClient();
        restClient.getProjectClient().getAllProjects(pm);
        try {
        	final Issue issue = restClient.getIssueClient().getIssue("SYNC-1", pm);
        	System.out.println(issue);
		} catch (Exception e) {
			System.out.println(e);
		}

does anyone have an idea whats the reason for this error?

1 answer

0 votes
Faisal
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 19, 2012

Hi there,

The error 404 may indicate that the requested resource is not found.

Since this is the case, things that we can try to check here is that:
- ensure that the Base URL is correctly configured (correct port number, and context path)
- ensure that the issue with the key SYNC-1 exists in JIRA
- ensure that the user MyUser is able to access SYNC-1 issue in JIRA (no permission issue)

Reference on the error code when getting an issue via REST:
- http://docs.atlassian.com/jira/REST/latest/#id251456

I hope that the info above helps.

Cheers.

<body></body>

Suggest an answer

Log in or Sign up to answer