groovy.lang.MissingPropertyException: No such property: com for class: test Possible solutions: jm

Jenkins JIRA | Kyle Leinen | 4 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    I have only been a user of this awesome plugin for a short time, but I am hitting a wall with a need. I am trying to dev a dsl groovy script that will create a job that uses the Mercurial scm, but also uses the new credentials ability. I know the groovy code to get the credentials ID, but I can't seem to get it working in through the Job DSL plugin. Can anyone help? I think the issue that I am running into may require a change to the plugin, but I would like to see what the community thinks. Here is what I know will get me the credentials ID for the "foobar" credentials: def creds = com.cloudbees.plugins.credentials.CredentialsProvider.lookupCredentials( com.cloudbees.plugins.credentials.common.StandardUsernameCredentials.class, Jenkins.instance, null, null ); for (c in creds) { if (c.description == "foobar") { println(c.id) break } } But when I put this into a dsl, I get the following: FATAL: No such property: com for class: test Possible solutions: jm groovy.lang.MissingPropertyException: No such property: com for class: test Possible solutions: jm at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:50) at org.codehaus.groovy.runtime.callsite.PogoGetPropertySite.getProperty(PogoGetPropertySite.java:49) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGroovyObjectGetProperty(AbstractCallSite.java:231) at test.run(test.dsl:21) at javaposse.jobdsl.dsl.DslScriptLoader.runDslEngineForParent(DslScriptLoader.java:68) at javaposse.jobdsl.dsl.DslScriptLoader.runDslEngine(DslScriptLoader.java:92) at javaposse.jobdsl.plugin.ExecuteDslScripts.perform(ExecuteDslScripts.java:159) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782) at hudson.model.Build$BuildExecution.build(Build.java:199) at hudson.model.Build$BuildExecution.doRun(Build.java:160) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:567) at hudson.model.Run.execute(Run.java:1604) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:246) Any pointers or ways of positive guidance is much appreciated! Thanks!

    Jenkins JIRA | 4 years ago | Kyle Leinen
    groovy.lang.MissingPropertyException: No such property: com for class: test Possible solutions: jm
  2. 0

    I have only been a user of this awesome plugin for a short time, but I am hitting a wall with a need. I am trying to dev a dsl groovy script that will create a job that uses the Mercurial scm, but also uses the new credentials ability. I know the groovy code to get the credentials ID, but I can't seem to get it working in through the Job DSL plugin. Can anyone help? I think the issue that I am running into may require a change to the plugin, but I would like to see what the community thinks. Here is what I know will get me the credentials ID for the "foobar" credentials: def creds = com.cloudbees.plugins.credentials.CredentialsProvider.lookupCredentials( com.cloudbees.plugins.credentials.common.StandardUsernameCredentials.class, Jenkins.instance, null, null ); for (c in creds) { if (c.description == "foobar") { println(c.id) break } } But when I put this into a dsl, I get the following: FATAL: No such property: com for class: test Possible solutions: jm groovy.lang.MissingPropertyException: No such property: com for class: test Possible solutions: jm at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:50) at org.codehaus.groovy.runtime.callsite.PogoGetPropertySite.getProperty(PogoGetPropertySite.java:49) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGroovyObjectGetProperty(AbstractCallSite.java:231) at test.run(test.dsl:21) at javaposse.jobdsl.dsl.DslScriptLoader.runDslEngineForParent(DslScriptLoader.java:68) at javaposse.jobdsl.dsl.DslScriptLoader.runDslEngine(DslScriptLoader.java:92) at javaposse.jobdsl.plugin.ExecuteDslScripts.perform(ExecuteDslScripts.java:159) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782) at hudson.model.Build$BuildExecution.build(Build.java:199) at hudson.model.Build$BuildExecution.doRun(Build.java:160) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:567) at hudson.model.Run.execute(Run.java:1604) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:246) Any pointers or ways of positive guidance is much appreciated! Thanks!

    Jenkins JIRA | 4 years ago | Kyle Leinen
    groovy.lang.MissingPropertyException: No such property: com for class: test Possible solutions: jm
  3. 0

    Load Titan graph with Gremlin

    Stack Overflow | 2 years ago | yossico
    groovy.lang.MissingPropertyException: No such property: TitanFactory for class: groovysh_evaluate
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Exceptions on resolving transient dependencies

    GitHub | 3 years ago | Burbaka
    groovy.lang.MissingPropertyException: No such property: baseDir for class: setup_device_types_api
  6. 0

    Titan 0.3.1 doesn't work with examples in /wiki/Graph-Configuration

    GitHub | 4 years ago | yvesx
    groovy.lang.MissingPropertyException: No such property: conf for class: groovysh_evaluate
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. groovy.lang.MissingPropertyException

    No such property: com for class: test Possible solutions: jm

    at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap()
  2. Groovy
    AbstractCallSite.callGroovyObjectGetProperty
    1. org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:50)
    2. org.codehaus.groovy.runtime.callsite.PogoGetPropertySite.getProperty(PogoGetPropertySite.java:49)
    3. org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGroovyObjectGetProperty(AbstractCallSite.java:231)
    3 frames
  3. Unknown
    test.run
    1. test.run(test.dsl:21)
    1 frame
  4. javaposse.jobdsl.dsl
    DslScriptLoader.runDslEngine
    1. javaposse.jobdsl.dsl.DslScriptLoader.runDslEngineForParent(DslScriptLoader.java:68)
    2. javaposse.jobdsl.dsl.DslScriptLoader.runDslEngine(DslScriptLoader.java:92)
    2 frames
  5. javaposse.jobdsl.plugin
    ExecuteDslScripts.perform
    1. javaposse.jobdsl.plugin.ExecuteDslScripts.perform(ExecuteDslScripts.java:159)
    1 frame
  6. Hudson
    Executor.run
    1. hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
    2. hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)
    3. hudson.model.Build$BuildExecution.build(Build.java:199)
    4. hudson.model.Build$BuildExecution.doRun(Build.java:160)
    5. hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:567)
    6. hudson.model.Run.execute(Run.java:1604)
    7. hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
    8. hudson.model.ResourceController.execute(ResourceController.java:88)
    9. hudson.model.Executor.run(Executor.java:246)
    9 frames