taskadapter / redmine-java-api

Redmine Java API
Apache License 2.0
270 stars 163 forks source link

Getting 404 Not Found trying to get all issues by project #334

Open giadainterlicchia opened 4 years ago

giadainterlicchia commented 4 years ago

I want to get all issues and display them in a web page but everytime I run my application with these instructions:

  RedmineManager mgr = RedmineManagerFactory.createWithApiKey(uri, apiAccessKey);
  IssueManager issueManager = mgr.getIssueManager();
  List<Issue> issues = issueManager.getIssues(projectKey, queryId);
        for (Issue issue : issues) {
            System.out.println(issue.toString());
        }

I have this error:

Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is com.taskadapter.redmineapi.NotFoundException: Server returned '404 not found'

WHY?

The url, and token parameters are correct because I made a test with curl command and with it, i saw in my terminal the correct result.

alexeyOnGitHub commented 4 years ago

is your REST API enabled? does the user you use for this call have access to the requested queryId? I suggest debugging this