# NoClassDefFoundError OkHttpCloudEventsIntrospectionWrapper

**URL:** <https://community.dynatrace.com/t/noclassdeffounderror-okhttpcloudeventsintrospectionwrapper/48971>\
**Category:** Open Q&A\
**Tags:** oneagent\
**Created:** [November 19, 2024, 10:27pm UTC](https://community.dynatrace.com/t/noclassdeffounderror-okhttpcloudeventsintrospectionwrapper/48971 "2024-11-19T22:27:13Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![achang](https://avatars.discourse-cdn.com/v4/letter/a/5e9695/32.png) [@achang](https://community.dynatrace.com/u/achang)\
**Post date:** [November 19, 2024, 10:27pm UTC](https://community.dynatrace.com/t/noclassdeffounderror-okhttpcloudeventsintrospectionwrapper/48971/1 "2024-11-19T22:27:13Z")

</div>

I have One Agent (1.299.50.20240930-123825) running in my Spring Boot application. However, I am receiving the error below:

java.lang.NoClassDefFoundError: Could not initialize class com.dynatrace.agent.introspection.cloudevents.outgoing.okhttp.OkHttpCloudEventsIntrospectionWrapper

I am making use of:

OpenFeign - 11

okhttp3 - 4.9.3

---

<div class="post-metadata">

**Author:** ![Peter\_Youssef](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/peter_youssef/32/14668_2.png) [@Peter\_Youssef](https://community.dynatrace.com/u/Peter_Youssef)\
**Post date:** [November 20, 2024, 5:35am UTC](https://community.dynatrace.com/t/noclassdeffounderror-okhttpcloudeventsintrospectionwrapper/48971/2 "2024-11-20T05:35:39Z")

</div>

Hello&nbsp;[@achang](https://community.dynatrace.com/user/83339)

can you please check if the technology is supported, as long as you have an updated version of OneAgent deployed:

- [OneAgent platform and capability support matrix — Dynatrace Docs](https://docs.dynatrace.com/docs/ingest-from/technology-support/oneagent-platform-and-capability-support-matrix)
- [Technology support — Dynatrace Docs](https://docs.dynatrace.com/docs/ingest-from/technology-support)

BR,

Peter

---

<div class="post-metadata">

**Author:** ![Peter\_Youssef](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/peter_youssef/32/14668_2.png) [@Peter\_Youssef](https://community.dynatrace.com/u/Peter_Youssef)\
**Post date:** [November 20, 2024, 5:38am UTC](https://community.dynatrace.com/t/noclassdeffounderror-okhttpcloudeventsintrospectionwrapper/48971/3 "2024-11-20T05:38:03Z")

</div>

Hi&nbsp;[@achang](https://community.dynatrace.com/user/83339)

- Would you mind sharing the related logs for further investigation.
- Another solution is to update the application related technologies, uninstall OA, remove all directories and then re-install it again “fresh deployment”.

Hoping it adds value

Regards,

Peter

---

<div class="post-metadata">

**Author:** ![achang](https://avatars.discourse-cdn.com/v4/letter/a/5e9695/32.png) [@achang](https://community.dynatrace.com/u/achang)\
**Post date:** [November 20, 2024, 10:32am UTC](https://community.dynatrace.com/t/noclassdeffounderror-okhttpcloudeventsintrospectionwrapper/48971/4 "2024-11-20T10:32:19Z")

</div>

Hi&nbsp;[@Peter\_Youssef](https://community.dynatrace.com/user/51369),

Thanks for the ideas.

Please find the stack trace below:

```markup
org.springframework.web.util.NestedServletException: Handler dispatch failed; nested exception is java.lang.NoClassDefFoundError: Could not initialize class com.dynatrace.agent.introspection.cloudevents.outgoing.okhttp.OkHttpCloudEventsIntrospectionWrapper
    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1086)
    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:964)
    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
    at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:670)
    at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:779)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:102)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:102)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
    at org.springframework.web.filter.ForwardedHeaderFilter.doFilterInternal(ForwardedHeaderFilter.java:156)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:711)
    at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:461)
    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:385)
    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:313)
    at org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:403)
    at org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:249)
    at org.apache.catalina.core.StandardHostValve.throwable(StandardHostValve.java:344)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:360)
    at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)
    at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
    at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:893)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1789)
    at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
    at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
    at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Thread.java:750)
Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.dynatrace.agent.introspection.cloudevents.outgoing.okhttp.OkHttpCloudEventsIntrospectionWrapper
    at okhttp3.internal.connection.RealCall.execute(RealCall.kt)
    at feign.okhttp.OkHttpClient.execute(OkHttpClient.java:169)
    at feign.SynchronousMethodHandler.executeAndDecode(SynchronousMethodHandler.java:119)
    at feign.SynchronousMethodHandler.invoke(SynchronousMethodHandler.java:89)
    at feign.ReflectiveFeign$FeignInvocationHandler.invoke(ReflectiveFeign.java:100)
    at com.sun.proxy.$Proxy113.getRemoteConfig(Unknown Source)
    at com.example.repository.remoteconfig.RemoteConfigRepository.fetchRemoteConfig(RemoteConfigRepository.kt:20)
    at com.example.repository.remoteconfig.RemoteConfigRepository$$FastClassBySpringCGLIB$$b28d96de.invoke(<generated>)
    at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
    at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:793)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
    at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763)
    at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:137)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
    at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763)
    at org.springframework.cache.interceptor.CacheInterceptor.lambda$invoke$0(CacheInterceptor.java:54)
    at org.springframework.cache.interceptor.CacheAspectSupport.invokeOperation(CacheAspectSupport.java:366)
    at org.springframework.cache.interceptor.CacheAspectSupport.execute(CacheAspectSupport.java:421)
    at org.springframework.cache.interceptor.CacheAspectSupport.execute(CacheAspectSupport.java:345)
    at org.springframework.cache.interceptor.CacheInterceptor.invoke(CacheInterceptor.java:64)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
    at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763)
    at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:708)
    at com.example.repository.remoteconfig.RemoteConfigRepository$$EnhancerBySpringCGLIB$$26736658.fetchRemoteConfig(<generated>)
    at com.example.service.remoteconfig.RemoteConfigService.getMappedCountryParameters(RemoteConfigService.kt:88)
    at com.example.service.remoteconfig.RemoteConfigService.getProgram(RemoteConfigService.kt:46)
    at com.example.server.interceptors.authentication.AuthenticationHandlerInterceptor.extractClientCredentials(AuthenticationHandlerInterceptor.kt:84)
    at com.example.server.interceptors.authentication.AuthenticationHandlerInterceptor.preHandle(AuthenticationHandlerInterceptor.kt:43)
    at org.springframework.web.servlet.HandlerExecutionChain.applyPreHandle(HandlerExecutionChain.java:148)
    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1066)
    ... 38 common frames omitted

```

Looking at&nbsp;[Technology support — Dynatrace Docs](https://docs.dynatrace.com/docs/ingest-from/technology-support)&nbsp;I’m not seeing support for Feign under Web Services. We do make use of Spring in our application so I am going to try and make use of Spring Web Services to facilitate the API calls to see if that sorts out the issue.

I don’t think reinstalling One Agent will help. The application is running within AWS ECS and when it starts up another container is created that does a fresh install of One Agent and so it has been reinstalled a few times to no avail.

---

<div class="post-metadata">

**Author:** ![Peter\_Youssef](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/peter_youssef/32/14668_2.png) [@Peter\_Youssef](https://community.dynatrace.com/u/Peter_Youssef)\
**Post date:** [November 20, 2024, 5:14pm UTC](https://community.dynatrace.com/t/noclassdeffounderror-okhttpcloudeventsintrospectionwrapper/48971/5 "2024-11-20T17:14:21Z")

</div>

Hello&nbsp;[@achang](https://community.dynatrace.com/user/83339)

Appreciate your trust and inputs.

**First of all:**

- Make sure that DT doc procedures have been applied properly if it was the followed deployment method :&nbsp;[Monitor Amazon ECS on EC2 — Dynatrace Docs](https://docs.dynatrace.com/docs/ingest-from/amazon-web-services/integrate-into-aws/aws-ecs)
- If there is another method you have followed kindly share it for further validation.
- Another configurations to validate “proxy configurations”:&nbsp;[Proxy for ActiveGate — Dynatrace Docs](https://docs.dynatrace.com/docs/ingest-from/dynatrace-activegate/configuration/set-up-proxy-authentication-for-activegate)
- Can you check if the highlighted technology versions are updated or not as per the current situation.

**Dev team can also validate a similar case on** &nbsp;:stack\_overflow::

- [https://stackoverflow.com/questions/71335893/java-lang-noclassdeffounderror-could-not-initialize-class-okhttp3-okhttpclient](https://stackoverflow.com/questions/71335893/java-lang-noclassdeffounderror-could-not-initialize-class-okhttp3-okhttpclient)

Keep us posted.

BR,&nbsp;  
peter

---

<div class="post-metadata">

**Author:** ![Peter\_Youssef](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/peter_youssef/32/14668_2.png) [@Peter\_Youssef](https://community.dynatrace.com/u/Peter_Youssef)\
**Post date:** [November 20, 2024, 5:22pm UTC](https://community.dynatrace.com/t/noclassdeffounderror-okhttpcloudeventsintrospectionwrapper/48971/6 "2024-11-20T17:22:04Z")

</div>

Hi&nbsp;[@achang](https://community.dynatrace.com/user/83339)&nbsp;👨‍💻

I’d appreciate checking with the deployment team which integration method has been followed:

- This&nbsp;🙂&nbsp;[Deploy OneAgent using AWS Systems Manager Distributor — Dynatrace Docs](https://docs.dynatrace.com/docs/ingest-from/amazon-web-services/integrate-into-aws/aws-ec2/deploy-oneagent-using-aws-systems-manager-distributor)
- Or This&nbsp;🤔&nbsp;&nbsp;[Monitor Amazon Web Services with CloudWatch metrics — Dynatrace Docs](https://docs.dynatrace.com/docs/ingest-from/amazon-web-services/integrate-with-aws/cloudwatch-metrics)
- TYT in validation and keep us posted for further resolution progress.

BR,

Peter

---

<div class="post-metadata">

**Author:** ![achang](https://avatars.discourse-cdn.com/v4/letter/a/5e9695/32.png) [@achang](https://community.dynatrace.com/u/achang)\
**Post date:** [November 20, 2024, 9:43pm UTC](https://community.dynatrace.com/t/noclassdeffounderror-okhttpcloudeventsintrospectionwrapper/48971/7 "2024-11-20T21:43:42Z")

</div>

Hi&nbsp;[@Peter\_Youssef](https://community.dynatrace.com/user/51369)&nbsp;,

The approach that we took to make use of One Agent was:&nbsp;[Monitor AWS Fargate — Dynatrace Docs](https://docs.dynatrace.com/docs/ingest-from/amazon-web-services/integrate-into-aws/aws-fargate#runtime).

I managed to solve the issue. It appears that Feign isn’t supported so I switched to OpenFeign (I incorrectly listed this as something we were using above) which is.

Once again, thank you for the direction that you provided on this matter.

---

<div class="post-metadata">

**Author:** ![Peter\_Youssef](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/peter_youssef/32/14668_2.png) [@Peter\_Youssef](https://community.dynatrace.com/u/Peter_Youssef)\
**Post date:** [November 21, 2024, 10:26am UTC](https://community.dynatrace.com/t/noclassdeffounderror-okhttpcloudeventsintrospectionwrapper/48971/8 "2024-11-21T10:26:21Z")

</div>

Hi&nbsp;[@achang](https://community.dynatrace.com/user/83339)&nbsp;👨‍💻

Glad to hear you managed to resolve the highlighted issue 😊, Best wishes.

KR,

Peter

---

<div class="post-metadata">

**Author:** ![achang](https://avatars.discourse-cdn.com/v4/letter/a/5e9695/32.png) [@achang](https://community.dynatrace.com/u/achang)\
**Post date:** [December 10, 2024, 11:16am UTC](https://community.dynatrace.com/t/noclassdeffounderror-okhttpcloudeventsintrospectionwrapper/48971/9 "2024-12-10T11:16:08Z")

</div>

The move to OpenFeign didn’t resolve the issue. When the API was started up we made use of the flag -javaagent:aws-opentelemetry-agent.jar because we were using OpenTelemetry in the past. We no longer use OpenTelemetry and removing the flag resolved the issue for us.
