Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-53181

Jacoco adapter does not work if Jacoco plugin is installed too

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor

      This simple declarative pipeline fails during execution:

      pipeline {
      
          agent any
      
          stages {
      
              stage('Coverage') {
                  steps {
                      publishCoverage adapters: [jacoco('report.xml')]
                  }
              }
          }
      
      }
      

      with the following exception:

      [Pipeline] // stage
      [Pipeline] withEnv
      [Pipeline] {
      [Pipeline] stage
      [Pipeline] { (Coverage)
      [Pipeline] step
      [Pipeline] }
      [Pipeline] // stage
      [Pipeline] }
      [Pipeline] // withEnv
      [Pipeline] }
      [Pipeline] // node
      [Pipeline] End of Pipeline
      java.lang.IllegalArgumentException: Arguments to class hudson.plugins.jacoco.JacocoPublisher have to be explicitly named
      	at org.jenkinsci.plugins.structs.describable.DescribableModel.instantiate(DescribableModel.java:276)
      	at org.jenkinsci.plugins.structs.describable.UninstantiatedDescribable.instantiate(UninstantiatedDescribable.java:168)
      	at org.jenkinsci.plugins.structs.describable.DescribableModel.coerce(DescribableModel.java:394)
      	at org.jenkinsci.plugins.structs.describable.DescribableModel.buildArguments(DescribableModel.java:340)
      	at org.jenkinsci.plugins.structs.describable.DescribableModel.instantiate(DescribableModel.java:281)
      Caused: java.lang.IllegalArgumentException: Could not instantiate {delegate=@jacoco(<anonymous>=report.xml)} for CoreStep(delegate: SimpleBuildStep{ArtifactArchiver(artifacts: String, allowEmptyArchive?: boolean, caseSensitive?: boolean, defaultExcludes?: boolean, excludes?: String, fingerprint?: boolean, onlyIfSuccessful?: boolean) | CheckStylePublisher(canComputeNew?: boolean, canResolveRelativePaths?: boolean, canRunOnFailed?: boolean, defaultEncoding?: String, failedNewAll?: String, failedNewHigh?: String, failedNewLow?: String, failedNewNormal?: String, failedTotalAll?: String, failedTotalHigh?: String, failedTotalLow?: String, failedTotalNormal?: String, healthy?: String, pattern?: String, shouldDetectModules?: boolean, thresholdLimit?: String, unHealthy?: String, unstableNewAll?: String, unstableNewHigh?: String, unstableNewLow?: String, unstableNewNormal?: String, unstableTotalAll?: String, unstableTotalHigh?: String, unstableTotalLow?: String, unstableTotalNormal?: String, useDeltaValues?: boolean, usePreviousBuildAsReference?: boolean, useStableBuildAsReference?: boolean) | CifsPromotionPublisherPlugin(publishers: CifsPublisher(configName: String, verbose: boolean, transfers: CifsTransfer(sourceFiles: String, excludes: String, remoteDirectory: String, removePrefix: String, remoteDirectorySDF: boolean, flatten: boolean, cleanRemote: boolean, noDefaultExcludes: boolean, makeEmptyDirs: boolean, patternSeparator: String)[], useWorkspaceInPromotion: boolean, usePromotionTimestamp: boolean, retry: CifsRetry(retries: int, retryDelay: long), label: CifsPublisherLabel(label: String))[], continueOnError: boolean, failOnError: boolean, alwaysPublishFromMaster: boolean, masterNodeName: String, paramPublish: CifsParamPublish(parameterName: String)) | CifsPublisherPlugin(alwaysPublishFromMaster?: boolean, continueOnError?: boolean, failOnError?: boolean, masterNodeName?: String, paramPublish?: ParamPublish(parameterName: String), publishers?: CifsPublisher(configName: String, verbose: boolean, transfers: CifsTransfer(sourceFiles: String, excludes: String, remoteDirectory: String, removePrefix: String, remoteDirectorySDF: boolean, flatten: boolean, cleanRemote: boolean, noDefaultExcludes: boolean, makeEmptyDirs: boolean, patternSeparator: String)[], useWorkspaceInPromotion: boolean, usePromotionTimestamp: boolean, retry: CifsRetry(retries: int, retryDelay: long), label: CifsPublisherLabel(label: String))[]) | CoberturaPublisher(autoUpdateHealth?: boolean, autoUpdateStability?: boolean, classCoverageTargets?: String, coberturaReportFile?: String, conditionalCoverageTargets?: String, failNoReports?: boolean, failUnhealthy?: boolean, failUnstable?: boolean, fileCoverageTargets?: String, lineCoverageTargets?: String, maxNumberOfBuilds?: int, methodCoverageTargets?: String, onlyStable?: boolean, packageCoverageTargets?: String, sourceEncoding?: SourceEncoding[ASCII, Big5, Big5_HKSCS, Big5_Solaris, Cp037, Cp1006, Cp1025, Cp1026, Cp1046, Cp1047, Cp1097, Cp1098, Cp1112, Cp1122, Cp1123, Cp1124, Cp1140, Cp1141, Cp1142, Cp1143, Cp1144, Cp1145, Cp1146, Cp1147, Cp1148, Cp1149, Cp1250, Cp1251, Cp1252, Cp1253, Cp1254, Cp1255, Cp1256, Cp1257, Cp1258, Cp1381, Cp1383, Cp273, Cp277, Cp278, Cp280, Cp284, Cp285, Cp297, Cp33722, Cp420, Cp424, Cp437, Cp500, Cp737, Cp775, Cp838, Cp850, Cp852, Cp855, Cp856, Cp857, Cp858, Cp860, Cp861, Cp862, Cp863, Cp864, Cp865, Cp866, Cp868, Cp869, Cp870, Cp871, Cp874, Cp875, Cp918, Cp921, Cp922, Cp930, Cp933, Cp935, Cp937, Cp939, Cp942, Cp942C, Cp943, Cp943C, Cp948, Cp949, Cp949C, Cp950, Cp964, Cp970, EUC_CN, EUC_JP, EUC_JP_LINUX, EUC_JP_Solaris, EUC_KR, EUC_TW, GB18030, GBK, ISCII91, ISO2022_CN_CNS, ISO2022_CN_GB, ISO2022CN, ISO2022JP, ISO2022KR, ISO8859_1, ISO8859_13, ISO8859_15, ISO8859_2, ISO8859_3, ISO8859_4, ISO8859_5, ISO8859_6, ISO8859_7, ISO8859_8, ISO8859_9, JISAutoDetect, KOI8_R, MacArabic, MacCentralEurope, MacCroatian, MacCyrillic, MacDingbat, MacGreek, MacHebrew, MacIceland, MacRoman, MacRomania, MacSymbol, MacThai, MacTurkish, MacUkraine, MS874, MS932, MS936, MS949, MS950, MS950_HKSCS, PCK, SJIS, TIS620, UnicodeBig, UnicodeBigUnmarked, UnicodeLittle, UnicodeLittleUnmarked, UTF_16, UTF_8, x_iso_8859_11, x_Johab], zoomCoverageChart?: boolean) | CoveragePublisher(adapters?: CoverageAdapter{AntPathReportDetector(path: String) | JacocoReportAdapter(path: String, thresholds?: Threshold(thresholdTarget: String, failUnhealthy?: boolean, unhealthyThreshold?: float, unstableThreshold?: float)[])}[], failNoReports?: boolean, failUnhealthy?: boolean, failUnstable?: boolean, globalThresholds?: Threshold(thresholdTarget: String, failUnhealthy?: boolean, unhealthyThreshold?: float, unstableThreshold?: float)[], sourceFileResolver?: DefaultSourceFileResolver(level: SourceFileResolverLevel[NEVER_STORE, STORE_LAST_BUILD, STORE_ALL_BUILD]), tag?: String) | DryPublisher(canComputeNew?: boolean, canResolveRelativePaths?: boolean, canRunOnFailed?: boolean, defaultEncoding?: String, failedNewAll?: String, failedNewHigh?: String, failedNewLow?: String, failedNewNormal?: String, failedTotalAll?: String, failedTotalHigh?: String, failedTotalLow?: String, failedTotalNormal?: String, healthy?: String, highThreshold?: int, normalThreshold?: int, pattern?: String, shouldDetectModules?: boolean, thresholdLimit?: String, unHealthy?: String, unstableNewAll?: String, unstableNewHigh?: String, unstableNewLow?: String, unstableNewNormal?: String, unstableTotalAll?: String, unstableTotalHigh?: String, unstableTotalLow?: String, unstableTotalNormal?: String, useDeltaValues?: boolean, usePreviousBuildAsReference?: boolean, useStableBuildAsReference?: boolean) | FindBugsPublisher(canComputeNew?: boolean, canResolveRelativePaths?: boolean, canRunOnFailed?: boolean, defaultEncoding?: String, excludePattern?: String, failedNewAll?: String, failedNewHigh?: String, failedNewLow?: String, failedNewNormal?: String, failedTotalAll?: String, failedTotalHigh?: String, failedTotalLow?: String, failedTotalNormal?: String, healthy?: String, includePattern?: String, isRankActivated?: boolean, pattern?: String, shouldDetectModules?: boolean, thresholdLimit?: String, unHealthy?: String, unstableNewAll?: String, unstableNewHigh?: String, unstableNewLow?: String, unstableNewNormal?: String, unstableTotalAll?: String, unstableTotalHigh?: String, unstableTotalLow?: String, unstableTotalNormal?: String, useDeltaValues?: boolean, usePreviousBuildAsReference?: boolean, useStableBuildAsReference?: boolean) | Fingerprinter(targets: String) | IssueFieldUpdateStep(issueSelector?: AbstractIssueSelector{DefaultIssueSelector() | ExplicitIssueSelector(issueKeys: String) | JqlIssueSelector(jql: String) | P4JobIssueSelector() | PerforceJobIssueSelector()}, fieldId?: String, fieldValue?: String) | JUnitResultArchiver(testResults: String, allowEmptyResults?: boolean, healthScaleFactor?: double, keepLongStdio?: boolean, testDataPublishers?: TestDataPublisher{}[]) | JacocoPublisher(buildOverBuild?: boolean, changeBuildStatus?: boolean, classPattern?: String, deltaBranchCoverage?: String, deltaClassCoverage?: String, deltaComplexityCoverage?: String, deltaInstructionCoverage?: String, deltaLineCoverage?: String, deltaMethodCoverage?: String, exclusionPattern?: String, execPattern?: String, inclusionPattern?: String, maximumBranchCoverage?: String, maximumClassCoverage?: String, maximumComplexityCoverage?: String, maximumInstructionCoverage?: String, maximumLineCoverage?: String, maximumMethodCoverage?: String, minimumBranchCoverage?: String, minimumClassCoverage?: String, minimumComplexityCoverage?: String, minimumInstructionCoverage?: String, minimumLineCoverage?: String, minimumMethodCoverage?: String, skipCopyOfSrcFiles?: boolean, sourcePattern?: String) | JavadocArchiver(javadocDir: String, keepAll: boolean) | JiraIssueUpdateBuilder(jqlSearch: String, workflowActionName: String, comment: String) | JiraIssueUpdater(issueSelector: AbstractIssueSelector{DefaultIssueSelector() | ExplicitIssueSelector(issueKeys: String) | JqlIssueSelector(jql: String) | P4JobIssueSelector() | PerforceJobIssueSelector()}, scm: SCM{GitSCM(userRemoteConfigs: UserRemoteConfig(url: String, name: String, refspec: String, credentialsId: String)[], branches: BranchSpec(name: String)[], doGenerateSubmoduleConfigurations: boolean, submoduleCfg: org.kohsuke.stapler.NoStaplerConstructorException: There's no @DataBoundConstructor on any constructor of class hudson.plugins.git.SubmoduleConfig[], browser: GitRepositoryBrowser{AssemblaWeb(repoUrl: String) | BitbucketWeb(repoUrl: String) | CGit(repoUrl: String) | FisheyeGitRepositoryBrowser(repoUrl: String) | GitBlitRepositoryBrowser(repoUrl: String, projectName: String) | GitLab(repoUrl: String, version: String) | GitList(repoUrl: String) | GitWeb(repoUrl: String) | GithubWeb(repoUrl: String) | Gitiles(repoUrl: String) | GitoriousWeb(repoUrl: String) | GogsGit(repoUrl: String) | KilnGit(repoUrl: String) | Phabricator(repoUrl: String, repo: String) | RedmineWeb(repoUrl: String) | RhodeCode(repoUrl: String) | Stash(repoUrl: String) | TFS2013GitRepositoryBrowser(repoUrl: String) | ViewGitWeb(repoUrl: String, projectName: String)}, gitTool: String, extensions: GitSCMExtension{AuthorInChangelog() | BuildChooserSetting(buildChooser: BuildChooser{AncestryBuildChooser(maximumAgeInDays: int, ancestorCommitSha1: String) | DefaultBuildChooser() | InverseBuildChooser()}) | ChangelogToBranch(options: ChangelogToBranchOptions(compareRemote: String, compareTarget: String)) | CheckoutOption(timeout: int) | CleanBeforeCheckout() | CleanCheckout() | CloneOption(shallow: boolean, noTags: boolean, reference: String, timeout: int, depth?: int, honorRefspec?: boolean) | DisableRemotePoll() | GitLFSPull() | IgnoreNotifyCommit() | LocalBranch(localBranch: String) | MessageExclusion(excludedMessage: String) | PathRestriction(includedRegions: String, excludedRegions: String) | PerBuildTag() | PreBuildMerge(options: UserMergeOptions(mergeTarget: String, fastForwardMode?: GitPluginFastForwardMode[FF, FF_ONLY, NO_FF], mergeRemote?: String, mergeStrategy?: Strategy[DEFAULT, RESOLVE, RECURSIVE, OCTOPUS, OURS, SUBTREE, RECURSIVE_THEIRS])) | PruneStaleBranch() | RelativeTargetDirectory(relativeTargetDir: String) | ScmName(name: String) | SparseCheckoutPaths(sparseCheckoutPaths: SparseCheckoutPath(path: String)[]) | SubmoduleOption(disableSubmodules: boolean, recursiveSubmodules: boolean, trackingSubmodules: boolean, reference: String, timeout: int, parentCredentials: boolean) | UserExclusion(excludedUsers: String) | UserIdentity(name: String, email: String) | WipeWorkspace()}[]) | NullSCM() | SubversionSCM(locations: ModuleLocation(remote: String, credentialsId: String, local: String, depthOption: String, ignoreExternalsOption: boolean, cancelProcessOnExternalsFail: boolean)[], workspaceUpdater: WorkspaceUpdater{CheckoutUpdater() | NoopUpdater() | UpdateUpdater() | UpdateWithCleanUpdater() | UpdateWithRevertUpdater()}, browser: SubversionRepositoryBrowser{Assembla(spaceName: String) | CollabNetSVN(url: String) | FishEyeSVN(url: String, rootModule: String) | Phabricator(url: String, repo: String) | SVNWeb(url: String) | Sventon(url: String, repositoryInstance: String) | Sventon2(url: String, repositoryInstance: String) | ViewSVN(url: String) | VisualSVN(url: String) | WebSVN(url: String)}, excludedRegions: String, excludedUsers: String, excludedRevprop: String, excludedCommitMessages: String, includedRegions: String, ignoreDirPropChanges: boolean, filterChangelog: boolean, additionalCredentials: AdditionalCredentials(realm: String, credentialsId: String)[], quietOperation: boolean)}, labels: String[]) | JiraReleaseVersionUpdaterBuilder(jiraProjectKey: String, jiraRelease: String) | JiraVersionCreatorBuilder(jiraVersion: String, jiraProjectKey: String) | Mailer(recipients: String, notifyEveryUnstableBuild: boolean, sendToIndividuals: boolean) | PmdPublisher(canComputeNew?: boolean, canResolveRelativePaths?: boolean, canRunOnFailed?: boolean, defaultEncoding?: String, failedNewAll?: String, failedNewHigh?: String, failedNewLow?: String, failedNewNormal?: String, failedTotalAll?: String, failedTotalHigh?: String, failedTotalLow?: String, failedTotalNormal?: String, healthy?: String, pattern?: String, shouldDetectModules?: boolean, thresholdLimit?: String, unHealthy?: String, unstableNewAll?: String, unstableNewHigh?: String, unstableNewLow?: String, unstableNewNormal?: String, unstableTotalAll?: String, unstableTotalHigh?: String, unstableTotalLow?: String, unstableTotalNormal?: String, useDeltaValues?: boolean, usePreviousBuildAsReference?: boolean, useStableBuildAsReference?: boolean) | TasksPublisher(asRegexp?: boolean, canComputeNew?: boolean, canResolveRelativePaths?: boolean, canRunOnFailed?: boolean, defaultEncoding?: String, excludePattern?: String, failedNewAll?: String, failedNewHigh?: String, failedNewLow?: String, failedNewNormal?: String, failedTotalAll?: String, failedTotalHigh?: String, failedTotalLow?: String, failedTotalNormal?: String, healthy?: String, high?: String, ignoreCase?: boolean, low?: String, normal?: String, pattern?: String, shouldDetectModules?: boolean, thresholdLimit?: String, unHealthy?: String, unstableNewAll?: String, unstableNewHigh?: String, unstableNewLow?: String, unstableNewNormal?: String, unstableTotalAll?: String, unstableTotalHigh?: String, unstableTotalLow?: String, unstableTotalNormal?: String, useDeltaValues?: boolean, usePreviousBuildAsReference?: boolean, useStableBuildAsReference?: boolean) | WarningsPublisher(canComputeNew?: boolean, canResolveRelativePaths?: boolean, canRunOnFailed?: boolean, categoriesPattern?: String, consoleParsers?: ConsoleParser(parserName: String)[], defaultEncoding?: String, excludePattern?: String, failedNewAll?: String, failedNewHigh?: String, failedNewLow?: String, failedNewNormal?: String, failedTotalAll?: String, failedTotalHigh?: String, failedTotalLow?: String, failedTotalNormal?: String, healthy?: String, includePattern?: String, messagesPattern?: String, parserConfigurations?: ParserConfiguration(pattern: String, parserName: String)[], shouldDetectModules?: boolean, thresholdLimit?: String, unHealthy?: String, unstableNewAll?: String, unstableNewHigh?: String, unstableNewLow?: String, unstableNewNormal?: String, unstableTotalAll?: String, unstableTotalHigh?: String, unstableTotalLow?: String, unstableTotalNormal?: String, useDeltaValues?: boolean, usePreviousBuildAsReference?: boolean, useStableBuildAsReference?: boolean)})
      	at org.jenkinsci.plugins.structs.describable.DescribableModel.instantiate(DescribableModel.java:286)
      	at org.jenkinsci.plugins.workflow.steps.StepDescriptor.newInstance(StepDescriptor.java:201)
      	at org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:208)
      	at org.jenkinsci.plugins.workflow.cps.DSL.invokeDescribable(DSL.java:358)
      	at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:156)
      	at org.jenkinsci.plugins.workflow.cps.CpsScript.invokeMethod(CpsScript.java:122)
      	at sun.reflect.GeneratedMethodAccessor339.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
      	at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
      	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1213)
      	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022)
      	at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:42)
      	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
      	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
      	at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:157)
      	at org.kohsuke.groovy.sandbox.GroovyInterceptor.onMethodCall(GroovyInterceptor.java:23)
      	at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onMethodCall(SandboxInterceptor.java:133)
      	at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:155)
      	at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:159)
      	at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:129)
      	at com.cloudbees.groovy.cps.sandbox.SandboxInvoker.methodCall(SandboxInvoker.java:17)
      Caused: java.lang.IllegalArgumentException: Failed to prepare jacoco step
      	at org.jenkinsci.plugins.workflow.cps.DSL.invokeDescribable(DSL.java:360)
      	at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:156)
      	at org.jenkinsci.plugins.workflow.cps.CpsScript.invokeMethod(CpsScript.java:122)
      	at sun.reflect.GeneratedMethodAccessor339.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
      	at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
      	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1213)
      	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022)
      	at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:42)
      	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
      	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
      	at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:157)
      	at org.kohsuke.groovy.sandbox.GroovyInterceptor.onMethodCall(GroovyInterceptor.java:23)
      	at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onMethodCall(SandboxInterceptor.java:133)
      	at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:155)
      	at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:159)
      	at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:129)
      	at com.cloudbees.groovy.cps.sandbox.SandboxInvoker.methodCall(SandboxInvoker.java:17)
      	at WorkflowScript.run(WorkflowScript:9)
      	at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.delegateAndExecute(jar:file:/home/jenkins/data/plugins/pipeline-model-definition/WEB-INF/lib/pipeline-model-definition.jar!/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy:133)
      	at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.executeSingleStage(jar:file:/home/jenkins/data/plugins/pipeline-model-definition/WEB-INF/lib/pipeline-model-definition.jar!/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy:651)
      	at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.catchRequiredContextForNode(jar:file:/home/jenkins/data/plugins/pipeline-model-definition/WEB-INF/lib/pipeline-model-definition.jar!/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy:393)
      	at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.catchRequiredContextForNode(jar:file:/home/jenkins/data/plugins/pipeline-model-definition/WEB-INF/lib/pipeline-model-definition.jar!/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy:391)
      	at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.executeSingleStage(jar:file:/home/jenkins/data/plugins/pipeline-model-definition/WEB-INF/lib/pipeline-model-definition.jar!/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy:650)
      	at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.evaluateStage(jar:file:/home/jenkins/data/plugins/pipeline-model-definition/WEB-INF/lib/pipeline-model-definition.jar!/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy:275)
      	at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.toolsBlock(jar:file:/home/jenkins/data/plugins/pipeline-model-definition/WEB-INF/lib/pipeline-model-definition.jar!/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy:538)
      	at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.toolsBlock(jar:file:/home/jenkins/data/plugins/pipeline-model-definition/WEB-INF/lib/pipeline-model-definition.jar!/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy:537)
      	at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.evaluateStage(jar:file:/home/jenkins/data/plugins/pipeline-model-definition/WEB-INF/lib/pipeline-model-definition.jar!/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy:265)
      	at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.withEnvBlock(jar:file:/home/jenkins/data/plugins/pipeline-model-definition/WEB-INF/lib/pipeline-model-definition.jar!/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy:437)
      	at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.withEnvBlock(jar:file:/home/jenkins/data/plugins/pipeline-model-definition/WEB-INF/lib/pipeline-model-definition.jar!/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy:436)
      	at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.evaluateStage(jar:file:/home/jenkins/data/plugins/pipeline-model-definition/WEB-INF/lib/pipeline-model-definition.jar!/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy:264)
      	at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.withCredentialsBlock(jar:file:/home/jenkins/data/plugins/pipeline-model-definition/WEB-INF/lib/pipeline-model-definition.jar!/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy:475)
      	at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.withCredentialsBlock(jar:file:/home/jenkins/data/plugins/pipeline-model-definition/WEB-INF/lib/pipeline-model-definition.jar!/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy:474)
      	at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.evaluateStage(jar:file:/home/jenkins/data/plugins/pipeline-model-definition/WEB-INF/lib/pipeline-model-definition.jar!/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy:263)
      	at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.evaluateStage(jar:file:/home/jenkins/data/plugins/pipeline-model-definition/WEB-INF/lib/pipeline-model-definition.jar!/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy:295)
      	at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.inDeclarativeAgent(jar:file:/home/jenkins/data/plugins/pipeline-model-definition/WEB-INF/lib/pipeline-model-definition.jar!/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy:576)
      	at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.inDeclarativeAgent(jar:file:/home/jenkins/data/plugins/pipeline-model-definition/WEB-INF/lib/pipeline-model-definition.jar!/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy:575)
      	at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.evaluateStage(jar:file:/home/jenkins/data/plugins/pipeline-model-definition/WEB-INF/lib/pipeline-model-definition.jar!/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy:292)
      	at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.stageInput(jar:file:/home/jenkins/data/plugins/pipeline-model-definition/WEB-INF/lib/pipeline-model-definition.jar!/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy:358)
      	at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.stageInput(jar:file:/home/jenkins/data/plugins/pipeline-model-definition/WEB-INF/lib/pipeline-model-definition.jar!/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy:357)
      	at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.evaluateStage(jar:file:/home/jenkins/data/plugins/pipeline-model-definition/WEB-INF/lib/pipeline-model-definition.jar!/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy:261)
      	at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.inWrappers(jar:file:/home/jenkins/data/plugins/pipeline-model-definition/WEB-INF/lib/pipeline-model-definition.jar!/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy:603)
      	at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.inWrappers(jar:file:/home/jenkins/data/plugins/pipeline-model-definition/WEB-INF/lib/pipeline-model-definition.jar!/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy:602)
      	at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.evaluateStage(jar:file:/home/jenkins/data/plugins/pipeline-model-definition/WEB-INF/lib/pipeline-model-definition.jar!/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy:246)
      	at ___cps.transform___(Native Method)
      	at com.cloudbees.groovy.cps.impl.ContinuationGroup.methodCall(ContinuationGroup.java:57)
      	at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:109)
      	at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.fixArg(FunctionCallBlock.java:82)
      	at sun.reflect.GeneratedMethodAccessor301.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72)
      	at com.cloudbees.groovy.cps.impl.ConstantBlock.eval(ConstantBlock.java:21)
      	at com.cloudbees.groovy.cps.Next.step(Next.java:83)
      	at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:174)
      	at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:163)
      	at org.codehaus.groovy.runtime.GroovyCategorySupport$ThreadCategoryInfo.use(GroovyCategorySupport.java:122)
      	at org.codehaus.groovy.runtime.GroovyCategorySupport.use(GroovyCategorySupport.java:261)
      	at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:163)
      	at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.access$101(SandboxContinuable.java:34)
      	at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.lambda$run0$0(SandboxContinuable.java:59)
      	at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.GroovySandbox.runInSandbox(GroovySandbox.java:108)
      	at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.run0(SandboxContinuable.java:58)
      	at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:174)
      	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:332)
      	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$200(CpsThreadGroup.java:83)
      	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:244)
      	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:232)
      	at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:64)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:131)
      	at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
      	at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:59)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:748)
      Finished: FAILURE
      

      It looks like a name clash between the adapter symbol "jacoco" (coverage-api plugin) and the step symbol "jacoco" (jacoco plugin).

      I would like to use both plugins in the transition phase between the old plugins and the new one,

          [JENKINS-53181] Jacoco adapter does not work if Jacoco plugin is installed too

          Shenyu Zheng added a comment -

          For now, you can use

          publishCoverage adapters: [[$class: 'JacocoReportAdapter', path:'report.xml']]
          

          to avoid confict.

          Shenyu Zheng added a comment - For now, you can use publishCoverage adapters: [[$class: 'JacocoReportAdapter' , path: 'report.xml' ]] to avoid confict.

          Thank you the workaround is working.

          But now I have a different exception:

          [Pipeline] publishCoverage
          Publishing Coverage report....
          [Pipeline] }
          java.io.NotSerializableException: io.jenkins.plugins.coverage.adapter.JacocoReportAdapter
          	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1184)
          	at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548)
          	at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509)
          	at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)
          	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
          	at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548)
          	at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509)
          	at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)
          	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
          	at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348)
          	at hudson.remoting.UserRequest._serialize(UserRequest.java:264)
          	at hudson.remoting.UserRequest.serialize(UserRequest.java:273)
          Caused: java.io.IOException: Unable to serialize io.jenkins.plugins.coverage.CoverageProcessor$FindReportCallable@4aa23aba
          	at hudson.remoting.UserRequest.serialize(UserRequest.java:275)
          	at hudson.remoting.UserRequest.<init>(UserRequest.java:101)
          	at hudson.remoting.Channel.call(Channel.java:953)
          	at hudson.FilePath.act(FilePath.java:1071)
          	at hudson.FilePath.act(FilePath.java:1060)
          	at io.jenkins.plugins.coverage.CoverageProcessor.convertToResults(CoverageProcessor.java:164)
          	at io.jenkins.plugins.coverage.CoverageProcessor.performCoverageReport(CoverageProcessor.java:84)
          	at io.jenkins.plugins.coverage.CoveragePublisher.perform(CoveragePublisher.java:88)
          	at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:80)
          	at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:67)
          	at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1$1.call(SynchronousNonBlockingStepExecution.java:50)
          	at hudson.security.ACL.impersonate(ACL.java:290)
          	at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1.run(SynchronousNonBlockingStepExecution.java:47)
          	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
          	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
          	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
          	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
          	at java.lang.Thread.run(Thread.java:748)
          

          I am running in Master/Slave setup.

          Ramin Baradari added a comment - Thank you the workaround is working. But now I have a different exception: [Pipeline] publishCoverage Publishing Coverage report.... [Pipeline] } java.io.NotSerializableException: io.jenkins.plugins.coverage.adapter.JacocoReportAdapter at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1184) at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548) at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178) at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548) at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348) at hudson.remoting.UserRequest._serialize(UserRequest.java:264) at hudson.remoting.UserRequest.serialize(UserRequest.java:273) Caused: java.io.IOException: Unable to serialize io.jenkins.plugins.coverage.CoverageProcessor$FindReportCallable@4aa23aba at hudson.remoting.UserRequest.serialize(UserRequest.java:275) at hudson.remoting.UserRequest.<init>(UserRequest.java:101) at hudson.remoting.Channel.call(Channel.java:953) at hudson.FilePath.act(FilePath.java:1071) at hudson.FilePath.act(FilePath.java:1060) at io.jenkins.plugins.coverage.CoverageProcessor.convertToResults(CoverageProcessor.java:164) at io.jenkins.plugins.coverage.CoverageProcessor.performCoverageReport(CoverageProcessor.java:84) at io.jenkins.plugins.coverage.CoveragePublisher.perform(CoveragePublisher.java:88) at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:80) at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:67) at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1$1.call(SynchronousNonBlockingStepExecution.java:50) at hudson.security.ACL.impersonate(ACL.java:290) at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1.run(SynchronousNonBlockingStepExecution.java:47) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:748) I am running in Master/Slave setup.

          Shenyu Zheng added a comment -

          rbaradari Fix the NotSerializableException in 1.0.3, you can try it out.

          Shenyu Zheng added a comment - rbaradari Fix the NotSerializableException in 1.0.3, you can try it out.

          Thank you. The workaround is now fully working with version 1.0.3.

          Ramin Baradari added a comment - Thank you. The workaround is now fully working with version 1.0.3.

          Oleg Nenashev added a comment -

          svanoort abayer rsandell dnusbaum olamy jglick

          It looks like an issue in the Pipeline engine. `@Symbol`s are designed to support naming conflicts in different extension points, but here Pipeline CPS get confused by the context. I understand that executing JaCoCo step in the context is technically valid, but it should be possible to determine a correct Symbol to take depending on the context.

          Could you please take a look?

           

          Oleg Nenashev added a comment - svanoort abayer rsandell dnusbaum olamy jglick It looks like an issue in the Pipeline engine. `@Symbol`s are designed to support naming conflicts in different extension points, but here Pipeline CPS get confused by the context. I understand that executing JaCoCo step in the context is technically valid, but it should be possible to determine a correct Symbol to take depending on the context. Could you please take a look?  

          Jesse Glick added a comment -

          Step function names take precedence over UninstantiatedDescribable, so jacoco is not available as a symbol for the adapter I am afraid. The design of symbol usage in the workflow-cps DSL is inherently ambiguous.

          Jesse Glick added a comment - Step function names take precedence over UninstantiatedDescribable , so jacoco is not available as a symbol for the adapter I am afraid. The design of symbol usage in the workflow-cps DSL is inherently ambiguous.

          Oleg Nenashev added a comment -

          We will need the same fix in Cobertura Plugin before it gets released (CC jeffpearce).

          I believe there should be a follow-up bug to Pipeline, because it's just a matter of time till somebody hits it

           

          Oleg Nenashev added a comment - We will need the same fix in Cobertura Plugin before it gets released (CC jeffpearce ). I believe there should be a follow-up bug to Pipeline, because it's just a matter of time till somebody hits it  

          Shenyu Zheng added a comment -

          rbaradari You can use `jacocoAdapter` instead of `jacoco` to avoid name conflicts in version 1.0.4.

          Shenyu Zheng added a comment - rbaradari You can use `jacocoAdapter` instead of `jacoco` to avoid name conflicts in version 1.0.4.

          Jesse Glick added a comment -

          there should be a follow-up bug to Pipeline

          Do not bother—I see no plausible way the current behavior could be changed without a fundamental redesign of Pipeline Groovy syntax.

          Jesse Glick added a comment - there should be a follow-up bug to Pipeline Do not bother—I see no plausible way the current behavior could be changed without a fundamental redesign of Pipeline Groovy syntax.

          The new symbol "jacocoAdapter" is working.
          cizezsy You can close this ticket.

          Ramin Baradari added a comment - The new symbol "jacocoAdapter" is working. cizezsy You can close this ticket.

            cizezsy Shenyu Zheng
            rbaradari Ramin Baradari
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: