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

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

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Minor Minor
    • influxdb-plugin
    • None
    • Jenkins ver. 2.190.1
      Plugin version: 2.0.1

      Jenkins log contains a lot of such warnings with password as a plain text:

      2019-10-10 08:24:15.380+0000 [id=40232]	WARNING	o.j.p.s.d.DescribableModel#uninstantiate2: Cannot create control version of class org.jenkinsci.plugins.workflow.steps.CoreStep using {delegate=$InfluxDbPublisher(customData={version=null, endpoint=null, scmrevision=c2cb16},customDataMap=null,customDataMapTags=null,customDataTags=null,customPrefix=null,customProjectName=null,jenkinsEnvParameterField=null,jenkinsEnvParameterTag=null,measurementName=null,replaceDashWithUnderscore=false,selectedTarget=Preprod InfluxDB,target=$Target(database=grafana,description=Preprod InfluxDB,exposeExceptions=false,globalListener=true,globalListenerFilter=,jobScheduledTimeAsPointsTimestamp=false,password=***,retentionPolicy=autogen,url=https://influxdb-ci.***.com,username=jenkins,usingJenkinsProxy=false))}
      java.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)
      Caused: java.lang.IllegalArgumentException: Could not instantiate {customData={version=null, endpoint=null, scmrevision=c2cb16}, customDataMap=null, customDataMapTags=null, customDataTags=null, customPrefix=null, customProjectName=null, jenkinsEnvParameterField=null, jenkinsEnvParameterTag=null, measurementName=null, replaceDashWithUnderscore=false, selectedTarget=Preprod InfluxDB, target=$Target(database=grafana,description=Preprod InfluxDB,exposeExceptions=false,globalListener=true,globalListenerFilter=,jobScheduledTimeAsPointsTimestamp=false,password=***,retentionPolicy=autogen,url=https://influxdb-ci.***.com,username=jenkins,usingJenkinsProxy=false)} for jenkinsci.plugins.influxdb.InfluxDbPublisher
      	at org.jenkinsci.plugins.structs.describable.DescribableModel.instantiate(DescribableModel.java:334)
      	at org.jenkinsci.plugins.structs.describable.UninstantiatedDescribable.instantiate(UninstantiatedDescribable.java:208)
      	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)
      Caused: java.lang.IllegalArgumentException: Could not instantiate {delegate=$InfluxDbPublisher(customData={version=null, endpoint=null, scmrevision=c2cb16},customDataMap=null,customDataMapTags=null,customDataTags=null,customPrefix=null,customProjectName=null,jenkinsEnvParameterField=null,jenkinsEnvParameterTag=null,measurementName=null,replaceDashWithUnderscore=false,selectedTarget=Preprod InfluxDB,target=$Target(database=grafana,description=Preprod InfluxDB,exposeExceptions=false,globalListener=true,globalListenerFilter=,jobScheduledTimeAsPointsTimestamp=false,password=***,retentionPolicy=autogen,url=https://influxdb-ci.***.com,username=jenkins,usingJenkinsProxy=false))} for org.jenkinsci.plugins.workflow.steps.CoreStep
      	at org.jenkinsci.plugins.structs.describable.DescribableModel.instantiate(DescribableModel.java:334)
      	at org.jenkinsci.plugins.structs.describable.DescribableModel.uninstantiate2(DescribableModel.java:672)
      	at org.jenkinsci.plugins.workflow.actions.ArgumentsAction.resolve(ArgumentsAction.java:308)
      	at org.jenkinsci.plugins.workflow.actions.ArgumentsAction.getResolvedArguments(ArgumentsAction.java:295)
      	at org.jenkinsci.plugins.workflow.cps.nodes.StepAtomNode.getDelegateType(StepAtomNode.java:134)
      	at org.jenkinsci.plugins.workflow.cps.nodes.StepAtomNode.effectiveDisplayName(StepAtomNode.java:90)
      	at org.jenkinsci.plugins.workflow.cps.nodes.StepAtomNode.getTypeDisplayName(StepAtomNode.java:102)
      	at org.jenkinsci.plugins.workflow.graph.FlowNode.getDisplayName(FlowNode.java:257)
      	at com.cloudbees.workflow.rest.external.FlowNodeExt.addBasicNodeData(FlowNodeExt.java:206)
      	at com.cloudbees.workflow.rest.external.AtomFlowNodeExt.create(AtomFlowNodeExt.java:71)
      	at com.cloudbees.workflow.rest.external.ChunkVisitor.makeAtomNode(ChunkVisitor.java:68)
      	at com.cloudbees.workflow.rest.external.ChunkVisitor.atomNode(ChunkVisitor.java:154)
      	at org.jenkinsci.plugins.workflow.graphanalysis.ForkScanner.fireVisitChunkCallbacks(ForkScanner.java:751)
      	at org.jenkinsci.plugins.workflow.graphanalysis.ForkScanner.visitSimpleChunks(ForkScanner.java:769)
      	at org.jenkinsci.plugins.workflow.graphanalysis.ForkScanner.visitSimpleChunks(ForkScanner.java:633)
      	at com.cloudbees.workflow.rest.external.RunExt.createNew(RunExt.java:322)
      	at com.cloudbees.workflow.rest.external.RunExt.create(RunExt.java:310)
      	at com.cloudbees.workflow.rest.external.JobExt.create(JobExt.java:131)
      	at com.cloudbees.workflow.rest.endpoints.JobAPI.doRuns(JobAPI.java:69)
      	at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627)
      	at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:396)
      	at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:408)
      	at com.cloudbees.workflow.util.ServeJson$Processor.invoke(ServeJson.java:30)
      	at org.kohsuke.stapler.PreInvokeInterceptedFunction.invoke(PreInvokeInterceptedFunction.java:26)
      	at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:212)
      	at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:145)
      	at org.kohsuke.stapler.MetaClass$11.doDispatch(MetaClass.java:535)
      	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
      	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:747)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:878)
      	at org.kohsuke.stapler.MetaClass$9.dispatch(MetaClass.java:456)
      	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:747)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:878)
      	at org.kohsuke.stapler.MetaClass$4.doDispatch(MetaClass.java:280)
      	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
      	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:747)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:878)
      	at org.kohsuke.stapler.MetaClass$4.doDispatch(MetaClass.java:280)
      	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
      	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:747)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:878)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:676)
      	at org.kohsuke.stapler.Stapler.service(Stapler.java:238)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
      	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:873)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1623)
      	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:154)
      	at org.jenkinsci.plugins.ssegateway.Endpoint$SSEListenChannelFilter.doFilter(Endpoint.java:246)
      	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
      	at io.jenkins.blueocean.ResourceCacheControl.doFilter(ResourceCacheControl.java:134)
      	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
      	at io.jenkins.blueocean.auth.jwt.impl.JwtAuthenticationFilter.doFilter(JwtAuthenticationFilter.java:61)
      	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
      	at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:239)
      	at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:215)
      	at net.bull.javamelody.PluginMonitoringFilter.doFilter(PluginMonitoringFilter.java:88)
      	at org.jvnet.hudson.plugins.monitoring.HudsonMonitoringFilter.doFilter(HudsonMonitoringFilter.java:114)
      	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
      	at hudson.plugins.locale.LocaleFilter.doFilter(LocaleFilter.java:42)
      	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
      	at hudson.plugins.audit_trail.AuditTrailFilter.doFilter(AuditTrailFilter.java:92)
      	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
      	at jenkins.metrics.impl.MetricsFilter.doFilter(MetricsFilter.java:125)
      	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
      	at jenkins.telemetry.impl.UserLanguages$AcceptLanguageFilter.doFilter(UserLanguages.java:128)
      	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
      	at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:157)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610)
      	at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:105)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
      	at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      	at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      	at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      	at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      	at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      	at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:93)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      	at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
      	at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      	at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:90)
      	at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610)
      	at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610)
      	at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610)
      	at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610)
      	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:540)
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:146)
      	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524)
      	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
      	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257)
      	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1700)
      	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255)
      	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1345)
      	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203)
      	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:480)
      	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1667)
      	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201)
      	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1247)
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144)
      	at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:56)
      	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
      	at org.eclipse.jetty.server.Server.handle(Server.java:505)
      	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:370)
      	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:267)
      	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:305)
      	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
      	at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117)
      	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333)
      	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310)
      	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168)
      	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126)
      	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366)
      	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:698)
      	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:804)
      	at java.lang.Thread.run(Thread.java:748)
      

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

          Denis Bel created issue -

          Aleksi Simell added a comment -

          Are you trying to
          a) write stuff to InfluxDB
          b) create a new target?

          In both cases, how are you trying to do that? Did your job work previously and broke when you updated the plugin? And from which version did you update?

          As described in https://wiki.jenkins.io/display/JENKINS/InfluxDB+Plugin, after version 2.0 you need to make the password a hudson.util.Secret instead of String.

          Aleksi Simell added a comment - Are you trying to a) write stuff to InfluxDB b) create a new target? In both cases, how are you trying to do that? Did your job work previously and broke when you updated the plugin? And from which version did you update? As described in https://wiki.jenkins.io/display/JENKINS/InfluxDB+Plugin , after version 2.0 you need to make the password a hudson.util.Secret instead of String .
          Denis Bel made changes -
          Attachment New: image-2019-10-10-13-36-10-271.png [ 49088 ]

          Denis Bel added a comment -

          Hello, aleksisimell

          Thanks for quick answer

          Yes, seems it was broken since upgrade from 1.X to 2.X
          a)

          ...
          influxDbPublisher(selectedTarget: 'Preprod InfluxDB', customData: influxDbCustomData)
          ...
          

          b) I created a new target via /configure UI

           

          Denis Bel added a comment - Hello, aleksisimell Thanks for quick answer Yes, seems it was broken since upgrade from 1.X to 2.X a) ... influxDbPublisher(selectedTarget: 'Preprod InfluxDB' , customData: influxDbCustomData) ... b) I created a new target via /configure UI  

          Aleksi Simell added a comment -

          I'm not able to reproduce this. Was your previous version <1.22? As mentioned in the Release notes, the plugin previously stored passwords in plain text and this was fixed in 1.22. In version 2.0 I made a major architectural change to the plugin to allow better support for pipelines and that might've caused an issue with your previous target setup.

          Can you try just simply reconfiguring your target?

          Aleksi Simell added a comment - I'm not able to reproduce this. Was your previous version <1.22? As mentioned in the Release notes , the plugin previously stored passwords in plain text and this was fixed in 1.22. In version 2.0 I made a major architectural change to the plugin to allow better support for pipelines and that might've caused an issue with your previous target setup. Can you try just simply reconfiguring your target?

          Denis Bel added a comment -

          Yes, sure, I will do it and come back to here with results.

          Denis Bel added a comment - Yes, sure, I will do it and come back to here with results.

          Denis Bel added a comment -

          Hey aleksisimell,

          I upgraded from 1.23 to 2.0.1 on September, 7 (did not re-create publisher, just re-applied config for InfluxDB)

          • on September, 9 I recreated config for InfluxDB plugin and also restarted Jenkins to upgrade other plugins
          • on October, 15 (today) I re-created config for InfluxDB one more time

          After publisher recreation and re-enabling plugin I can see some data in InfluxDB - no new warnings so far, so it looks good!
          However I discovered two files related to plugin in JENKINS_HOME:

          -rw-r--r-- 1 jenkins jenkins 986 Oct 15 12:53 /var/lib/jenkins/jenkinsci.plugins.influxdb.InfluxDbGlobalConfig.xml
          <jenkinsci.plugins.influxdb.InfluxDbGlobalConfig plugin="influxdb@2.0.1">
          
          -rw-r--r-- 1 jenkins jenkins 903 Sep 9  14:29 /var/lib/jenkins/jenkinsci.plugins.influxdb.InfluxDbPublisher.xml
          <jenkinsci.plugins.influxdb.DescriptorImpl plugin="influxdb@1.23">
          

           

          Can the presence of `jenkinsci.plugins.influxdb.InfluxDbPublisher.xml` cause this issue?

          Should I delete the old config file?

           

          Thanks,

          Denis

          Denis Bel added a comment - Hey aleksisimell , I upgraded from 1.23 to 2.0.1 on September, 7 (did not re-create publisher, just re-applied config for InfluxDB) on September, 9 I recreated config for InfluxDB plugin and also restarted Jenkins to upgrade other plugins on October, 15 (today) I re-created config for InfluxDB one more time After publisher recreation and re-enabling plugin I can see some data in InfluxDB - no new warnings so far, so it looks good! However I discovered two files related to plugin in JENKINS_HOME: -rw-r--r-- 1 jenkins jenkins 986 Oct 15 12:53 / var /lib/jenkins/jenkinsci.plugins.influxdb.InfluxDbGlobalConfig.xml <jenkinsci.plugins.influxdb.InfluxDbGlobalConfig plugin= "influxdb@2.0.1" > -rw-r--r-- 1 jenkins jenkins 903 Sep 9 14:29 / var /lib/jenkins/jenkinsci.plugins.influxdb.InfluxDbPublisher.xml <jenkinsci.plugins.influxdb.DescriptorImpl plugin= "influxdb@1.23" >   Can the presence of `jenkinsci.plugins.influxdb.InfluxDbPublisher.xml` cause this issue? Should I delete the old config file?   Thanks, Denis

          Aleksi Simell added a comment -

          brialius The plugin uses only InfluxDbGlobalConfig as of version 2.0. Deleting the other file should be safe, but it shouldn't matter if it is there. If you delete it, you cannot rollback to an older version of the plugin. I would suggest taking a copy of that in case you want to delete it.

          If I understood correctly, you're not getting the error anymore and the issue is resolved?

          Aleksi Simell added a comment - brialius The plugin uses only InfluxDbGlobalConfig as of version 2.0. Deleting the other file should be safe, but it shouldn't matter if it is there. If you delete it, you cannot rollback to an older version of the plugin. I would suggest taking a copy of that in case you want to delete it. If I understood correctly, you're not getting the error anymore and the issue is resolved?
          Denis Bel made changes -
          Attachment New: image-2019-10-18-15-16-12-400.png [ 49185 ]
          Denis Bel made changes -
          Attachment Original: image-2019-10-18-15-16-12-400.png [ 49185 ]

            aleksisimell Aleksi Simell
            brialius Denis Bel
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: