Not able to execute javascript in my proxy with new cloud account?

Not applicable

I have deployed a proxy bundle to my other organisation. After that when I am hitting the proxy with postman it is giving the following error:

{
  "fault": {
    "faultstring": "Security violation access denied (\"java.lang.reflect.ReflectPermission\" \"suppressAccessChecks\") while executing step GetCouponcode",
    "detail": {
      "errorcode": "steps.javascript.ScriptSecurityError"
    }
  }
}

But the same proxy is working in my other organisation from where I have downloaded and deployed it to my another organisation.

I have deployed few more proxies and observed that the problem is coming with those proxies which have javascript policy to execute.

As I have seen I am facing this problem with newly created cloud account . With all the other existing APIGEE account its working perfectly.

Solved Solved
0 9 388
1 ACCEPTED SOLUTION

@Rhythm Kumar Arora This should be working again, now.

Sorry for the inconvenience.

View solution in original post

9 REPLIES 9

Not applicable

Hello @Rhythm Kumar Arora,

This is happening because the java script code may have some dependency on the environment and we need to look at the proxy to understand whats wrong.

Can you please share the API Proxy ?

coupon.zip

Attaching the proxy bundle.

@Meghdeep Basu

Thanks @Rhythm Kumar Arora,

Can you please also share the trace of failure case ?

trace-1473666468212.zip

As I have seen I am facing this problem with newly created cloud account . With all the other existing APIGEE account its working perfectly.

@Rhythm Kumar Arora ,

Like you said, It’s not a proxy issue, I believe it’s org specific javascript execution issue.. I have tested above proxy in one of the cloud org with service callout pointed to my BaaS collection & it works perfectly fine.

Can you please let us know more details regarding the different orgs you are mentioning ? Which ORG it's working (OnPremises / OnCloud) (Version Number ) ? Which ORG it's NOT working (OnPremises / OnCloud) (Version Number ) ?

PS: Navigate to "/buildInfo" in Management UI to find version info.

I am facing this problem with newly created cloud account . With all the other existing APIGEE account its working perfectly.

The JS code seems fine; benign. I don't know why there'd be a ScriptSecurityError.

Having the org name + environment name will help.

If you are using an Apigee-managed edge (in the public cloud) we can check stacktraces - that wouldn't be available to you. If you are using a self-managed Edge (OPDK), then you can check the message processor system.log yourself for a stacktrace that may provide more information and context around the error.

Also, it may be relevant. what does "econtenttype" look like? In json? That is the thing that is being parsed by the JS module. What is it?

If I were diagnosing this myself, I'd insert some other diagnostic steps in the JS. setting other variables, or even printing things, and then viewing those results in the trace window.

Also maybe use a try..catch in there - if you can catch the Exception , it may give you more information.

I am facing this problem with newly created cloud account . With all the other existing APIGEE account its working perfectly.

@Rhythm Kumar Arora This should be working again, now.

Sorry for the inconvenience.