问题
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