jfrog / jfrog/artifactory-client-java
404 error when calling artifactory.security() or artifactory.system()
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 331
- Forks
- 163
- Avg merge
- 20h 9m
- Merged PRs (30d)
- 1
Description
I am working on creating a jenkins script, that can access artifactory Rest API (version: 7.84.17)
Following examples from README, when I make rest calls like:
ArtifactoryRequest repositoryRequest = new ArtifactoryRequestImpl().apiUrl("access/api/v1/tokens")
.method(ArtifactoryRequest.Method.GET)
.responseType(ArtifactoryRequest.ContentType.JSON);
ArtifactoryResponse response = artifactory.restCall(repositoryRequest);
println response.getRawBody()
I get expected response, but when I try to access anything via artifactory.security() or artifactory.system() it always gives me
org.apache.http.client.HttpResponseException: status code: 404, reason phrase: 404 page not found
at org.jfrog.artifactory.client.impl.ArtifactoryImpl.newHttpResponseException(ArtifactoryImpl.java:257)
at org.jfrog.artifactory.client.impl.ArtifactoryImpl.get(ArtifactoryImpl.java:287)
at org.jfrog.artifactory.client.impl.ArtifactoryImpl.get(ArtifactoryImpl.java:270)
at org.jfrog.artifactory.client.Artifactory$get$0.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:144)
at org.jfrog.artifactory.client.impl.SecurityImpl.userNames(SecurityImpl.groovy:41)
at org.jfrog.artifactory.client.Security$userNames.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:120)
at Script1.run(Script1.groovy:14)
Even system().ping() system().version().getVersion() isn't working.
I have tried admin scope token and even admin's identity token but its same result.
Can someone please help?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the failing security() and system() calls against Artifactory 7.84.17, then inspect ArtifactoryImpl.java around the reported lines and SecurityImpl.groovy:41. Compare those request paths with the working access/api/v1/tokens example. Done means the affected calls no longer return 404 and their existing behavior is covered by an appropriate test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100