cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

NoClassDefFoundError OkHttpCloudEventsIntrospectionWrapper

achang
Newcomer

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

7 REPLIES 7

Peter_Youssef
Champion

Hello @achang 

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

BR,

Peter

Peter_Youssef
Champion

Hi @achang 

  • 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

 

achang
Newcomer

Hi @Peter_Youssef,

Thanks for the ideas.

Please find the stack trace below:

 

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 https://docs.dynatrace.com/docs/ingest-from/technology-support 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.

Hello @achang 

Appreciate your trust and inputs.

First of all: 

Dev team can also validate a similar case on :stack_overflow::

Keep us posted.

BR, 
peter

Hi @achang 👨‍💻

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

BR,

Peter

Hi @Peter_Youssef ,

The approach that we took to make use of One Agent was: https://docs.dynatrace.com/docs/ingest-from/amazon-web-services/integrate-into-aws/aws-fargate#runti....

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.

Hi @achang 👨‍💻

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

KR,

Peter

Featured Posts