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

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

我正在尝试使用此 class FCMHelper 发送通知,但我遇到了错误 导致我在 httpclient 中出错的错误 这是我的代码...

public void send() throws IOException{
    JsonObject notificationObject = new JsonObject();
    notificationObject.addProperty("data", "hello");
    notificationObject.addProperty("to", "dSvX_cWo5iY:A......QQT-bkb8x0VO");
    FireBase firebase = FireBase.getInstance();
    firebase.sendNotification("to", "condition", notificationObject);
}

我遇到了这个错误

Caused by: java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory
    at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1783)
    at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1633)
    ... 58 more

这里有什么问题或者是否有人可以提供任何其他方法来做到这一点

..感谢您的帮助

好像"org/apache/commons/logging/LogFactory" 漏掉了。 你导入库了吗?