当前位置:   article > 正文

java.lang.ClassNotFoundException: kotlin.jvm.internal.Intrinsics

java.lang.classnotfoundexception: kotlin.jvm.internal.intrinsics

今天在使用springBoot连接influxdb报错
java.lang.ClassNotFoundException: kotlin.jvm.internal.Intrinsics

详细报错如下,提出我们缺少一个依赖

原因是由于创建influxdb客户端缺少Kotlin运行时库

解决办法就是

1.显示的添加okhttp的依赖
 

  1. <dependency>
  2. <groupId>com.squareup.okhttp3</groupId>
  3. <artifactId>okhttp</artifactId>
  4. <version>4.9.3</version>
  5. </dependency>

2.找到我们的springboot的父依赖配置文件

找到okhttp3的版本(把3.14.9改为4.9.3)然后保存重新编译

  1. java.lang.ClassNotFoundException: kotlin.jvm.internal.Intrinsics
  2. at java.net.URLClassLoader.findClass(URLClassLoader.java:387)
  3. at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
  4. at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:355)
  5. at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
  6. at okio.Buffer.write(Buffer.kt)
  7. at okhttp3.ResponseBody.create(ResponseBody.java:214)
  8. at okhttp3.internal.Util.<clinit>(Util.java:69)
  9. at okhttp3.HttpUrl$Builder.parse(HttpUrl.java:1313)
  10. at okhttp3.HttpUrl.get(HttpUrl.java:917)
  11. at okhttp3.HttpUrl.parse(HttpUrl.java:905)
  12. at com.influxdb.client.InfluxDBClientOptions$Builder$ParsedUrl.<init>(InfluxDBClientOptions.java:689)
  13. at com.influxdb.client.InfluxDBClientOptions$Builder$ParsedUrl.<init>(InfluxDBClientOptions.java:681)
  14. at com.influxdb.client.InfluxDBClientOptions$Builder.connectionString(InfluxDBClientOptions.java:504)
  15. at com.influxdb.client.InfluxDBClientOptions$Builder.url(InfluxDBClientOptions.java:288)
  16. at com.influxdb.client.InfluxDBClientFactory.create(InfluxDBClientFactory.java:174)
  17. at com.example.boardropapp.demos.service.Impl.VideoAnalysisServiceImpl.addSensorRawData(VideoAnalysisServiceImpl.java:78)
  18. at com.example.boardropapp.demos.service.Impl.VideoAnalysisServiceImpl$$FastClassBySpringCGLIB$$ac8fe18a.invoke(<generated>)
  19. at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
  20. at org.springframework.aop.framework.CglibAopProxy.invokeMethod(CglibAopProxy.java:386)
  21. at org.springframework.aop.framework.CglibAopProxy.access$000(CglibAopProxy.java:85)
  22. at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:704)
  23. at com.example.boardropapp.demos.service.Impl.VideoAnalysisServiceImpl$$EnhancerBySpringCGLIB$$b33115b0.addSensorRawData(<generated>)
  24. at com.example.boardropapp.demos.controller.VideoController.RawData(VideoController.java:50)
  25. at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  26. at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  27. at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  28. at java.lang.reflect.Method.invoke(Method.java:498)
  29. at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)
  30. at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)
  31. at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)
  32. at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)
  33. at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)
  34. at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
  35. at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1071)
  36. at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:964)
  37. at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
  38. at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)
  39. at javax.servlet.http.HttpServlet.service(HttpServlet.java:696)
  40. at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
  41. at javax.servlet.http.HttpServlet.service(HttpServlet.java:779)
  42. at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)
  43. at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
  44. at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
  45. at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
  46. at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
  47. at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
  48. at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
  49. at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
  50. at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
  51. at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
  52. at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
  53. at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
  54. at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
  55. at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
  56. at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
  57. at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
  58. at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
  59. at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)
  60. at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
  61. at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541)
  62. at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)
  63. at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
  64. at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
  65. at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:360)
  66. at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)
  67. at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
  68. at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:893)
  69. at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1789)
  70. at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
  71. at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
  72. at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
  73. at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
  74. at java.lang.Thread.run(Thread.java:750)

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/盐析白兔/article/detail/680769
推荐阅读
相关标签
  

闽ICP备14008679号