Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to build - getting 401 Unauthorized error on httpclient plugin on atlassian mavenlink #44

Closed
pathikb opened this issue Oct 23, 2017 · 5 comments
Labels

Comments

@pathikb
Copy link

pathikb commented Oct 23, 2017

When I try to build using the instructions given, I get the following error:

FAILURE: Build failed with an exception.

  • What went wrong:
    Could not resolve all dependencies for configuration ':compileClasspath'.

Could not determine artifacts for com.atlassian.httpclient:atlassian-httpclient-plugin:0.23.0
Could not get resource 'https://maven.atlassian.com/repository/public/com/atlassian/httpclient/atlassian-httpclient-plugin/0.23.0/atlassian-httpclient-plugin-0.23.0.atlassian-plugin'.
> Could not HEAD 'https://maven.atlassian.com/repository/public/com/atlassian/httpclient/atlassian-httpclient-plugin/0.23.0/atlassian-httpclient-plugin-0.23.0.atlassian-plugin'. Received status code 401 from server: Unauthorized

Please suggest a way to fix this

@gustavkarlsson
Copy link
Owner

Thank you for reporting this. Hoping to it this week.
This failed Travis build also confirms it: https://travis-ci.org/gustavkarlsson/rocketchat-jira-trigger/jobs/270170094

Reason seems to be that the Atlassian Maven repository now requires authentication.

@pathikb
Copy link
Author

pathikb commented Oct 25, 2017

If you could point me in the right direction, it would really help me try and fix this issue myself.

@gustavkarlsson
Copy link
Owner

Fixed in Release 1.2.1

@pathikb
Copy link
Author

pathikb commented Oct 26, 2017

Well, the build issue is resolved but now I get the below error when I try to run the binary -

root@vps2:~/rocketchat-jira-trigger/build/install/rocketchat-jira-trigger# ./bin/rocketchat-jira-trigger config.tml
2017-10-26 16:12:45,658 [main] INFO s.g.r.j.RestClientProvider - Using basic authentication
2017-10-26 16:12:45,660 [main] INFO s.g.r.j.RestClientProvider - Password provided through configuration
Exception in thread "main" java.lang.NoSuchFieldError: INSTANCE
at org.apache.http.impl.nio.codecs.DefaultHttpRequestWriterFactory.(DefaultHttpRequestWriterFactory.java:52)
at org.apache.http.impl.nio.codecs.DefaultHttpRequestWriterFactory.(DefaultHttpRequestWriterFactory.java:56)
at org.apache.http.impl.nio.codecs.DefaultHttpRequestWriterFactory.(DefaultHttpRequestWriterFactory.java:46)
at org.apache.http.impl.nio.conn.ManagedNHttpClientConnectionFactory.(ManagedNHttpClientConnectionFactory.java:75)
at org.apache.http.impl.nio.conn.ManagedNHttpClientConnectionFactory.(ManagedNHttpClientConnectionFactory.java:83)
at org.apache.http.impl.nio.conn.ManagedNHttpClientConnectionFactory.(ManagedNHttpClientConnectionFactory.java:64)
at com.atlassian.httpclient.apache.httpcomponents.ApacheAsyncHttpClient.(ApacheAsyncHttpClient.java:175)
at com.atlassian.httpclient.apache.httpcomponents.ApacheAsyncHttpClient.(ApacheAsyncHttpClient.java:123)
at com.atlassian.httpclient.apache.httpcomponents.DefaultHttpClientFactory.doCreate(DefaultHttpClientFactory.java:68)
at com.atlassian.httpclient.apache.httpcomponents.DefaultHttpClientFactory.create(DefaultHttpClientFactory.java:35)
at com.atlassian.jira.rest.client.internal.async.AsynchronousHttpClientFactory.createClient(AsynchronousHttpClientFactory.java:63)
at com.atlassian.jira.rest.client.internal.async.AsynchronousJiraRestClientFactory.create(AsynchronousJiraRestClientFactory.java:35)
at se.gustavkarlsson.rocketchat.jira_trigger.RestClientProvider.get(RestClientProvider.java:32)
at se.gustavkarlsson.rocketchat.jira_trigger.Server.(Server.java:48)
at se.gustavkarlsson.rocketchat.jira_trigger.App.(App.java:19)
at se.gustavkarlsson.rocketchat.jira_trigger.App.main(App.java:26)

@gustavkarlsson
Copy link
Owner

gustavkarlsson commented Oct 26, 2017

You are right. Somehow the fix introduced another bug that I did not detect. I've opened #45 to resolve it.

Sorry for the trouble!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants