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

Deployment failing with the error Not a string

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Blocker
    • Resolution: Unresolved
    • cloudfoundry-plugin
    • None
    • Using the CF deploy plugin to push to CF

    Description

      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

      Attachments

        Activity

          astrokeyan Keyan M added a comment -

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

          regards,
          Karthikeyan

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

          sergiofm 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.
          astrokeyan 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

          astrokeyan 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
          sworisbreathing 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.

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

          People

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

            Dates

              Created:
              Updated: