Pre-send script tried to access secured objects: classpath entry file:/C:/Jenkins/ is a class directory, which are not allowed

19 views Asked by At

Recently we have upgraded the jenkins version to 2.440.1 and all my jobs are failing with below exceptions. I have tried all the possible ways including clearing the script approvals and re approving etc,

It is stopped working after we have enhanced the Authentication in Manage Jenkins -> Secuirty and adding Matrix based security - But i have given complete permissions to the user.

Executing pre-send script Pre-send script tried to access secured objects: classpath entry file:/C:/Jenkins/ is a class directory, which are not allowed.

ERROR: Could not send email as a part of the post-build publishers.
org.jenkinsci.plugins.scriptsecurity.scripts.UnapprovedClasspathException: classpath entry file:/C:/Jenkins/ is a class directory, which are not allowed.
    at org.jenkinsci.plugins.scriptsecurity.scripts.ScriptApproval.using(ScriptApproval.java:762)
    at hudson.plugins.emailext.ExtendedEmailPublisher.expandClasspath(ExtendedEmailPublisher.java:798)
    at hudson.plugins.emailext.ExtendedEmailPublisher.executeScript(ExtendedEmailPublisher.java:726)
    at hudson.plugins.emailext.ExtendedEmailPublisher.executePresendScript(ExtendedEmailPublisher.java:679)
    at hudson.plugins.emailext.ExtendedEmailPublisher.sendMail(ExtendedEmailPublisher.java:529)
    at hudson.plugins.emailext.ExtendedEmailPublisher._perform(ExtendedEmailPublisher.java:486)
    at hudson.plugins.emailext.ExtendedEmailPublisher.perform(ExtendedEmailPublisher.java:387)
    at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
    at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:818)
    at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:767)
    at hudson.model.Build$BuildExecution.cleanUp(Build.java:189)
    at hudson.model.Run.execute(Run.java:1938)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:44)
    at hudson.model.ResourceController.execute(ResourceController.java:101)
    at hudson.model.Executor.run(Executor.java:442)
Some error occurred trying to send the email...check the Jenkins log
  1. I have tried all the possible ways including clearing the script approvals and re approving etc,
  2. reinstalling the Jenkins, Restarting the servers etc,,
  3. the closest issue i could found is as below , but it still does not solve my issue.

Jenkins email-ext not sending mails out and output "Pre-send script tried to access secured objects"

0

There are 0 answers