Skip to content

Duplicate class definition for OwnershipGlobalVariableImpl #84

@gpxricky

Description

@gpxricky

Hi,
I'm using the plugin in a Declarative Pipeline. I access the job owners in two different stages, in a normal build stage and in the cleanup stage.
Unfortunately I now sometimes get the following error:

java.lang.LinkageError: loader (instance of  org/jenkinsci/plugins/workflow/cps/CpsGroovyShell$CleanGroovyClassLoader): attempted  duplicate class definition for name: "org/jenkinsci/plugins/ownership/model/OwnershipGlobalVariableImpl"

I don't think it has something to do with it, but the problem appeared only (?) after introducing the feature of sequential stages. However, the ownership plugin is only accessed within one of the two stages blocks.

Below you find the functions that I'm using in a custom step of my shared library. This code is accessed two times, in the normal stage and in the cleanup stage:

  • ownership.job.ownershipEnabled
  • ownership.job.primaryOwnerEmail
  • ownership.job.secondaryOwnerEmails

I'm using version 0.12.1 of the plugin.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions