I can't see the extension name on dropdown list!

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

fffinnn
Posts: 3
Joined: 08 Feb 2012, 15:42

I can't see the extension name on dropdown list!

Postby fffinnn » 08 Feb 2012, 16:04

Zone : MyExt
Extension : SFS2x/extensions/MyExt/MyExt.jar
Server version : RC3


Also extensions folder has sfsTris folder but cant see that in the list too.
Jake-GR
Posts: 59
Joined: 28 Dec 2011, 22:52

Postby Jake-GR » 08 Feb 2012, 20:46

there is a new naming convention in RC3 to have them show up in the admin tool... the files need to end in Extension.jar (example)

Extension : SFS2X/Extensions/MyExt/MyExtExtension.jar

(same with sfsTris, just change it to sfsTrisExtension.jar and it will show up)
btw, this has been stated in the forum a couple times and its in the docs.
fffinnn
Posts: 3
Joined: 08 Feb 2012, 15:42

thank you!

Postby fffinnn » 09 Feb 2012, 08:46

I can see, but now I cant start the sfs2xservice. An error has occured. Error code : 1067.

I use netbeans 7.1 to build the Extension project and it has no any error.

Zone : test
Extension folder : MyTest/MyTestExtension.jar

My ext classes are following :

Code: Select all

package sfs2x.extension.test.src;

import com.smartfoxserver.v2.extensions.SFSExtension;
import com.smartfoxserver.v2.core.SFSEventType;

public class TestExtension extends SFSExtension{

    @Override
    public void init()
    {
       trace("Login extension starting.");
       // Register the login event
       addEventHandler(SFSEventType.USER_LOGIN, LoginHandler.class);
    }

    @Override
    public void destroy()
    {
        super.destroy();
    }
   
}

package sfs2x.extension.test.src;

import com.smartfoxserver.v2.core.ISFSEvent;
import com.smartfoxserver.v2.exceptions.SFSException;
import com.smartfoxserver.v2.extensions.BaseServerEventHandler;


public class LoginHandler extends BaseServerEventHandler {

   @Override
   public void handleServerEvent(ISFSEvent event) throws SFSException
   {
       trace("Login successful, joining room!");
   }
   
}



SFS LOGS

09 Feb 2012 10:28:19,422 INFO [main] smartfoxserver.v2.SmartFoxServer - Boot sequence starts...
09 Feb 2012 10:28:19,428 INFO [main] smartfoxserver.v2.SmartFoxServer -
_____ _____ _____ ___ __ __ _____ _____ _____ _____
| __| __| __| |_ | | | | __ | | |_ _|
|__ | __|__ | | _|- -| | __ -| | | | | | |
|_____|__| |_____| |___|__|__| |_____|_____|_____| |_|

09 Feb 2012 10:28:19,693 INFO [main] smartfoxserver.v2.SmartFoxServer - License code not found, starting Community Edition license
09 Feb 2012 10:28:19,693 INFO [main] v2.core.SFSEventManager - AnonymousService-1 initalized
09 Feb 2012 10:28:19,704 INFO [main] vfs.impl.DefaultFileReplicator - Using "C:\Windows\TEMP\vfs_cache" as temporary files store.
09 Feb 2012 10:28:19,748 INFO [main] smartfoxserver.v2.SmartFoxServer - License loaded:

===================================
LICENSE DETAILS
-----------------------------------
Type : Community Edition
Max users : 100
===================================

09 Feb 2012 10:28:19,749 INFO [main] entities.managers.SFSBannedUserStorage - BanUserStorage initialized
09 Feb 2012 10:28:19,757 INFO [main] entities.managers.SFSBannedUserManager - BanUser data loaded: 0 records.
09 Feb 2012 10:28:19,761 INFO [main] v2.config.SFSConfigurator - Loading: zones\test.zone.xml
09 Feb 2012 10:28:19,825 INFO [main] v2.config.SFSConfigurator - Loading: zones\SimpleChat.zone.xml
09 Feb 2012 10:28:19,839 INFO [main] entities.managers.SFSZoneManager -

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
>> Zone: test
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

09 Feb 2012 10:28:19,856 WARN [SFS2X ShutdownHook] v2.core.SFSShutdownHook - SFS2X is shutting down. The process may take a few seconds...
09 Feb 2012 10:28:19,857 INFO [Thread-1] entities.managers.SFSZoneManager - BuddyList saveAll...
09 Feb 2012 10:28:19,860 INFO [Thread-2] entities.managers.SFSBannedUserManager - BanUser data saved.
User avatar
rjgtav
Posts: 2813
Joined: 19 Apr 2009, 11:31
Location: Lisbon, Portugal

Postby rjgtav » 09 Feb 2012, 19:04

It looks like the config for the test zone is corrupted, which is causing the server to shutdown. Please try removing the config file for that zone (test.xml under [SFS2x Installation Folder]\SFS2X\zones) and recreating the zone again from scratch.
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
Jake-GR
Posts: 59
Joined: 28 Dec 2011, 22:52

Postby Jake-GR » 09 Feb 2012, 20:20

Probably not... I ran into the same issue with using NetBean 7.1

NetBeans 7.1 ships with Java 7, where SmartFox is built against Java 6. There is a simple solution (that worked for me), go into your project properties (in NetBeans) and by default "sources" is selected on the left side. At the very bottom there is a drop-down box called "Source/Binary Format" change that from Java 7 to Java 6 and then clean/rebuild the extension.

There is an actual error message SmartFox spits out, that I used to search for (it is in the forums)... but... that error message is not saved in the log files, so its hard to catch :)
User avatar
rjgtav
Posts: 2813
Joined: 19 Apr 2009, 11:31
Location: Lisbon, Portugal

Postby rjgtav » 09 Feb 2012, 20:37

Oh yes, sorry I there was no error specified I didnt think about it. Yes you have to use the same version for both SFS and the extensions.
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.

Return to “SFS2X Questions”

Who is online

Users browsing this forum: Majestic-12 [Bot] and 59 guests