java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory [duplicate]

走远了吗. 提交于 2019-12-13 22:45:11

问题


I am trying to send a notification using this class FCMHelper and im getting errors errors leading me to an error in httpclient this is my code ...

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);
}

i got this error

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

what the problem here or if someone could give any other way to do it

.. thanks for your help


回答1:


It seems "org/apache/commons/logging/LogFactory" is missed. Have you imported the library?



来源:https://stackoverflow.com/questions/40848701/java-lang-classnotfoundexception-org-apache-commons-logging-logfactory

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!