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

Lot of java.lang.ClassCastException when not using pipeline

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • pipeline-github-plugin

      I 'm using the issueCommentTrigger in my Multibranch pipeline. Works as expected for me. But I'm observing quite a few exceptions in Jenkins log. These exceptions seems to have occurred when no pipeline was running and there was no trigger from Github. I do not have cron trigger on the pipeline, not sure why the pipeline was trying to trigger at this time and gave the following errors:

      Sep 10, 2024 4:35:21 AM SEVERE org.jenkinsci.plugins.workflow.job.properties.PipelineTriggersJobProperty startTriggersCan't start trigger.java.lang.ClassCastException: class jenkins.scm.impl.NullSCMSource cannot be cast to class org.jenkinsci.plugins.github_branch_source.GitHubSCMSource (jenkins.scm.impl.NullSCMSource is in unnamed module of loader 'PluginClassLoader for scm-api' @499e3f5b; org.jenkinsci.plugins.github_branch_source.GitHubSCMSource is in unnamed module of loader 'PluginClassLoader for github-branch-source' @7440b905)    at PluginClassLoader for pipeline-github//org.jenkinsci.plugins.pipeline.github.trigger.IssueCommentTrigger.getKey(IssueCommentTrigger.java:65)    at PluginClassLoader for pipeline-github//org.jenkinsci.plugins.pipeline.github.trigger.IssueCommentTrigger.start(IssueCommentTrigger.java:50)    at PluginClassLoader for pipeline-github//org.jenkinsci.plugins.pipeline.github.trigger.IssueCommentTrigger.start(IssueCommentTrigger.java:34)    at PluginClassLoader for workflow-job//org.jenkinsci.plugins.workflow.job.properties.PipelineTriggersJobProperty.startTriggers(PipelineTriggersJobProperty.java:113)    at PluginClassLoader for workflow-job//org.jenkinsci.plugins.workflow.job.WorkflowJob.onLoad(WorkflowJob.java:151)    at PluginClassLoader for cloudbees-folder//com.cloudbees.hudson.plugins.folder.AbstractFolder.loadChildren(AbstractFolder.java:381)    at PluginClassLoader for cloudbees-folder//com.cloudbees.hudson.plugins.folder.AbstractFolder.onLoad(AbstractFolder.java:472)    at PluginClassLoader for cloudbees-folder//com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.onLoad(ComputedFolder.java:211)    at PluginClassLoader for branch-api//jenkins.branch.MultiBranchProject.onLoad(MultiBranchProject.java:185)    at PluginClassLoader for workflow-multibranch//org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject.onLoad(WorkflowMultiBranchProject.java:85)    at PluginClassLoader for cloudbees-folder//com.cloudbees.hudson.plugins.folder.AbstractFolder.loadChildren(AbstractFolder.java:381)    at PluginClassLoader for cloudbees-folder//com.cloudbees.hudson.plugins.folder.AbstractFolder.onLoad(AbstractFolder.java:472)    at PluginClassLoader for cloudbees-folder//com.cloudbees.hudson.plugins.folder.Folder.onLoad(Folder.java:113)    at hudson.model.AbstractItem$1.call(AbstractItem.java:845)    at hudson.model.AbstractItem$1.call(AbstractItem.java:843)    at hudson.model.Items.whileUpdatingByXml(Items.java:132)    at hudson.model.AbstractItem.updateByXml(AbstractItem.java:843)    at PluginClassLoader for job-dsl//javaposse.jobdsl.plugin.JenkinsJobManagement.updateExistingItem(JenkinsJobManagement.java:479)    at PluginClassLoader for job-dsl//javaposse.jobdsl.plugin.JenkinsJobManagement.createOrUpdateConfig(JenkinsJobManagement.java:169)    at javaposse.jobdsl.dsl.JobManagement$createOrUpdateConfig$2.call(Unknown Source)    at PluginClassLoader for job-dsl//javaposse.jobdsl.plugin.InterruptibleJobManagement.createOrUpdateConfig(InterruptibleJobManagement.groovy:35)    at javaposse.jobdsl.dsl.JobManagement$createOrUpdateConfig$2.call(Unknown Source)    at PluginClassLoader for job-dsl//javaposse.jobdsl.dsl.AbstractDslScriptLoader$_extractGeneratedJobs_closure4.doCall(AbstractDslScriptLoader.groovy:204)    at jdk.internal.reflect.GeneratedMethodAccessor722.invoke(Unknown Source)    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)    at java.base/java.lang.reflect.Method.invoke(Method.java:568)    at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:98)    at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)    at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:264)    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1034)    at groovy.lang.Closure.call(Closure.java:420)    at groovy.lang.Closure.call(Closure.java:436)    at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2125)    at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2110)    at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2151)    at org.codehaus.groovy.runtime.dgm$163.invoke(Unknown Source)    at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:274)    at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:56)    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:128)    at PluginClassLoader for job-dsl//javaposse.jobdsl.dsl.AbstractDslScriptLoader.extractGeneratedJobs(AbstractDslScriptLoader.groovy:197)    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)    at java.base/java.lang.reflect.Method.invoke(Method.java:568)    at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:210)    at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:59)    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:177)    at PluginClassLoader for job-dsl//javaposse.jobdsl.dsl.AbstractDslScriptLoader.extractGeneratedItems(AbstractDslScriptLoader.groovy:184)    at PluginClassLoader for job-dsl//javaposse.jobdsl.plugin.JenkinsDslScriptLoader.extractGeneratedItems(JenkinsDslScriptLoader.java:23)    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)    at java.base/java.lang.reflect.Method.invoke(Method.java:568)    at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:98)    at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)    at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:352)    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1034)    at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:68)    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:185)    at PluginClassLoader for job-dsl//javaposse.jobdsl.dsl.AbstractDslScriptLoader$_runScripts_closure1.doCall(AbstractDslScriptLoader.groovy:63)    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)    at java.base/java.lang.reflect.Method.invoke(Method.java:568)    at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:98)    at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)    at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:264)    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1034)    at groovy.lang.Closure.call(Closure.java:420)    at groovy.lang.Closure.call(Closure.java:436)    at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2125)    at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2110)    at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2163)    at org.codehaus.groovy.runtime.dgm$165.invoke(Unknown Source)    at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:274)    at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:56)    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:128)    at PluginClassLoader for job-dsl//javaposse.jobdsl.dsl.AbstractDslScriptLoader.runScripts(AbstractDslScriptLoader.groovy:46)    at PluginClassLoader for job-dsl//javaposse.jobdsl.plugin.ExecuteDslScripts.perform(ExecuteDslScripts.java:363)    at jenkins.tasks.SimpleBuildStep.perform(SimpleBuildStep.java:123)    at PluginClassLoader for workflow-basic-steps//org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:101)    at PluginClassLoader for workflow-basic-steps//org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:71)    at PluginClassLoader for workflow-step-api//org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)    at java.base/java.lang.Thread.run(Thread.java:833) 

            aaronjwhiteside Aaron Whiteside
            pb810 Preetam
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: