Caused by: java.lang.ExceptionInInitializerError: null
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at org.jivesoftware.smack.SmackInitialization.loadSmackClass(SmackInitialization.java:218)
at org.jivesoftware.smack.SmackInitialization.parseClassesToLoad(SmackInitialization.java:198)
at org.jivesoftware.smack.SmackInitialization.processConfigFile(SmackInitialization.java:168)
at org.jivesoftware.smack.SmackInitialization.processConfigFile(SmackInitialization.java:153)
at org.jivesoftware.smack.SmackInitialization.<clinit>(SmackInitialization.java:119)
at org.jivesoftware.smack.SmackConfiguration.getVersion(SmackConfiguration.java:96)
at org.jivesoftware.smack.provider.ProviderManager.<clinit>(ProviderManager.java:121)
at fcm.CcsClient.<init>(CcsClient.java:88)
at fcm.CcsClient.<init>(CcsClient.java:78)
at fcm.CcsClient.prepareClient(CcsClient.java:71)
at fcm.XMPP.<init>(XMPP.java:26)
... 18 common frames omitted
Caused by: java.lang.NullPointerException: null
at org.jivesoftware.smack.util.Objects.requireNonNull(Objects.java:23)
at org.jivesoftware.smack.util.Objects.requireNonNull(Objects.java:29)
at org.jivesoftware.smack.util.DNSUtil.setDNSResolver(DNSUtil.java:69)
at org.jivesoftware.smack.util.dns.javax.JavaxResolver.setup(JavaxResolver.java:76)
at org.jivesoftware.smack.util.dns.javax.JavaxResolver.<clinit>(JavaxResolver.java:61)
... 31 common frames omitted
My code where this exception happens is on the first line of
ProviderManager.addExtensionProvider(FCM_ELEMENT_NAME.getValue(), FCM_NAMESPACE.getValue(), new ExtensionElementProvider<FcmPacketExtension>() {
@Override
public final FcmPacketExtension parse(XmlPullParser xmlPullParser, int i)
throws IOException, XmlPullParserException {
String json = xmlPullParser.nextText();
return new FcmPacketExtension(json);
}
});
I tried to pattern using the provided samples but I can't make it work in my project. :(
With the information provided. I would say to check carefully the class: FcmPacketExtension and the values of your enums: FCM_ELEMENT_NAME.getValue(), FCM_NAMESPACE.getValue()
Just wondering if any of you encountered this:
My code where this exception happens is on the first line of
I tried to pattern using the provided samples but I can't make it work in my project. :(