使用Allure插件时Jenkins中的构建历史消失

bq9c1y66  于 2022-11-21  发布在  Jenkins
关注(0)|答案(1)|浏览(271)

我尝试在Jenkins中为我的测试生成Allure报告。我安装了Allure插件,在全局工具配置中配置了allure-commandline,并在作业配置中添加了构建后操作。该报告可用几个小时,然后消失。在作业控制台输出中一切正常,但在Jenkins日志中出现以下错误:

Failed to save build record
java.lang.reflect.InaccessibleObjectException: Unable to make field private java.lang.Object java.lang.ref.Reference.referent accessible: module java.base does not "opens java.lang.ref" to unnamed module @6f43c82
    at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354)
    at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
    at java.base/java.lang.reflect.Field.checkCanSetAccessible(Field.java:178)
    at java.base/java.lang.reflect.Field.setAccessible(Field.java:172)
    at com.thoughtworks.xstream.converters.reflection.FieldDictionary.buildDictionaryEntryForClass(FieldDictionary.java:176)
    at com.thoughtworks.xstream.converters.reflection.FieldDictionary.buildMap(FieldDictionary.java:142)
    at com.thoughtworks.xstream.converters.reflection.FieldDictionary.fieldsFor(FieldDictionary.java:80)
    at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:167)
    at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:208)
    at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:165)
    at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:68)
    at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:59)
    at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:83)
    at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:285)
    at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:272)
Caused: java.lang.RuntimeException: Failed to serialize ru.yandex.qatools.allure.jenkins.AllureReportBuildAction#buildSummary for class ru.yandex.qatools.allure.jenkins.AllureReportBuildAction
    at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:276)
    at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:243)
    at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:174)
    at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:228)
    at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:165)
    at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:68)
    at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:59)
    at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:44)
    at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:87)
    at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeBareItem(AbstractCollectionConverter.java:94)
    at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeItem(AbstractCollectionConverter.java:66)
    at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeCompleteItem(AbstractCollectionConverter.java:81)
    at com.thoughtworks.xstream.converters.collections.CollectionConverter.marshal(CollectionConverter.java:75)
    at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:68)
    at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:59)
    at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:83)
    at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:285)
    at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:272)
Caused: java.lang.RuntimeException: Failed to serialize hudson.model.Actionable#actions for class hudson.model.FreeStyleBuild
    at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:276)
    at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:243)
    at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:174)
    at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:228)
    at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:165)
    at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:68)
    at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:59)
    at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:44)
    at com.thoughtworks.xstream.core.TreeMarshaller.start(TreeMarshaller.java:83)
    at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.marshal(AbstractTreeMarshallingStrategy.java:37)
    at com.thoughtworks.xstream.XStream.marshal(XStream.java:1266)
    at com.thoughtworks.xstream.XStream.marshal(XStream.java:1255)
    at com.thoughtworks.xstream.XStream.toXML(XStream.java:1228)
    at hudson.XmlFile.write(XmlFile.java:213)
Caused: java.io.IOException
    at hudson.XmlFile.write(XmlFile.java:220)
    at hudson.model.Run.save(Run.java:2070)
    at hudson.model.Run.execute(Run.java:1956)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:44)
    at hudson.model.ResourceController.execute(ResourceController.java:107)
    at hudson.model.Executor.run(Executor.java:449)

Allure Jenkins插件版本:2.30.2诱惑命令行:2.19.0 Java版本:OpenJDK18.0.2.1Jenkins版本:2.361.2
我尝试使用以下命令启动Jenkins,但没有成功:Dhudson.remoting.ClassFilter=ru.yandex.qatools.allure.jenkins.AllureReportBuildAction,ru.yandex.qatools.allure.jenkins.utils.BuildSummary

zpf6vheq

zpf6vheq1#

Allure Jenkins插件尚不支持Java 17及更高版本。跟踪进度的相关问题:https://github.com/jenkinsci/allure-plugin/issues/315

相关问题