赞
踩
今天在使用springBoot连接influxdb报错
java.lang.ClassNotFoundException: kotlin.jvm.internal.Intrinsics
详细报错如下,提出我们缺少一个依赖
原因是由于创建influxdb客户端缺少Kotlin运行时库
解决办法就是
1.显示的添加okhttp的依赖
- <dependency>
- <groupId>com.squareup.okhttp3</groupId>
- <artifactId>okhttp</artifactId>
- <version>4.9.3</version>
- </dependency>
2.找到我们的springboot的父依赖配置文件
找到okhttp3的版本(把3.14.9改为4.9.3)然后保存重新编译
- java.lang.ClassNotFoundException: kotlin.jvm.internal.Intrinsics
- at java.net.URLClassLoader.findClass(URLClassLoader.java:387)
- at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
- at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:355)
- at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
- at okio.Buffer.write(Buffer.kt)
- at okhttp3.ResponseBody.create(ResponseBody.java:214)
- at okhttp3.internal.Util.<clinit>(Util.java:69)
- at okhttp3.HttpUrl$Builder.parse(HttpUrl.java:1313)
- at okhttp3.HttpUrl.get(HttpUrl.java:917)
- at okhttp3.HttpUrl.parse(HttpUrl.java:905)
- at com.influxdb.client.InfluxDBClientOptions$Builder$ParsedUrl.<init>(InfluxDBClientOptions.java:689)
- at com.influxdb.client.InfluxDBClientOptions$Builder$ParsedUrl.<init>(InfluxDBClientOptions.java:681)
- at com.influxdb.client.InfluxDBClientOptions$Builder.connectionString(InfluxDBClientOptions.java:504)
- at com.influxdb.client.InfluxDBClientOptions$Builder.url(InfluxDBClientOptions.java:288)
- at com.influxdb.client.InfluxDBClientFactory.create(InfluxDBClientFactory.java:174)
- at com.example.boardropapp.demos.service.Impl.VideoAnalysisServiceImpl.addSensorRawData(VideoAnalysisServiceImpl.java:78)
- at com.example.boardropapp.demos.service.Impl.VideoAnalysisServiceImpl$$FastClassBySpringCGLIB$$ac8fe18a.invoke(<generated>)
- at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
- at org.springframework.aop.framework.CglibAopProxy.invokeMethod(CglibAopProxy.java:386)
- at org.springframework.aop.framework.CglibAopProxy.access$000(CglibAopProxy.java:85)
- at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:704)
- at com.example.boardropapp.demos.service.Impl.VideoAnalysisServiceImpl$$EnhancerBySpringCGLIB$$b33115b0.addSensorRawData(<generated>)
- at com.example.boardropapp.demos.controller.VideoController.RawData(VideoController.java:50)
- at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
- at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
- at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
- at java.lang.reflect.Method.invoke(Method.java:498)
- at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)
- at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)
- at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)
- at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)
- at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)
- at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
- at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1071)
- 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.doPost(FrameworkServlet.java:909)
- at javax.servlet.http.HttpServlet.service(HttpServlet.java:696)
- 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.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
- 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.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
- 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.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
- 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.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
- 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.StandardWrapperValve.invoke(StandardWrapperValve.java:197)
- at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
- at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541)
- at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)
- 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)
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。