欢迎!请查阅关于页面以了解更多关于如何使用本站的信息。
有时(可能占 1% 左右)在我的 CI 报告中,这种错误没有原因就出现了。
这是一个大型 tools-deps CLI 项目,包含许多本地/git/maven 依赖,在 CircleCI/Docker 上运行。
zulu-openjdk-11dev-utils-tools-deps 1.10.3.814
Error building classpath. class java.util.HashMap$Node cannot be cast to class java.util.HashMap$TreeNode (java.util.HashMap$Node and java.util.HashMap$TreeNode are in module java.base of loader 'bootstrap') java.lang.ClassCastException: class java.util.HashMap$Node cannot be cast to class java.util.HashMap$TreeNode (java.util.HashMap$Node and java.util.HashMap$TreeNode are in module java.base of loader 'bootstrap') at java.base/java.util.HashMap$TreeNode.moveRootToFront(HashMap.java:1882) at java.base/java.util.HashMap$TreeNode.putTreeVal(HashMap.java:2061) at java.base/java.util.HashMap.putVal(HashMap.java:633) at java.base/java.util.HashMap.put(HashMap.java:607) at java.base/java.util.HashSet.add(HashSet.java:220) at org.apache.maven.model.validation.DefaultModelValidator.validateId(DefaultModelValidator.java:847) at org.apache.maven.model.validation.DefaultModelValidator.validateEffectiveDependency(DefaultModelValidator.java:659) at org.apache.maven.model.validation.DefaultModelValidator.validateEffectiveDependencies(DefaultModelValidator.java:583) at org.apache.maven.model.validation.DefaultModelValidator.validateEffectiveModel(DefaultModelValidator.java:373) at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:494) at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:440) at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:430) at org.apache.maven.model.building.DefaultModelBuilder.importDependencyManagement(DefaultModelBuilder.java:1299) at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:474) at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:440) at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:430) at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:292) at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.readArtifactDescriptor(DefaultArtifactDescriptorReader.java:171) at org.eclipse.aether.internal.impl.DefaultRepositorySystem.readArtifactDescriptor(DefaultRepositorySystem.java:255) at clojure.tools.deps.alpha.extensions.maven$eval1076$fn__1078.invoke(maven.clj:107) at clojure.lang.MultiFn.invoke(MultiFn.java:244) at clojure.tools.deps.alpha$expand_deps$children_task__790$fn__792$fn__793.invoke(alpha.clj:403) at clojure.tools.deps.alpha.util.concurrent$submit_task$task__505.invoke(concurrent.clj:34) at clojure.lang.AFn.call(AFn.java:18) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:834)
这已在https://clojure.atlassian.net/browse/TDEPS-153上进行记录,有了一些关于如何修复它的想法,但还没有时间开始工作。
我怀疑如果使用 -Sthreads 1 可能能绕过这个问题(我想不管是哪种方式,都想知道它是否可行)。
-Sthreads 1