简体   繁体   English

HttpEntity ClassNotFound?

[英]HttpEntity ClassNotFound?

您好,我尝试在此示例中使用post methode使用apatche 4.0.1 但我收到了HttpEntity ClassNotFound异常

You are not correclty including the httpcore jar into your class path. 您不恰当地将httpcore jar包含到类路径中。 Are you running it as a jar, webapp or just application via some IDE? 您是通过jar,webapp还是仅通过某些IDE的应用程序运行它?

Edit: Based on your comment. 编辑:根据您的评论。

ClassNotFoundException: org.apache.commons.logging.LogFactory ClassNotFoundException:org.apache.commons.logging.LogFactory

Thats your culprit. 那就是你的罪魁祸首。 Im assuming httpcore uses LogFactory and you are not including it in your classpath. 我假设httpcore使用LogFactory,并且您没有在类路径中包括它。 Look for commons-logging.jar and include that in your classpath as well. 查找commons-logging.jar,并将其也包含在您的类路径中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM