Jenkins 2.401.3 after upgrade issue

Hi Team,
We have migrated our old jenkins job to new server jenkins 2.401.3 but in pre send script we see most of the issue and when we checked there in no approval pending “No pending script approvals.” then too we received this message in jenkins console ,Please help.

**--------------------Error 1 ------------------------------------------------------------------ **org.jenkinsci.plugins.scriptsecurity.sandbox.RejectedAccessException: Scripts not permitted to use method openConnection** **
-----------------------------------Error 2---------------------------------------------------
ERROR: Could not send email as a part of the post-build publishers.
org.jenkinsci.plugins.scriptsecurity.scripts.UnapprovedClasspathException: classpath entry file:/var/lib/jenkins/ is a class directory, which are not allowed.
** at org.jenkinsci.plugins.scriptsecurity.scripts.ScriptApproval.using(**
** at hudson.plugins.emailext.ExtendedEmailPublisher.expandClasspath(**
** at hudson.plugins.emailext.ExtendedEmailPublisher.executeScript(**

Hi Team, , do any one have solution for this? Thank you

The errors you’re seeing seem to be related to Jenkins’ script security plugin.

This plugin is used to control what scripts can be run in Jenkins and what parts of the Java API they can access.

Error 1 is indicating that your script is trying to use the openConnection method, which is not permitted by the script security plugin.

Error 2 is indicating that your script is trying to access a class directory (/var/lib/jenkins/), which is also not permitted by the script security plugin.

What is the version of this plugin you’re using? Did you get the latest version that is compatible with your Jenkins version?