gpt4 book ai didi

gradle - VerifyError:函数的参数不兼容

转载 作者:行者123 更新时间:2023-12-03 05:49:50 25 4
gpt4 key购买 nike

我有一个Gradle 4.4.1脚本,偶尔会失败。这通常在运行test任务之前在多台计算机上发生。

这是相关的日志(在运行gradlew test --info时获取):

Up-to-date check for task ':test' took 4.191 secs. It is not up-to-date because:
No history is available.
(class: org/gradle/process/internal/worker/child/WorkerProcessClassPathProvider$CacheInitializer, method: remapClass signature: (Ljava/lang/Class;Ljava/util/zip/ZipOutputStream;)V) Incompatible argument to function
java.lang.VerifyError: (class: org/gradle/process/internal/worker/child/WorkerProcessClassPathProvider$CacheInitializer, method: remapClass signature: (Ljava/lang/Class;Ljava/util/zip/ZipOutputStream;)V) Incompatible argument to function
at org.gradle.process.internal.worker.child.WorkerProcessClassPathProvider.findClassPath(WorkerProcessClassPathProvider.java:79)
at org.gradle.api.internal.DefaultClassPathRegistry.getClassPath(DefaultClassPathRegistry.java:34)
at org.gradle.process.internal.worker.child.ApplicationClassesInSystemClassLoaderWorkerImplementationFactory.prepareJavaCommand(ApplicationClassesInSystemClassLoaderWorkerImplementationFactory.java:89)
at org.gradle.process.internal.worker.DefaultWorkerProcessBuilder.build(DefaultWorkerProcessBuilder.java:194)
at org.gradle.api.internal.tasks.testing.worker.ForkingTestClassProcessor.forkProcess(ForkingTestClassProcessor.java:84)
at org.gradle.api.internal.tasks.testing.worker.ForkingTestClassProcessor.processTestClass(ForkingTestClassProcessor.java:69)
at org.gradle.api.internal.tasks.testing.processors.RestartEveryNTestClassProcessor.processTestClass(RestartEveryNTestClassProcessor.java:47)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
at org.gradle.internal.dispatch.FailureHandlingDispatch.dispatch(FailureHandlingDispatch.java:29)
at org.gradle.internal.dispatch.AsyncDispatch.dispatchMessages(AsyncDispatch.java:133)
at org.gradle.internal.dispatch.AsyncDispatch.access$000(AsyncDispatch.java:34)
at org.gradle.internal.dispatch.AsyncDispatch$1.run(AsyncDispatch.java:73)
at org.gradle.internal.operations.BuildOperationIdentifierPreservingRunnable.run(BuildOperationIdentifierPreservingRunnable.java:39)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
at java.lang.Thread.run(Thread.java:745)

版本信息:
./gradlew -version

------------------------------------------------------------
Gradle 4.4.1
------------------------------------------------------------

Build time: 2017-12-20 15:45:23 UTC
Revision: 10ed9dc355dc39f6307cc98fbd8cea314bdd381c

Groovy: 2.4.12
Ant: Apache Ant(TM) version 1.9.9 compiled on February 2 2017
JVM: 1.8.0_111 (Oracle Corporation 25.111-b14)
OS: Linux 4.13.5-coreos-r2 amd64

这个示例发生在刚安装的计算机上,即Gradle之前下载了所有必需的内容。如果在Internet上未找到有关此错误的任何信息,则欢迎提供有关如何解决此错误的任何提示。

升级到Gradle 4.5也无法解决问题。

最佳答案

问题似乎是Eclipselink编织,我启用了according to an answer here on Stackoverflow。我在build.gradle中有这个:

compileTestJava.doLast {
ClassLoader antClassLoader = org.apache.tools.ant.Project.class.classLoader
sourceSets.main.compileClasspath.each{File f -> antClassLoader.addURL(f.toURI().toURL())}

ant.taskdef(name: "weave",
classname: "org.eclipse.persistence.tools.weaving.jpa.StaticWeaveAntTask",
classpath: configurations.compile.asPath
)

ant.weave(source: compileJava.destinationDir,
target: compileJava.destinationDir,
persistenceinfo: processResources.destinationDir
)
}

删除此部分后,问题消失了。

关于gradle - VerifyError:函数的参数不兼容,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48411465/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com