I can't update my extension

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

Moderators: Lapo, Bax

Tomasz
Posts: 2
Joined: 01 Jul 2013, 17:13

I can't update my extension

Postby Tomasz » 17 Jul 2013, 16:54

Hi Guys,
I am working with smartfoxserver 2X. I have problem with updating of extension's code. My extension name is: "MyFirstExtension". There is a .jar file in this folder named: MyFirstExtension.jar . The extension was tested and is working fine. Now I want to update my code. I open Eclipse and I add a few line of code to my project. I exported new code to new .jar and I override old .jar. After restarting a server I see that OLD code is run. I don't have any idea why. How the server could remember old code ? Is there a cache which I can delete ? How to resolve this problem ?

Thanks,
Tomek
User avatar
rjgtav
Posts: 2813
Joined: 19 Apr 2009, 11:31
Location: Lisbon, Portugal

Re: I can't update my extension

Postby rjgtav » 17 Jul 2013, 17:02

Hi,

First of all, please post all the SFS2X server-side related questions in this forum, the other one is for SFS Pro only :)
Regarding your issue, I remember that sometimes Eclipse exports old code when creating the .jar file. Can you try cleaning your project by doing Project > Clean > Clean all projects?

Thanks
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.
Tomasz
Posts: 2
Joined: 01 Jul 2013, 17:13

Re: I can't update my extension

Postby Tomasz » 17 Jul 2013, 17:14

Thanks for moving my email.
I decompiled my new jar code and I see that there is a new code ;/
User avatar
rjgtav
Posts: 2813
Joined: 19 Apr 2009, 11:31
Location: Lisbon, Portugal

Re: I can't update my extension

Postby rjgtav » 17 Jul 2013, 17:29

Hmm.. Can you try sending me the jar through a PM, so that I can test if it is running old code with my local installation of SFS2X?

Thanks
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.
User avatar
Bax
Site Admin
Posts: 4612
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: I can't update my extension

Postby Bax » 18 Jul 2013, 08:05

Is this a Zone Extension or a Room Extension?
In the first case SFS should reload the new Extension automatically, provided that the correct policy is set in the configuration (reload mode should be set to auto here: http://docs2x.smartfoxserver.com/Gettin ... eextension).
If it is a Room Extension, then the new Extension will be loaded when a Room using it will be created AFTER it was updated. Previously created Rooms will keep running the old code.
Paolo Bax
The SmartFoxServer Team

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 47 guests