BuddyList Exception

Post here your questions about the Java client / Android API for SFS2X

Moderators: Lapo, Bax

Madhusmita
Posts: 37
Joined: 08 Jan 2014, 11:28

BuddyList Exception

Postby Madhusmita » 15 May 2014, 08:23

I am getting below mentioned warning some times when number of clients get increased(>20)

Below mentioned code is written on "ZoneJoinHandler.java file" for "SFSEventType.USER_JOIN_ZONE" event on init() method of java extension.

Code: Select all

        // Initialize buddy list for current user
        try {
            SmartFoxServer.getInstance().getAPIManager().getBuddyApi().initBuddyList(user, false); //Line#157
        } catch (IOException e) {
            trace(ExtensionLogLevel.ERROR, String.format("Cannot init buddy list - %s", e.toString()), Arrays.toString(e.getStackTrace()));
            logger.error(e.getMessage());
        }


Exception logged in SFS Server Admin tool:

Code: Select all

15 May 2014 | 07:59:07,005 | WARN | pool-1-thread-1 | entities.managers.SFSExtensionManager | java.lang.NullPointerException:
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Exception: java.lang.NullPointerException
Message: *** Null ***
Description: Error during event handling: java.lang.NullPointerException, Listener: { Ext: Chapatiz, Type: JAVA, Lev: ZONE, { Zone: Chapatiz }, {} }
+--- --- ---+
Stack Trace:
+--- --- ---+
com.smartfoxserver.v2.api.response.SFSBuddyResponseApi.notifyBuddyListInited(SFSBuddyResponseApi.java:49)
com.smartfoxserver.v2.api.SFSBuddyApi.initBuddyList(SFSBuddyApi.java:87)
com.chapatiz.handler.ZoneJoinHandler.handleServerEvent(ZoneJoinHandler.java:157)
com.smartfoxserver.v2.extensions.SFSExtension.handleServerEvent(SFSExtension.java:258)
com.smartfoxserver.v2.entities.managers.SFSExtensionManager.dispatchEvent(SFSExtensionManager.java:764)
com.smartfoxserver.v2.entities.managers.SFSExtensionManager.dispatchZoneLevelEvent(SFSExtensionManager.java:685)
com.smartfoxserver.v2.entities.managers.SFSExtensionManager.handleServerEvent(SFSExtensionManager.java:885)
com.smartfoxserver.v2.core.SFSEventManager$SFSEventRunner.run(SFSEventManager.java:64)
java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
java.lang.Thread.run(Unknown Source)
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::


Please let me know what could be the reason for this warning?

I am using SFS java Client API: 1.3.0
SmartFoxServer_2X version 2.8.4
User avatar
Lapo
Site Admin
Posts: 23026
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: BuddyList Exception

Postby Lapo » 16 May 2014, 11:19

I've already replied to the other related post you have started.
Since these two issues belong to the same test you are running I would prefer to keep all in one conversation.
Lapo
--
gotoAndPlay()
...addicted to flash games

Return to “SFS2X Java / Android API”

Who is online

Users browsing this forum: No registered users and 29 guests