Cant 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

genar
Posts: 137
Joined: 13 Jul 2017, 11:49

Cant update my extension

Postby genar » 09 Mar 2021, 21:33

Im running into a weird issue... for some reason smartfoxserver stopped to use my newly inserted extensions. I build a new .jar from my files and place it into the extension folders. But once the server starts, it always uses some older version. And i cant get it working.

I decompiled my extension and its the updated one. Nevertheless smartfoxserver still uses the old one for some reason. And i only have it installed once, Its also the right folder. It does not work with auto/none/manuell restart either. Its a zone extension. Any ideas ?

Heres my jar
https://www.file-upload.net/download-14515783/SignUpExtension.jar.html
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Cant update my extension

Postby Lapo » 10 Mar 2021, 08:47

Hi,
your Extension packs a ton of dependencies in the jar file, including the smartfox jars themselves. That's a problem, because it's going to create class conflicts.

The best way to deploy Extensions is to separate your code from the dependencies:
1- put all dependency jars under extensions/__lib__/ (making sure to exclude the SFS2X jars used for compilation)
2- deploy your Extension code in its own jar file

With this said, the most prominent issue here is the inclusion of the SFS2X jar files.

Hope it helps
Lapo
--
gotoAndPlay()
...addicted to flash games
genar
Posts: 137
Joined: 13 Jul 2017, 11:49

Re: Cant update my extension

Postby genar » 10 Mar 2021, 12:36

Lapo wrote:Hi,
your Extension packs a ton of dependencies in the jar file, including the smartfox jars themselves. That's a problem, because it's going to create class conflicts.

The best way to deploy Extensions is to separate your code from the dependencies:
1- put all dependency jars under extensions/__lib__/ (making sure to exclude the SFS2X jars used for compilation)
2- deploy your Extension code in its own jar file

With this said, the most prominent issue here is the inclusion of the SFS2X jar files.

Hope it helps


Thanks ! Well... i already included dependency jars in the lib folder and also deploayed my extension in its own jar file. But i found the issue here. And its very, very strange. Once i copied my extension jar file into the lib folder AND its own extension folder... it started working :o i have no clue why. So i need to add that jar in two places.
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Cant update my extension

Postby Lapo » 10 Mar 2021, 17:09

Doesn't sound very good. It still sounds like there's some other issue going on.
Are there any specific errors? Are you checking the log files?
What happens if the Extension is deployed in the correct place, after the fixes I have suggested?

Also can you reproduce the problem locally?

Thanks
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 55 guests