jfrog / jfrog/artifactory-client-java

Error when deploying artifact with services-0.8-all

Open
#15 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

stale
Dominant language
Java
Stars
331
Forks
163
Avg merge
20h 9m
Merged PRs (30d)
1

Description

Hey Baruch,

I am using services-0.8-all.jar for trying to deploy artifact on artifactory and I wrote this code to make it works.

Artifactory artifactory = org.jfrog.artifactory.client.ArtifactoryClient.create("http://myip:8080/artifactory", username, password);

java.io.File file = new File("path/to/my/local/jar");

RepositoryHandle repoHandle = artifactory.repository(repoWhereToUpload);

UploadableArtifact uploadable = repoHandle.upload("path/to/remote/jar/to/create",file);

uploadable.doUpload();

When I execute the preceding code I've got this message :

Exception in thread "main" groovy.lang.MissingMethodException: No signature of method: org.jfrog.artifactory.client.impl.ArtifactoryImpl.put() is applicable for argument types: (org.codehaus.groovy.runtime.GStringImpl, java.util.LinkedHashMap, java.io.BufferedInputStream, java.util.LinkedHashMap, java.lang.Class, groovyx.net.http.ContentType, java.lang.Long) values: [/jk_p/02.12.00/jk_p-02.12.00.jar, ...]
Possible solutions: wait(), any(), dump(), find(), grep()
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:55)
at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:51)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
at org.jfrog.artifactory.client.impl.UploadableArtifactImpl$_uploadContent_closure1.doCall(UploadableArtifactImpl.groovy:61)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:909)
at groovy.lang.Closure.call(Closure.java:411)
at groovy.lang.Closure.call(Closure.java:427)
at org.codehaus.groovy.runtime.IOGroovyMethods.withStream(IOGroovyMethods.java:1160)
at org.codehaus.groovy.runtime.dgm$709.invoke(Unknown Source)
at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:271)
at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:53)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
at org.jfrog.artifactory.client.impl.UploadableArtifactImpl.uploadContent(UploadableArtifactImpl.groovy:60)
at org.jfrog.artifactory.client.impl.UploadableArtifactImpl.this$3$uploadContent(UploadableArtifactImpl.groovy)
at org.jfrog.artifactory.client.impl.UploadableArtifactImpl$this$3$uploadContent.callCurrent(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:49)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:141)
at org.jfrog.artifactory.client.impl.UploadableArtifactImpl.doUpload(UploadableArtifactImpl.groovy:52)
at fr.cnamts.repo.rest.Main.testArtifactory(Main.java:270)
at fr.cnamts.repo.rest.Main.main(Main.java:160)

Have you got any idea where it could be from ?

Thanks

I am running with :
->eclipse galileo
->Windows 7
-> jdk 1.7.0_13

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at UploadableArtifactImpl.groovy:52-61, where doUpload invokes uploadContent, and inspect the ArtifactoryImpl.put call shown in the stack trace. Compare that call with the available method signature and reproduce the services-0.8-all upload from Main.java:270; done means the artifact uploads without MissingMethodException.

Written by the indexing model from the issue text.

Assessment

Tech stack
groovy, java
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.