# java.lang.NoClassDefFoundError: javax/servlet/ServletContext APM agent 1.29.0 in Docker

**URL:** <https://discuss.elastic.co/t/java-lang-noclassdeffounderror-javax-servlet-servletcontext-apm-agent-1-29-0-in-docker/298975>\
**Category:** APM\
**Tags:** docker, java\
**Created:** [March 7, 2022, 2:24pm UTC](https://discuss.elastic.co/t/java-lang-noclassdeffounderror-javax-servlet-servletcontext-apm-agent-1-29-0-in-docker/298975 "2022-03-07T14:24:43Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Sylvain\_Juge](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sylvain_juge/32/55521_2.png) [@Sylvain\_Juge](https://discuss.elastic.co/u/Sylvain_Juge)\
**Post date:** [March 8, 2022, 11:15am UTC](https://discuss.elastic.co/t/java-lang-noclassdeffounderror-javax-servlet-servletcontext-apm-agent-1-29-0-in-docker/298975/2 "2022-03-08T11:15:07Z")

</div>

Hi @jseletz , thanks for reporting this.

I have managed to reproduce it, thus I will open an issue and investigate it further, I'll update this discussion when I have links to issue/PR to share.

In the mean time, you can disable the instrumentation that triggers it by setting  
`disable_instrumentations=spring-service-name` ([doc](https://www.elastic.co/guide/en/apm/agent/java/current/config-core.html#config-disable-instrumentations)). The downside of this issue is that the agent won't be able to automatically use the application name set in Spring configuration and you will have to add an explicit `service_name` configuration for your application.

---

_[View the full topic](https://discuss.elastic.co/t/java-lang-noclassdeffounderror-javax-servlet-servletcontext-apm-agent-1-29-0-in-docker/298975)._
