org.jenkinsci.plugins.scriptsecurity.sandbox.RejectedAccessException: unclassified method java.lang. fn

Google Groups | jen...@philgrayson.com (JIRA) | 6 months ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    [JIRA] (JENKINS-38281) Global variables starting with capital letter regression

    Google Groups | 6 months ago | jen...@philgrayson.com (JIRA)
    org.jenkinsci.plugins.scriptsecurity.sandbox.RejectedAccessException: unclassified method java.lang.Class fn
  2. 0

    h3. Problem Calling a function like `Myvariable.myFunctionName()` from a global library returns the following error; {code:java} org.jenkinsci.plugins.scriptsecurity.sandbox.RejectedAccessException: unclassified method java.lang.Class myFunctionName {code} This only happens when calling global variables beginning with a capital letter. Downgrading the workflow-cps-global-lib plugin to v2.0 results in the error going away. Upgrading to v2.1 makes the error appear. From my point of view this is a regression between v2.0 and v2.1. Am I not supposed to create global variables starting with a capital letter? This represents a breaking change in some of my global library code. h3. Steps to reproduce 1. Setup a global library like; {code:java} # directory structure +- vars | +- one.groovy | +- Two.groovy {code} {code:java} # in vars/one.groovy def call() { echo "in one()" } def fn() { echo "In one.fn()" } {code} {code:java} # in vars/Two.groovy def call() { echo "In Two()" } def fn() { echo "In Two.fn()" } {code} 2. Load the global library into jenkins (git push) 3. Create a pipeline job with the following pipeline script {code:java} one() one.fn() Two() Two.fn() {code} h5. Expected Output {code} [Pipeline] echo in one() [Pipeline] echo In one.fn() [Pipeline] echo In Two() [Pipeline] echo In Two.fn() {code} h5. Actual Output {code} in one() [Pipeline] echo In one.fn() [Pipeline] echo In Two() [Pipeline] End of Pipeline org.jenkinsci.plugins.scriptsecurity.sandbox.RejectedAccessException: unclassified method java.lang.Class fn at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onMethodCall(SandboxInterceptor.java:113) at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:149) at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:146) [... truncated - full stack trace attached to ticket ...] {code}

    Jenkins JIRA | 6 months ago | Phil Grayson
    org.jenkinsci.plugins.scriptsecurity.sandbox.RejectedAccessException: unclassified method java.lang.Class fn
  3. 0

    [JIRA] [durable-task-plugin] (JENKINS-27152) Store sh control files outside of workspace

    Google Groups | 1 year ago | jgl...@cloudbees.com (JIRA)
    org.jenkinsci.plugins.scriptsecurity.sandbox.RejectedAccessException: unclassified method hudson.util.CopyOnWriteList leftShift hudson.plugins.git.extensions.impl.CleanBeforeCheckout
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    [JIRA] (JENKINS-41557) manager.createSummary().appendText() fails in sandbox

    Google Groups | 2 months ago | in...@michael-jansen.biz (JIRA)
    org.jenkinsci.plugins.scriptsecurity.sandbox.RejectedAccessException: unclassified method org.jvnet.hudson.plugins.groovypostbuild.GroovyPostbuildSummaryAction appendText java.lang.String

    7 unregistered visitors
    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. org.jenkinsci.plugins.scriptsecurity.sandbox.RejectedAccessException

      unclassified method java.lang. fn

      at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onMethodCall()
    2. org.jenkinsci.plugins
      SandboxInterceptor.onMethodCall
      1. org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onMethodCall(SandboxInterceptor.java:113)
      1 frame
    3. org.kohsuke.groovy
      Checker.checkedCall
      1. org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:149)
      2. org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:146)
      2 frames