1

我刚刚将 jenkins 升级到 2.164,这是我在所有工作结束时收到的错误消息。我正在使用构建流程,我知道我必须将条目添加到 whitelisted-classes.txt,但是

第一个日志

错误:步骤“使用来自另一个项目的发布者”由于异常而中止:java.lang.UnsupportedOperationException:出于安全原因拒绝编组 java.util.concurrent.locks.ReentrantLock;见https://jenkins.io/redirect/class-filter/ 在 hudson.util.XStream2$BlacklistedTypesConverter.marshal(XStream2.java:546) 在 com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69) 在 com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller .java:58) 在 com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84) 在 hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:265) 在 hudson.util.RobustReflectionConverter$2.writeField(鲁棒反射转换器.java:252)

当我添加启动 jenkins 命令时

-Dhudson.remoting.ClassFilter=java.util.concurrent.locks.ReentrantLock

然后我收到这条消息

错误:步骤“使用来自另一个项目的发布者”由于异常而中止:java.lang.UnsupportedOperationException:出于安全原因拒绝编组 java.util.concurrent.locks.ReentrantLock$NonfairSync;见https://jenkins.io/redirect/class-filter/ 在 hudson.util.XStream2$BlacklistedTypesConverter.marshal(XStream2.java:546) 在 com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69) 在 com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller .java:58) 在 com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84) 在 hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:265) 在 hudson.util.RobustReflectionConverter$2.writeField(鲁棒反射转换器.java:252)

我尝试添加下一个条目 jenkins 命令,例如 -Dhudson.remoting.ClassFilter=java.util.concurrent.locks.ReentrantLock,java.util.concurrent.locks.ReentrantLock$NonfairSync

但仍然返回错误

错误:步骤“使用来自另一个项目的发布者”由于异常而中止:java.lang.UnsupportedOperationException:出于安全原因拒绝编组 java.util.concurrent.locks.ReentrantLock$NonfairSync;见https://jenkins.io/redirect/class-filter

但是,当詹金斯开始时,我看到 -Dhudson.remoting.ClassFilter=java.util.concurrent.locks.ReentrantLock,java.util.concurrent.locks.ReentrantLock

后不返回这句话"$NonfairSync",为什么呢?我能做错什么?

下一个答案,我可以在 jenkins gui 中更改启动文件吗?(脚本控制台,但我可以使用哪个命令?)

4

0 回答 0