java.lang.ClassCastException: org.codehaus.groovy.runtime.GStringImpl cannot be cast to java.lang.String

Google Groups | frederi...@gmail.com (JIRA) | 6 months ago
  1. 0

    [JIRA] (JENKINS-27916) GString not flattened to String by DSL inside a map

    Google Groups | 6 months ago | frederi...@gmail.com (JIRA)
    java.lang.ClassCastException: org.codehaus.groovy.runtime.GStringImpl cannot be cast to java.lang.String
  2. 0

    GitHub comment 126#261700416

    GitHub | 3 weeks ago | scaytrase
    java.lang.ClassCastException: org.jenkinsci.plugins.workflow.job.WorkflowRun cannot be cast to hudson.model.AbstractBuild
  3. 0

    GStringImpl cannot be cast to java.lang.String

    Stack Overflow | 2 years ago
    java.lang.ClassCastException: org.codehaus.groovy.runtime.GStringImpl cannot be cast to java.lang.String Error |
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    When i try to iterate a map that contains GStrings i get a {noformat} java.lang.ClassCastException: org.codehaus.groovy.runtime.GStringImpl cannot be cast to java.lang.String at experiments.inputdata.GStringCastTest.testCast(GStringCastTest.java:24) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197) {noformat} Here is the code snippet: {code} ConfigSlurper slurper = new ConfigSlurper(); String script = "example {\n" + " one = \"one\"\n" + " two = \"${one} + ${one}\"\n" + " three = \"${two} + ${one}\"\n" + "}"; ConfigObject config = slurper.parse(script); Map<String, String> e = (Map<String, String>) config.get("example"); for (String k : e.keySet()) { String v = e.get(k); System.out.println(v); } {code} See attached JUnit test case.

    Apache's JIRA Issue Tracker | 6 years ago | David Gomez
    java.lang.ClassCastException: org.codehaus.groovy.runtime.GStringImpl cannot be cast to java.lang.String
  6. 0

    [GROOVY-4777] GString cannot be cast to java.lang.String while iterating a collection from java - ASF JIRA

    apache.org | 11 months ago
    java.lang.ClassCastException: org.codehaus.groovy.runtime.GStringImpl cannot be cast to java.lang.String

    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.ClassCastException

      org.codehaus.groovy.runtime.GStringImpl cannot be cast to java.lang.String

      at org.jenkinsci.plugins.workflow.steps.ArtifactUnarchiverStepExecution.run()
    2. org.jenkinsci.plugins
      AbstractSynchronousNonBlockingStepExecution$1$1.call
      1. org.jenkinsci.plugins.workflow.steps.ArtifactUnarchiverStepExecution.run(ArtifactUnarchiverStepExecution.java:44)
      2. org.jenkinsci.plugins.workflow.steps.ArtifactUnarchiverStepExecution.run(ArtifactUnarchiverStepExecution.java:20)
      3. org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:49)
      3 frames
    3. Hudson
      ACL.impersonate
      1. hudson.security.ACL.impersonate(ACL.java:213)
      1 frame
    4. org.jenkinsci.plugins
      AbstractSynchronousNonBlockingStepExecution$1.run
      1. org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:47)
      1 frame
    5. 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