JobDSL doesn't work past 2.238

129 views
Skip to first unread message

kru...@gmail.com

unread,
Sep 14, 2020, 5:35:05 PM9/14/20
to job-dsl-plugin
listView / dashboardView don't work past 2.238
- Upgrading to 2.238 removes any views created with JobDSL.

Running a DSL script results in: ERROR: java.io.IOException: Unable to read

kru...@gmail.com

unread,
Sep 14, 2020, 5:43:03 PM9/14/20
to job-dsl-plugin
The error might be unrelated to JobDSL (i'm still looking into it) but the two views don't work anymore.

kru...@gmail.com

unread,
Sep 14, 2020, 5:58:19 PM9/14/20
to job-dsl-plugin
I dug through the logs, and it does appear to be JobDSl causing the issue:

          <error class="hudson.AbortException">
            <detailMessage>java.io.IOException: Unable to read</detailMessage>
            <stackTrace>
              <trace>javaposse.jobdsl.plugin.ExecuteDslScripts.perform(ExecuteDslScripts.java:374)</trace>
              <trace>org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:80)</trace>
              <trace>org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:67)</trace>
              <trace>org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)</trace>
              <trace>java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)</trace>
              <trace>java.util.concurrent.FutureTask.run(Unknown Source)</trace>
              <trace>java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)</trace>
              <trace>java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)</trace>
              <trace>java.lang.Thread.run(Unknown Source)</trace>
            </stackTrace>
            <suppressedExceptions class="java.util.Collections$UnmodifiableRandomAccessList" resolves-to="java.util.Collections$UnmodifiableList">
              <c class="list"/>
              <list reference="../c"/>
            </suppressedExceptions>
          </error>

kru...@gmail.com

unread,
Sep 14, 2020, 6:06:12 PM9/14/20
to job-dsl-plugin
I think it's related to the views not working based on the full error:

Sep 14, 2020 3:03:03 PM FINE javaposse.jobdsl.plugin.ExecuteDslScripts
Exception while processing DSL scripts: java.io.IOException: Unable to read
java.lang.UnsupportedOperationException
at java.util.AbstractList.add(Unknown Source)
at hudson.model.ListView.readResolve(ListView.java:153)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.thoughtworks.xstream.converters.reflection.SerializationMethodInvoker.callReadResolve(SerializationMethodInvoker.java:66)
Caused: com.thoughtworks.xstream.converters.reflection.ObjectAccessException: Could not call hudson.plugins.view.dashboard.Dashboard.readResolve() : null
at com.thoughtworks.xstream.converters.reflection.SerializationMethodInvoker.callReadResolve(SerializationMethodInvoker.java:72)
at hudson.util.RobustReflectionConverter.unmarshal(RobustReflectionConverter.java:270)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
Caused: com.thoughtworks.xstream.converters.ConversionException: Could not call hudson.plugins.view.dashboard.Dashboard.readResolve() : null : Could not call hudson.plugins.view.dashboard.Dashboard.readResolve() : null
---- Debugging information ----
message             : Could not call hudson.plugins.view.dashboard.Dashboard.readResolve() : null
cause-exception     : com.thoughtworks.xstream.converters.reflection.ObjectAccessException
cause-message       : Could not call hudson.plugins.view.dashboard.Dashboard.readResolve() : null
class               : hudson.plugins.view.dashboard.Dashboard
required-type       : hudson.plugins.view.dashboard.Dashboard
converter-type      : hudson.util.RobustReflectionConverter
path                : /hudson.plugins.view.dashboard.Dashboard
line number         : 36
version             : not available
-------------------------------
at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:79)
at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:65)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:50)
at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:134)
at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:32)
at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1189)
at hudson.util.XStream2.unmarshal(XStream2.java:161)
at hudson.util.XStream2.unmarshal(XStream2.java:132)
at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1173)
at com.thoughtworks.xstream.XStream.fromXML(XStream.java:1053)
at hudson.model.View.createViewFromXML(View.java:1395)
Caused: java.io.IOException: Unable to read
at hudson.model.View.createViewFromXML(View.java:1400)
at javaposse.jobdsl.plugin.JenkinsJobManagement.createOrUpdateView(JenkinsJobManagement.java:183)
Caused: javaposse.jobdsl.dsl.DslException
at javaposse.jobdsl.plugin.JenkinsJobManagement.createOrUpdateView(JenkinsJobManagement.java:197)
at javaposse.jobdsl.dsl.JobManagement$createOrUpdateView$7.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:41)
at javaposse.jobdsl.dsl.JobManagement$createOrUpdateView$7.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.AbstractDslScriptLoader$_extractGeneratedViews_closure5.doCall(AbstractDslScriptLoader.groovy:216)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
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:1022)
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:2040)
at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2025)
at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2078)
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.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:125)
at javaposse.jobdsl.dsl.AbstractDslScriptLoader.extractGeneratedViews(AbstractDslScriptLoader.groovy:213)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
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.CallSiteArray.defaultCallCurrent(CallSiteArray.java:52)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:154)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:174)
at javaposse.jobdsl.dsl.AbstractDslScriptLoader.extractGeneratedItems(AbstractDslScriptLoader.groovy:187)
at javaposse.jobdsl.plugin.JenkinsDslScriptLoader.extractGeneratedItems(JenkinsDslScriptLoader.java:22)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
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:1022)
at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:69)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:52)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:154)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:182)
at javaposse.jobdsl.dsl.AbstractDslScriptLoader$_runScripts_closure1.doCall(AbstractDslScriptLoader.groovy:63)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
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:1022)
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:2040)
at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2025)
at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2066)
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.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:125)
at javaposse.jobdsl.dsl.AbstractDslScriptLoader.runScripts(AbstractDslScriptLoader.groovy:46)
at javaposse.jobdsl.plugin.SecureDslScriptLoader.super$2$runScripts(SecureDslScriptLoader.groovy)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
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 org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:132)
at javaposse.jobdsl.plugin.SecureDslScriptLoader.runScripts(SecureDslScriptLoader.groovy:14)
at javaposse.jobdsl.plugin.ExecuteDslScripts.perform(ExecuteDslScripts.java:351)
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.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

kru...@gmail.com

unread,
Sep 14, 2020, 6:11:55 PM9/14/20
to job-dsl-plugin
Removing both of my DSL script sections that add listview/dashboardviews gets rid of the error.

These are the methods I'm using to create those views:

def makeFilteredListView(viewName, viewDescription, regexFilter) {
  listView(viewName) {
    description(viewDescription)

    statusFilter(StatusFilter.ENABLED)

    jobs {
      regex(regexFilter)
    }

    columns {
      status()
      weather()
      name()
      lastSuccess()
      lastFailure()
      lastDuration()
      buildButton()
    }
  }
}

def makeDashboardView(viewName, viewDescription, regexFilter) {
  dashboardView(viewName) {
    description(viewDescription)

    statusFilter(StatusFilter.ENABLED)

    jobs {
      regex(regexFilter)
    }

    columns {
      status()
      weather()
      name()
      lastSuccess()
      lastFailure()
      lastDuration()
      buildButton()
    }

    topPortlets {
      latestBuilds {
        name("Latest Builds")
        numBuilds(20)
      }
    }
    leftPortlets { }
    rightPortlets { }
    bottomPortlets { }
  }
}

Reply all
Reply to author
Forward
0 new messages