java.lang.IllegalArgumentException: array element type mismatch

Google Groups | dcso...@gmail.com (JIRA) | 4 months ago
  1. 0

    [JIRA] (JENKINS-37527) String.join won't accept iterables (vararg vs iterable overload issue?)

    Google Groups | 4 months ago | dcso...@gmail.com (JIRA)
    java.lang.IllegalArgumentException: array element type mismatch
  2. 0

    Pipeline fails if I pass an iterable parameter to {{String.join}}, with an error message suggesting it tried to use the vararg overload. Jenkinsfile: {code} def lst = ['a', 'bc', 'def'] echo "Lst: $lst" // Works def str = String.join('\n', lst.toArray(new String[lst.size()])) echo "Str: $str" // Doesn't work def str2 = String.join('\n', lst) echo "Str2: ${str2}" {code} Console text: {code} Started by user dsobral DatadogBuildListener.java: Started build! DatadogBuildListener.java: Using unix hostname found via `/bin/hostname -f`. Hostname: sfdev-061.richrelevance.com DatadogBuildListener.java: Sending event DatadogBuildListener.java: API call of type 'v1/events' was sent successfully! DatadogBuildListener.java: Payload: {"alert_type":"info","title":"string_join_test build #5 started on sfdev-061.richrelevance.com","text":"%%% \n [Follow build #5 progress](https://jenkins.richrelevance.com/job/string_join_test/5/) \n %%%","date_happened":1471555196,"event_type":"build start","host":"sfdev-061.richrelevance.com","tags":["job:string_join_test"],"aggregation_key":"string_join_test"} [Pipeline] echo Lst: [a, bc, def] [Pipeline] echo Str: a bc def [Pipeline] End of Pipeline [BFA] Scanning build for known causes... [BFA] No failure causes found [BFA] Done. 0s DatadogBuildListener.java: Completed build! DatadogBuildListener.java: Using unix hostname found via `/bin/hostname -f`. Hostname: sfdev-061.richrelevance.com DatadogBuildListener.java: Sending event DatadogBuildListener.java: API call of type 'v1/events' was sent successfully! DatadogBuildListener.java: Payload: {"source_type_name":"jenkins","alert_type":"failure","title":"string_join_test build #5 failed on sfdev-061.richrelevance.com","text":"%%% \n [See results for build #5](https://jenkins.richrelevance.com/job/string_join_test/5/) (0.0 secs) \n %%%","date_happened":1471555196,"event_type":"build result","host":"sfdev-061.richrelevance.com","result":"FAILURE","tags":["job:string_join_test","result:FAILURE"],"aggregation_key":"string_join_test"} DatadogBuildListener.java: Sending metric 'jenkins.job.duration' with value 0.0 DatadogBuildListener.java: API call of type 'v1/series' was sent successfully! DatadogBuildListener.java: Payload: {"series":[{"metric":"jenkins.job.duration","points":[[1471555199,0]],"type":"gauge","host":"sfdev-061.richrelevance.com","tags":["job:string_join_test","result:FAILURE"]}]} DatadogBuildListener.java: Sending service check 'jenkins.job.status' with status 2 DatadogBuildListener.java: API call of type 'v1/check_run' was sent successfully! DatadogBuildListener.java: Payload: {"check":"jenkins.job.status","host_name":"sfdev-061.richrelevance.com","timestamp":1471555199,"status":2,"tags":["job:string_join_test","result:FAILURE"]} java.lang.IllegalArgumentException: array element type mismatch at java.lang.reflect.Array.set(Native Method) at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.GroovyCallSiteSelector.parametersForVarargs(GroovyCallSiteSelector.java:102) at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.GroovyCallSiteSelector.matches(GroovyCallSiteSelector.java:49) at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.GroovyCallSiteSelector.findMatchingMethod(GroovyCallSiteSelector.java:177) at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.GroovyCallSiteSelector.staticMethod(GroovyCallSiteSelector.java:171) at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onStaticCall(SandboxInterceptor.java:135) at org.kohsuke.groovy.sandbox.impl.Checker$2.call(Checker.java:180) at org.kohsuke.groovy.sandbox.impl.Checker.checkedStaticCall(Checker.java:177) at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:91) at com.cloudbees.groovy.cps.sandbox.SandboxInvoker.methodCall(SandboxInvoker.java:16) at WorkflowScript.run(WorkflowScript:9) at ___cps.transform___(Native Method) at com.cloudbees.groovy.cps.impl.ContinuationGroup.methodCall(ContinuationGroup.java:48) 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.GeneratedMethodAccessor852.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72) at com.cloudbees.groovy.cps.impl.LocalVariableBlock$LocalVariable.get(LocalVariableBlock.java:33) at com.cloudbees.groovy.cps.LValueBlock$GetAdapter.receive(LValueBlock.java:30) at com.cloudbees.groovy.cps.impl.LocalVariableBlock.evalLValue(LocalVariableBlock.java:22) at com.cloudbees.groovy.cps.LValueBlock$BlockImpl.eval(LValueBlock.java:55) at com.cloudbees.groovy.cps.LValueBlock.eval(LValueBlock.java:16) at com.cloudbees.groovy.cps.Next.step(Next.java:58) at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:154) at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.access$001(SandboxContinuable.java:18) at org.jenkinsci.plugins.workflow.cps.SandboxContinuable$1.call(SandboxContinuable.java:33) at org.jenkinsci.plugins.workflow.cps.SandboxContinuable$1.call(SandboxContinuable.java:30) at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.GroovySandbox.runInSandbox(GroovySandbox.java:108) at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.run0(SandboxContinuable.java:30) at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:164) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:360) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$100(CpsThreadGroup.java:80) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:236) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:226) at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:47) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:112) at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28) 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:745) Finished: FAILURE {code}

    Jenkins JIRA | 4 months ago | Daniel Sobral
    java.lang.IllegalArgumentException: array element type mismatch
  3. 0

    [Data-API] Server crash after client joined

    GitHub | 2 years ago | olee
    java.lang.IllegalArgumentException: array element type mismatch
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Deserialization of SomeIFace[] with Enum as impl of SomeIFace fails

    GitHub | 3 years ago | ghost
    java.lang.IllegalArgumentException: array element type mismatch

    2 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.IllegalArgumentException

      array element type mismatch

      at java.lang.reflect.Array.set()
    2. Java RT
      Array.set
      1. java.lang.reflect.Array.set(Native Method)
      1 frame
    3. org.jenkinsci.plugins
      SandboxInterceptor.onStaticCall
      1. org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.GroovyCallSiteSelector.parametersForVarargs(GroovyCallSiteSelector.java:102)
      2. org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.GroovyCallSiteSelector.matches(GroovyCallSiteSelector.java:49)
      3. org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.GroovyCallSiteSelector.findMatchingMethod(GroovyCallSiteSelector.java:177)
      4. org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.GroovyCallSiteSelector.staticMethod(GroovyCallSiteSelector.java:171)
      5. org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onStaticCall(SandboxInterceptor.java:135)
      5 frames
    4. org.kohsuke.groovy
      Checker.checkedCall
      1. org.kohsuke.groovy.sandbox.impl.Checker$2.call(Checker.java:180)
      2. org.kohsuke.groovy.sandbox.impl.Checker.checkedStaticCall(Checker.java:177)
      3. org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:91)
      3 frames
    5. com.cloudbees.groovy
      SandboxInvoker.methodCall
      1. com.cloudbees.groovy.cps.sandbox.SandboxInvoker.methodCall(SandboxInvoker.java:16)
      1 frame
    6. Unknown
      ___cps.transform___
      1. WorkflowScript.run(WorkflowScript:9)
      2. ___cps.transform___(Native Method)
      2 frames
    7. com.cloudbees.groovy
      FunctionCallBlock$ContinuationImpl.fixArg
      1. com.cloudbees.groovy.cps.impl.ContinuationGroup.methodCall(ContinuationGroup.java:48)
      2. com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:109)
      3. com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.fixArg(FunctionCallBlock.java:82)
      3 frames
    8. Java RT
      Method.invoke
      1. sun.reflect.GeneratedMethodAccessor852.invoke(Unknown Source)
      2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      3. java.lang.reflect.Method.invoke(Method.java:497)
      3 frames
    9. com.cloudbees.groovy
      Continuable.run0
      1. com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72)
      2. com.cloudbees.groovy.cps.impl.LocalVariableBlock$LocalVariable.get(LocalVariableBlock.java:33)
      3. com.cloudbees.groovy.cps.LValueBlock$GetAdapter.receive(LValueBlock.java:30)
      4. com.cloudbees.groovy.cps.impl.LocalVariableBlock.evalLValue(LocalVariableBlock.java:22)
      5. com.cloudbees.groovy.cps.LValueBlock$BlockImpl.eval(LValueBlock.java:55)
      6. com.cloudbees.groovy.cps.LValueBlock.eval(LValueBlock.java:16)
      7. com.cloudbees.groovy.cps.Next.step(Next.java:58)
      8. com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:154)
      8 frames
    10. org.jenkinsci.plugins
      CpsVmExecutorService$2.call
      1. org.jenkinsci.plugins.workflow.cps.SandboxContinuable.access$001(SandboxContinuable.java:18)
      2. org.jenkinsci.plugins.workflow.cps.SandboxContinuable$1.call(SandboxContinuable.java:33)
      3. org.jenkinsci.plugins.workflow.cps.SandboxContinuable$1.call(SandboxContinuable.java:30)
      4. org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.GroovySandbox.runInSandbox(GroovySandbox.java:108)
      5. org.jenkinsci.plugins.workflow.cps.SandboxContinuable.run0(SandboxContinuable.java:30)
      6. org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:164)
      7. org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:360)
      8. org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$100(CpsThreadGroup.java:80)
      9. org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:236)
      10. org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:226)
      11. org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:47)
      11 frames
    11. Java RT
      FutureTask.run
      1. java.util.concurrent.FutureTask.run(FutureTask.java:266)
      1 frame
    12. Hudson :: Remoting Layer
      SingleLaneExecutorService$1.run
      1. hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:112)
      1 frame
    13. jenkins.util
      ContextResettingExecutorService$1.run
      1. jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
      1 frame
    14. Java RT
      ThreadPoolExecutor$Worker.run
      1. java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      2. java.util.concurrent.FutureTask.run(FutureTask.java:266)
      3. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      4. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      4 frames