Exception Caught: org.jenkinsci.plugins.scriptsecurity.sandbox.RejectedAccessException: Scripts not permitted to use staticMethod org.codehaus.groovy.runtime.SqlGroovyMethods toTimestamp java.util.Date
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAPzcO4gxDR0idMzm8n9Y0W-5OoK4s7tty_uNGDzeQLvAija_wQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
To quote R. Tyler Croy. NEVER DISABLE THE SANDBOX.If you really want to do what you are trying to do, you can whitelist the toTimestamp method of the java.util.Date class in the global configuration area of Jenkins, or create the getTimeStamp function in a shared library.
On Wed, May 9, 2018 at 9:46 AM niristotle okram <nirish...@gmail.com> wrote:
i am getting a failure calling the below function in a pipelinedef getTimeStamp(str) {d = new Date(str).toTimestamp();return d}Exception Caught: org.jenkinsci.plugins.scriptsecurity.sandbox.RejectedAccessException: Scripts not permitted to use staticMethod org.codehaus.groovy.runtime.SqlGroovyMethods toTimestamp java.util.DateIf i unchecked the "groovy sandbox" and paste the pipeline - it WORKSwhile if i checkout the jenkinsfile from the repo, the same error comes back. Is there a way where i can disable "sandbox" while retrieving the pi[eline script from a git repo?Note: the method doesnt show up for approval too--Regards
nirish okram
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAPzcO4gxDR0idMzm8n9Y0W-5OoK4s7tty_uNGDzeQLvAija_wQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAPiUgVe%2BaU-HUcHvys2Oy-rwUQnqbr8AdxAKjk7joySX3zJTNQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/2b6df697-02f1-41e9-a383-fd5956484da6%40googlegroups.com.
I'm not sure if you can upgrade those plugins but you could give a go and run a local jenkins instance with the latest version of those plugins and see whether the same behaviour keeps going. Other than that, I don't have any other suggestions.Cheers
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/d8748045-ec9d-4c27-9b68-476e8f5437e6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.