我有一个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刚刚下载了所有必需的东西。如果在互联网上没有找到关于这个bug的任何信息,那么任何关于如何修复它的提示都会受到赞赏。
升级到Gradle 4.5也无法解决问题。
答案 0 :(得分:0)
问题似乎是Eclipselink编织,我启用了according to an answer here on Stackoverflow。我在float_time
:
build.gradle
删除此部分后,问题就消失了。