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

Deployment failing with the error Not a string

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Blocker Blocker
    • cloudfoundry-plugin
    • None
    • Using the CF deploy plugin to push to CF

      The failure is

      java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String
      at com.hpe.cloudfoundryjenkins.DeploymentInfo.expandTokenMacros(DeploymentInfo.java:304)
      at com.hpe.cloudfoundryjenkins.DeploymentInfo.<init>(DeploymentInfo.java:57)
      at com.hpe.cloudfoundryjenkins.CloudFoundryPushPublisher.perform(CloudFoundryPushPublisher.java:175)
      at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)
      at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:720)
      at hudson.model.Build$BuildExecution.post2(Build.java:185)
      at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:665)
      at hudson.model.Run.execute(Run.java:1754)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      at hudson.model.ResourceController.execute(ResourceController.java:98)
      at hudson.model.Executor.run(Executor.java:404)

      Build step 'Push to Cloud Foundry' marked build as failure

      The Test connection to CF works properly
      I have specified the manifest file as well but it's not working still

      regards,
      karthikeyan

          [JENKINS-41423] Deployment failing with the error Not a string

          Keyan M added a comment -

          Is anyone working on this?
          Can i get some updates on this?

          regards,
          Karthikeyan

          Keyan M added a comment - Is anyone working on this? Can i get some updates on this? regards, Karthikeyan

          I already had this error and I found out it was because I had a environment variable in manifest.yml which value was boolean.
          Changing the value to a string ( "true" ) solved the problem for me.

          Sergio Mendonça added a comment - I already had this error and I found out it was because I had a environment variable in manifest.yml which value was boolean. Changing the value to a string ( "true" ) solved the problem for me.

          Keyan M added a comment -

          Still the same after the change in manifest from true to "true"

          Cloud Foundry Plugin:

          java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String
          at com.hpe.cloudfoundryjenkins.DeploymentInfo.expandTokenMacros(DeploymentInfo.java:304)
          at com.hpe.cloudfoundryjenkins.DeploymentInfo.<init>(DeploymentInfo.java:57)
          at com.hpe.cloudfoundryjenkins.CloudFoundryPushPublisher.perform(CloudFoundryPushPublisher.java:175)
          at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
          at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)
          at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:720)
          at hudson.model.Build$BuildExecution.post2(Build.java:185)
          at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:665)
          at hudson.model.Run.execute(Run.java:1754)
          at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
          at hudson.model.ResourceController.execute(ResourceController.java:98)
          at hudson.model.Executor.run(Executor.java:404)
          Build step 'Push to Cloud Foundry' marked build as failure
          Finished: FAILURE

          Keyan M added a comment - Still the same after the change in manifest from true to "true" Cloud Foundry Plugin: java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String at com.hpe.cloudfoundryjenkins.DeploymentInfo.expandTokenMacros(DeploymentInfo.java:304) at com.hpe.cloudfoundryjenkins.DeploymentInfo.<init>(DeploymentInfo.java:57) at com.hpe.cloudfoundryjenkins.CloudFoundryPushPublisher.perform(CloudFoundryPushPublisher.java:175) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:720) at hudson.model.Build$BuildExecution.post2(Build.java:185) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:665) at hudson.model.Run.execute(Run.java:1754) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:404) Build step 'Push to Cloud Foundry' marked build as failure Finished: FAILURE

          Steven Swor added a comment -

          astrokeyan - Does this still happen with version 2.x of the plugin? The way manifests are handled has been rewritten so this may no longer be an issue.

          Steven Swor added a comment - astrokeyan - Does this still happen with version 2.x of the plugin? The way manifests are handled has been rewritten so this may no longer be an issue.

            williamg William Gautier
            astrokeyan Keyan M
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: