LordDawn wrote:I'm following the guide, I have the latest Java and Eclipse, and have written a demo hello world extension, but when I add the Jar file into the extensions/MyExtension folder, and restart the clean install of smartfox, it crashes out. I can't find any log that shows an error as to why this happens. Remove the extension jar file and it starts up fine (though issues a warning that the MyExtension folder contains no jar file.
Logs are found under SFS2X/logs/smartfox.log
Or you can start the server via the sfs2x.sh (OSX / Linux) / sfs2x.bat (Windows) from command line and see the logs live.
Or you can connect via the AdminTool and check the logs from the Log Manager
Find out what error you've got in the logs and let us know.
Here's the log file. I can't see anything, but it crashes out and auto-closes:-
16 Apr 2019 | 15:56:16,885 | INFO | main | smartfoxserver.v2.SmartFoxServer | | Boot sequence starts...
16 Apr 2019 | 15:56:19,459 | INFO | main | v2.core.SFSEventManager | | AnonymousService-1 initialized
16 Apr 2019 | 15:56:19,506 | INFO | main | vfs.impl.DefaultFileReplicator | | Using "C:\Users\Luke\AppData\Local\Temp\vfs_cache" as temporary files store.
16 Apr 2019 | 15:56:19,606 | INFO | main | smartfoxserver.v2.SmartFoxServer | | License loaded:
==========================================
LICENSE DETAILS
------------------------------------------
Type : Community Edition
Max users : 100
==========================================
16 Apr 2019 | 15:56:19,606 | INFO | main | entities.managers.SFSBannedUserStorage | | BanUserStorage initialized
16 Apr 2019 | 15:56:19,638 | INFO | main | entities.managers.SFSBannedUserManager | | BanUser data loaded: 0 records.
16 Apr 2019 | 15:56:19,653 | INFO | main | smartfoxserver.v2.SmartFoxServer | | Protocol Type is: BINARY
16 Apr 2019 | 15:56:19,738 | INFO | main | v2.config.DefaultConfigLoader | | Loading: zones\BasicExamples.zone.xml
16 Apr 2019 | 15:56:19,791 | INFO | main | entities.managers.SFSZoneManager | |
Running from the command line, I get an error that my jar was compiled using Java runtime class file version 55 and SmartFox was compiled with Java runtime class file version 52.
I've found I can cure the error by changing compliance in Eclipse to 1.8. I tried 11, 10, 9 and all of those still caused the error, but 1.8 was ok.
Have I got this right, or should I be doing things another way?