[英]Handler dispatch failed; nested exception is java.lang.NoClassDefFoundError: org/apache/http/client/HttpClient
enter image description here 在此处输入图片说明
I have try to hit API then this type of error is occurs - org.springframework.web.util.NestedServletException: Handler dispatch failed; 我试图打API,然后会发生这种类型的错误-org.springframework.web.util.NestedServletException:处理程序派发失败; nested exception is java.lang.NoClassDefFoundError: org/apache/http/client/HttpClient 嵌套的异常是java.lang.NoClassDefFoundError:org / apache / http / client / HttpClient
Make sure you have added the dependency for apache http components based on the tool you are using. 确保已根据使用的工具添加了对Apache http组件的依赖关系。 Follow this link [dependency for apache http components][1] https://hc.apache.org/httpcomponents-client-ga/httpclient/dependency-info.html to add the dependency. 单击此链接[apache http组件的依赖性] [1] https://hc.apache.org/httpcomponents-client-ga/httpclient/dependency-info.html添加依赖性。
NoClassDefFoundError means that the class was available while compiling but not able to find the definition at run time. NoClassDefFoundError表示该类在编译时可用,但在运行时找不到该定义。 Try by upgrading your httpclient depedency, 尝试升级您的httpclient权限,
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.3</version>
</dependency>
And then run clean install
然后运行clean install
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.