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

groovy.lang.MissingMethodException: No signature of method: org.jfrog.artifactory.client.impl.ArtifactBase.withProperty() #385

Open
vickyrare opened this issue Apr 30, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@vickyrare
Copy link

vickyrare commented Apr 30, 2024

Describe the bug
groovy.lang.MissingMethodException: No signature of method: org.jfrog.artifactory.client.impl.ArtifactBase.withProperty()

To Reproduce
Try to set the property and then upload.

Map<String, String> attributes = artifactoryUploadItem.getAttributes();

attributes.forEach((k, v) -> uploadableArtifact.withProperty(k, v));

File file = uploadableArtifact.doUpload();

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Versions

  • Artifactory Java Client version: 2.9.2
  • Operating system: Mac OS X
  • Artifactory Version: EnterpriseX license 7.63.14

Additional context
We have recently upgraded from Micronaut 3 to Micronaut 4.
The groovy was updated from 3.0.13 to 4.0.20

groovy.lang.MissingMethodException: No signature of method: org.jfrog.artifactory.client.impl.ArtifactBase.withProperty() is applicable for argument types: (String, String) values: [artifact-hash, 5586d855ba242032a3aad0216a74ac61c18288077aed217589baec3729f8f9a5]
Possible solutions: withProperty(java.lang.String, [Ljava.lang.Object;), withProperty(java.lang.String, java.lang.Object), hasProperty(java.lang.String)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:72)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:148)
at org.jfrog.artifactory.client.impl.UploadableArtifactImpl.withProperty(UploadableArtifactImpl.groovy:140)
at com.oracle.swaservices.common.artifactory.DefaultArtifactoryUploadService.lambda$upload$0(DefaultArtifactoryUploadService.java:52)

@vickyrare vickyrare added the bug Something isn't working label Apr 30, 2024
@dmeibusch
Copy link

Workaround: separately set properties after upload of the artifact rather than using the problematic Groovy overloaded withProperty method that can not be handled by newer Groovy runtimes.

Downsides: two calls vs one call to repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants