[jitsi-dev] NullPointer Exception while calling CallManager


#1

I am calling one Thread class(PollingServer.java--package net.java.sip.communicator.impl.gui) from SIPCommunicator.java (package net.java.sip.communicator.launcher;) class ... in PollingServer.java I am calling CallManager using one fixed event as bellow

List<ProtocolProviderService> telephonyProviders =CallManager.getTelephonyProviders();
CallManager.createCall(telephonyProviders.get(0), "4000001");

but its giving NullPointerException here in CallManager class.

public static List<ProtocolProviderService> getTelephonyProviders()
    {
       
        return GuiActivator .getRegisteredProviders(OperationSetBasicTelephony.class);
    
    }

Any Solution for this? and from where i should call my PollingServer.java to pole the events to createCall()

Thanks&Regards
Santosh Kumar T


#2

I am calling one Thread class(PollingServer.java--package
net.java.sip.communicator.impl.gui) from SIPCommunicator.java (package
net.java.sip.communicator.launcher;) class ... in PollingServer.java I am
calling CallManager using one fixed event as bellow

List<ProtocolProviderService> telephonyProviders
=CallManager.getTelephonyProviders();
CallManager.createCall(telephonyProviders.get(0), "4000001");

but its giving NullPointerException here in CallManager class.

The GuiActivator tries to access OSGi bundles that aren't loaded yet. As already said please make your own bundle and load it after the UIService. You cannot access any services from the launcher package as OSGi and therefore all providers aren't initialized yet.

Ingo