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

Cannot create pipelineView with job-dsl 1.53

    Details

    • Similar Issues:

      Description

      When I try to create a PipelineView using job-dsl 1.53 I get the following error:

      com.thoughtworks.xstream.mapper.CannotResolveClassException: au.com.centrumsystems.hudson.plugin.buildpipeline.BuildPipelineView
        at com.thoughtworks.xstream.mapper.DefaultMapper.realClass(DefaultMapper.java:79)
        at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
        at com.thoughtworks.xstream.mapper.DynamicProxyMapper.realClass(DynamicProxyMapper.java:55)
        at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
        at com.thoughtworks.xstream.mapper.PackageAliasingMapper.realClass(PackageAliasingMapper.java:88)
        at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
        at com.thoughtworks.xstream.mapper.ClassAliasingMapper.realClass(ClassAliasingMapper.java:79)
        at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
        at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
        at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
        at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
        at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
        at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
        at com.thoughtworks.xstream.mapper.ArrayMapper.realClass(ArrayMapper.java:74)
        at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
        at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
        at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
        at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
        at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
        at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
        at com.thoughtworks.xstream.mapper.SecurityMapper.realClass(SecurityMapper.java:71)
        at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
        at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
        at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
        at hudson.util.XStream2$CompatibilityMapper.realClass(XStream2.java:282)
        at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
        at hudson.util.xstream.MapperDelegate.realClass(MapperDelegate.java:43)
        at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
        at com.thoughtworks.xstream.mapper.CachingMapper.realClass(CachingMapper.java:48)
        at javaposse.jobdsl.plugin.JenkinsJobManagement.checkItemType(JenkinsJobManagement.java:536)
        at javaposse.jobdsl.plugin.JenkinsJobManagement.createOrUpdateView(JenkinsJobManagement.java:182)
        at javaposse.jobdsl.dsl.JobManagement$createOrUpdateView$5.call(Unknown Source)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:141)
        at javaposse.jobdsl.plugin.InterruptibleJobManagement.createOrUpdateView(InterruptibleJobManagement.groovy:43)
        at javaposse.jobdsl.dsl.JobManagement$createOrUpdateView$5.call(Unknown Source)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:141)
        at javaposse.jobdsl.dsl.DslScriptLoader$_extractGeneratedViews_closure5.doCall(DslScriptLoader.groovy:204)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        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 org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1024)
        at groovy.lang.Closure.call(Closure.java:414)
        at groovy.lang.Closure.call(Closure.java:430)
        at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2030)
        at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2015)
        at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2068)
        at org.codehaus.groovy.runtime.dgm$164.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:125)
        at javaposse.jobdsl.dsl.DslScriptLoader.extractGeneratedViews(DslScriptLoader.groovy:201)
        at javaposse.jobdsl.dsl.DslScriptLoader.this$2$extractGeneratedViews(DslScriptLoader.groovy)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        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 org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:384)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1024)
        at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:69)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:174)
        at javaposse.jobdsl.dsl.DslScriptLoader$_runScriptsWithClassLoader_closure1.doCall(DslScriptLoader.groovy:87)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        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 org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1024)
        at groovy.lang.Closure.call(Closure.java:414)
        at groovy.lang.Closure.call(Closure.java:430)
        at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2030)
        at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2015)
        at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2068)
        at org.codehaus.groovy.runtime.dgm$164.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:125)
        at javaposse.jobdsl.dsl.DslScriptLoader.runScriptsWithClassLoader(DslScriptLoader.groovy:68)
        at javaposse.jobdsl.dsl.DslScriptLoader.this$2$runScriptsWithClassLoader(DslScriptLoader.groovy)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        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:182)
        at javaposse.jobdsl.dsl.DslScriptLoader.runScripts(DslScriptLoader.groovy:44)
        at javaposse.jobdsl.plugin.ExecuteDslScripts.perform(ExecuteDslScripts.java:352)
        at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78)
        at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
        at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)
        at hudson.model.Build$BuildExecution.build(Build.java:205)
        at hudson.model.Build$BuildExecution.doRun(Build.java:162)
        at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
        at hudson.model.Run.execute(Run.java:1720)
        at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
        at hudson.model.ResourceController.execute(ResourceController.java:98)
        at hudson.model.Executor.run(Executor.java:404)
      ERROR: au.com.centrumsystems.hudson.plugin.buildpipeline.BuildPipelineView
      

      The job dsl I use is the following:

      buildPipelineView('view') {
          title('Project A CI Pipeline')
          selectedJob('jenkinstest')
          alwaysAllowManualTrigger()
          displayedBuilds(1)
      }
      

        Attachments

          Activity

          scrat Etienne Duclos created issue -
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Daniel Spilker
          Path:
          docs/Home.md
          job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/DslFactory.groovy
          job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/ViewFactory.groovy
          job-dsl-core/src/test/groovy/javaposse/jobdsl/dsl/JobParentSpec.groovy
          job-dsl-core/src/test/groovy/javaposse/jobdsl/dsl/PluginASTTransformationSpec.groovy
          job-dsl-core/src/test/groovy/javaposse/jobdsl/dsl/views/NestedViewSpec.groovy
          http://jenkins-ci.org/commit/job-dsl-plugin/c2f0f09fb13b1bb6cc36c9a24841a573acb7daf6
          Log:
          improved error message when a plugin is missing

          [FIXES JENKINS-40601]

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Daniel Spilker Path: docs/Home.md job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/DslFactory.groovy job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/ViewFactory.groovy job-dsl-core/src/test/groovy/javaposse/jobdsl/dsl/JobParentSpec.groovy job-dsl-core/src/test/groovy/javaposse/jobdsl/dsl/PluginASTTransformationSpec.groovy job-dsl-core/src/test/groovy/javaposse/jobdsl/dsl/views/NestedViewSpec.groovy http://jenkins-ci.org/commit/job-dsl-plugin/c2f0f09fb13b1bb6cc36c9a24841a573acb7daf6 Log: improved error message when a plugin is missing [FIXES JENKINS-40601]
          scm_issue_link SCM/JIRA link daemon made changes -
          Field Original Value New Value
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Daniel Spilker
          Path:
          docs/Home.md
          job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/DslFactory.groovy
          job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/ViewFactory.groovy
          job-dsl-core/src/test/groovy/javaposse/jobdsl/dsl/JobParentSpec.groovy
          job-dsl-core/src/test/groovy/javaposse/jobdsl/dsl/PluginASTTransformationSpec.groovy
          job-dsl-core/src/test/groovy/javaposse/jobdsl/dsl/views/NestedViewSpec.groovy
          http://jenkins-ci.org/commit/job-dsl-plugin/86131780161cd884fcd762f9fdcec45ce4eef060
          Log:
          Merge pull request #974 from daspilker/JENKINS-40601

          JENKINS-40601 improved error message when a plugin is missing

          Compare: https://github.com/jenkinsci/job-dsl-plugin/compare/b5a7a3e5f64c...86131780161c

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Daniel Spilker Path: docs/Home.md job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/DslFactory.groovy job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/ViewFactory.groovy job-dsl-core/src/test/groovy/javaposse/jobdsl/dsl/JobParentSpec.groovy job-dsl-core/src/test/groovy/javaposse/jobdsl/dsl/PluginASTTransformationSpec.groovy job-dsl-core/src/test/groovy/javaposse/jobdsl/dsl/views/NestedViewSpec.groovy http://jenkins-ci.org/commit/job-dsl-plugin/86131780161cd884fcd762f9fdcec45ce4eef060 Log: Merge pull request #974 from daspilker/ JENKINS-40601 JENKINS-40601 improved error message when a plugin is missing Compare: https://github.com/jenkinsci/job-dsl-plugin/compare/b5a7a3e5f64c...86131780161c
          Hide
          daspilker Daniel Spilker added a comment -

          You need to install the Build Pipeline plugin. The line above the stack trace in the log should something like this:

          Warning: (script, line 1) plugin 'build-pipeline-plugin' needs to be installed
          

          The next release will improve the output.

          Show
          daspilker Daniel Spilker added a comment - You need to install the Build Pipeline plugin. The line above the stack trace in the log should something like this: Warning: (script, line 1) plugin 'build-pipeline-plugin' needs to be installed The next release will improve the output.
          daspilker Daniel Spilker made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

            • Assignee:
              daspilker Daniel Spilker
              Reporter:
              scrat Etienne Duclos
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: