# APM Java Agent - AccessControlException

**URL:** <https://discuss.elastic.co/t/apm-java-agent-accesscontrolexception/218385>\
**Category:** APM\
**Tags:** java\
**Created:** [February 7, 2020, 4:49pm UTC](https://discuss.elastic.co/t/apm-java-agent-accesscontrolexception/218385 "2020-02-07T16:49:53Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![chandra2037](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chandra2037/32/72142_2.png) [@chandra2037](https://discuss.elastic.co/u/chandra2037)\
**Post date:** [February 17, 2020, 6:24pm UTC](https://discuss.elastic.co/t/apm-java-agent-accesscontrolexception/218385/3 "2020-02-17T18:24:44Z")

</div>

Hi @Eyal_Koren,

Thank you for your response.

The issue got resolved. You are right that JVM did not pick up the permissions that we configured.

Seems like docker image has the following configuration

`-Djava.security.policy==/usr/local/tomcat/conf/catalina.policy`

which means the security policy that we are configuration getting overwritten by catalina.policy file. So adding the following statement to the catalina.policy file itself resolved the issue.

```
grant codeBase "file:/usr/local/tomcat/apm/-" {
     permission java.security.AllPermission;
};

```

I appreciate your time and help.

Thanks,  
Chandra

---

_[View the full topic](https://discuss.elastic.co/t/apm-java-agent-accesscontrolexception/218385)._
