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

java.lang.UnsupportedOperationException: no known implementation of class java.lang.String is named Target

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • influxdb-plugin
    • None
    • 3.2.1

      I get the following exceptions in the Jenkins log after 2.X upgrade, I have already changed target to selectedTarget in groovy but still getting the following:

       

      java.lang.UnsupportedOperationException: no known implementation of class java.lang.String is named Targetjava.lang.UnsupportedOperationException: no known implementation of class java.lang.String is named Target at org.jenkinsci.plugins.structs.describable.DescribableModel.resolveClass(DescribableModel.java:549) at org.jenkinsci.plugins.structs.describable.UninstantiatedDescribable.instantiate(UninstantiatedDescribable.java:207) at org.jenkinsci.plugins.structs.describable.DescribableModel.coerce(DescribableModel.java:466) at org.jenkinsci.plugins.structs.describable.DescribableModel.buildArguments(DescribableModel.java:409) at org.jenkinsci.plugins.structs.describable.DescribableModel.instantiate(DescribableModel.java:329)

       

       

      Currently running the plugin version 2.5 - here is the xml configuration of the /jenkinsci.plugins.influxdb.InfluxDbGlobalConfig.xml file attached as a screenshot.

       

      The exceptions are flooding the log file causing it to be un-readable.

          [JENKINS-65062] java.lang.UnsupportedOperationException: no known implementation of class java.lang.String is named Target

          Aleksi Simell added a comment -

          Hi mfarahat_kg,

          From which version did you upgrade to which version? How are you calling the plugin in your pipeline?

          Aleksi Simell added a comment - Hi mfarahat_kg , From which version did you upgrade to which version? How are you calling the plugin in your pipeline?

          Hi Aleksi,

           

          Thanks for your response.

           

          The update sequence went from 1.23 -> 2.2 -> 2.5. The issue started after the update to 2.2 from 1.23.

          The usage in the pipeline is done via a groovy implementation as the following: .

           

          Please keep in mind that the metrics get successfully submitted to the DB and the build steps show no error. 

           

          The error only appears in the Jenkins logs as exceptions

          Muhammed Farahat added a comment - Hi Aleksi,   Thanks for your response.   The update sequence went from 1.23 -> 2.2 -> 2.5. The issue started after the update to 2.2 from 1.23. The usage in the pipeline is done via a groovy implementation as the following: .   Please keep in mind that the metrics get successfully submitted to the DB and the build steps show no error.    The error only appears in the Jenkins logs as exceptions

          Aleksi Simell added a comment -

          I remember this issue, but I never really got the hang of it. Might be I'll take another look at this at some point. However, as a workaround reconfiguring your targets (even if you don't make any actual changes, just delete the target and add it again exactly as it was) resolves the errors in the Jenkins log IIRC.

          This relates to the fact that since 2.0, the targets are being set in a class called InfluxDBGlobalConfig instead of InfluxDbPublisher. I managed to reproduce this issue once when developing, but since I didn't have any idea how I caused the issue and how I "fixed" it, I couldn't properly investigate the issue. And I'm releasing 3.0 quite soon, so I won't probably fix this for that release.

          Aleksi Simell added a comment - I remember this issue, but I never really got the hang of it. Might be I'll take another look at this at some point. However, as a workaround reconfiguring your targets (even if you don't make any actual changes, just delete the target and add it again exactly as it was) resolves the errors in the Jenkins log IIRC. This relates to the fact that since 2.0, the targets are being set in a class called InfluxDBGlobalConfig instead of InfluxDbPublisher. I managed to reproduce this issue once when developing, but since I didn't have any idea how I caused the issue and how I "fixed" it, I couldn't properly investigate the issue. And I'm releasing 3.0 quite soon, so I won't probably fix this for that release.

          I will proceed with the workaround and keep the issue updated in case that solves it

          Muhammed Farahat added a comment - I will proceed with the workaround and keep the issue updated in case that solves it

          Aleksi Simell added a comment -

          I got another report on this and took a closer look. It seems like the the error is caused when step([$class: 'InfluxDbPublisher', ...]) instead of influxDbPubliser().

          As a workaround, you can use the pipeline native syntax, while I investigate this further.

          Aleksi Simell added a comment - I got another report on this and took a closer look. It seems like the the error is caused when step( [$class: 'InfluxDbPublisher', ...] ) instead of influxDbPubliser() . As a workaround, you can use the pipeline native syntax, while I investigate this further.

          Aleksi Simell added a comment -

          Hi, sorry for the long delay. In release 3.2.1 I finally fixed the log spam. Please reopen issue if this isn't fixed yet.

          Aleksi Simell added a comment - Hi, sorry for the long delay. In release 3.2.1 I finally fixed the log spam . Please reopen issue if this isn't fixed yet.

            aleksisimell Aleksi Simell
            mfarahat_kg Muhammed Farahat
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: