我正试图在jFrog神器中推送和拉取文件。我已经启动它并在端口8081上运行。我使用了以下代码但是收到错误。
Artifactory artifactory = ArtifactoryClient.create("http://localhost:8081/artifactory", "admin", "password");
InputStream content = new ByteArrayInputStream("I want to test my upload!".getBytes());
UploadableArtifact apAtrifact = artifactory.repository("libs-release-local").upload("resources/mock-data.xlsx", content);
File deployed = (File) apAtrifact.doUpload();
我遇到以下异常:
线程“main”中的异常java.lang.VerifyError:来自分支内部的错误方法调用
Exception Details:
Location:
org/jfrog/artifactory/client/impl/UploadableArtifactImpl.<init>(Ljava/lang/String;Ljava/lang/String;Ljava/io/File;Lorg/jfrog/artifactory/client/Artifactory;)V @119: invokespecial
Reason:
Error exists in the bytecode
Bytecode:
0000000: b800 203a 0507 bd00 4559 032b 5359 042c
0000010: 5359 0519 0512 4632 2db9 004c 0200 5359
0000020: 0619 0453 5910 ff12 02b8 0050 2a5f ab00
0000030: 0000 0084 0000 0002 ce18 5742 0000 001a
0000040: 7059 1b58 0000 004f 5f5a 5903 32b8 0036
0000050: c000 385f 5904 32b8 0036 c000 385f 5905
0000060: 3212 3cb8 002e c000 3c5f 5906 3212 52b8
0000070: 002e c000 525f 57b7 0054 a700 425f 5a59
0000080: 0332 b800 36c0 0038 5f59 0432 b800 36c0
0000090: 0038 5f59 0532 1256 b800 2ec0 0056 5f59
00000a0: 0632 1252 b800 2ec0 0052 5f57 b700 58a7
00000b0: 000d bb00 5a59 125c b700 5dbf 572d 3a06
00000c0: 1906 1256 b800 2ec0 0056 2a5f b500 5f19
00000d0: 0657 b1
Stackmap Table:
full_frame(@72,{UninitializedThis,Object[#56],Object[#56],Object[#86],Object[#82],Object[#97]},{Object[#99],UninitializedThis})
full_frame(@125,{UninitializedThis,Object[#56],Object[#56],Object[#86],Object[#82],Object[#97]},{Object[#99],UninitializedThis})
full_frame(@178,{UninitializedThis,Object[#56],Object[#56],Object[#86],Object[#82],Object[#97]},{Object[#99],UninitializedThis})
full_frame(@188,{Object[#2],Object[#56],Object[#56],Object[#86],Object[#82],Object[#97]},{Object[#99]})
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2532)
at java.lang.Class.getDeclaredConstructors(Class.java:1901)
at org.codehaus.groovy.reflection.CachedClass$2$1.run(CachedClass.java:69)
at java.security.AccessController.doPrivileged(Native Method)
at org.codehaus.groovy.reflection.CachedClass$2.initValue(CachedClass.java:66)
at org.codehaus.groovy.reflection.CachedClass$2.initValue(CachedClass.java:64)
at org.codehaus.groovy.util.LazyReference.getLocked(LazyReference.java:46)
at org.codehaus.groovy.util.LazyReference.get(LazyReference.java:33)
at org.codehaus.groovy.reflection.CachedClass.getConstructors(CachedClass.java:258)
at groovy.lang.MetaClassImpl.<init>(MetaClassImpl.java:189)
at groovy.lang.MetaClassImpl.<init>(MetaClassImpl.java:193)
at groovy.lang.MetaClassRegistry$MetaClassCreationHandle.createNormalMetaClass(MetaClassRegistry.java:158)
at groovy.lang.MetaClassRegistry$MetaClassCreationHandle.createWithCustomLookup(MetaClassRegistry.java:148)
at groovy.lang.MetaClassRegistry$MetaClassCreationHandle.create(MetaClassRegistry.java:131)
at org.codehaus.groovy.reflection.ClassInfo.getMetaClassUnderLock(ClassInfo.java:209)
at org.codehaus.groovy.reflection.ClassInfo.getMetaClass(ClassInfo.java:241)
at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.getMetaClass(MetaClassRegistryImpl.java:255)
at org.codehaus.groovy.runtime.InvokerHelper.getMetaClass(InvokerHelper.java:859)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.createCallConstructorSite(CallSiteArray.java:84)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:57)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:182)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:202)
at org.jfrog.artifactory.client.impl.RepositoryHandleImpl.upload(RepositoryHandleImpl.groovy:70)
编辑搜索工件:
List<RepoPath> repoPath = artifactoryClient.searches().itemsByProperty().property("version", "1.2").doSearch();
System.out.println("Repo Size : "+repoPath.size());
for (RepoPath path : repoPath) {
System.out.println("Mine Path: "+path);
}
由于